What text editor is available in Heroku bash shell? [closed]
I'm trying to update httpd.conf in my Cedar-based Heroku app. I got to my Heroku bash with
heroku run bash
and found the conf dir under apache. But when I try to open any editor vi, vim, or emacs, I can't find any of these programs. How do you edit conf files on Heroku?
I recently turned the original gist into a heroku cli plugin.
Just install:
heroku plugins:install https://github.com/naaman/heroku-vim
And use:
heroku vim
The heroku vim
command will drop you into a bash shell with vim
installed on your $PATH
. All you have to do is retrain your fingers to type heroku vim
instead of heroku run bash
.
If you don't want to mess around with plugins and just want a copy of nano in your one-off dyno, just run
mkdir /app/nano
curl https://github.com/Ehryk/heroku-nano/raw/master/heroku-nano-2.5.1/nano.tar.gz --location --silent | tar xz -C /app/nano
export PATH=$PATH:/app/nano
This will download a copy of nano from this plugin and put it in your PATH.
there's ed
if you're a masochist.