Heroku Installfest


Hi @MacLure

You should be able to post in code just fine. Just place 3 backticks (the key on the left above the tab key) above and below your code on it’s own line and it will format as code.

If your terminal cannot locate a Gemfile I can only assume you are in the wrong directory. If you type ls when in the terminal it should output a list of files and folders in the directory you are in. See if there is a Gemfile there.


Thank you @CouchofTomato! That was it.

However, now I’m on the first exercise in 1.5.3 (getting it to display “hola mundo!”) and my page is not updating. I’ve updated routes.rb to run ‘application#hello’, but the page still runs ‘application#goodbye’ after refreshing in the browser. What am I missing?


At this step

heroku open

I received

 ▸    Error opening web browser.
 ▸    Error: Exited with code 3
 ▸    Manually visit https://murmuring-escarpment-99943.herokuapp.com/ in your
 ▸    browser.

Searching “heroku exited with code 3” on Google doesn’t seem to give me a solution. Any idea what the issue is?


@MacLure can you provide a link to the bit you are on?


I would guess the terminal doesn’t have a variable set to your browser. I’m on my phone at the moment but if you Google for how to set the default browser in the terminal for whatever OS you use you should get some good results. If you still have an issue after that let me know.


I’m using WSL. I found instructions to enter

sudo update-alternatives --config x-www-browser

when I do, it doesn’t list available browsers. It prints

update-alternatives: error: no alternatives for x-www-browsers

I alos tried adding

export BROWSER=/usr/bin/google-chrome

to bash and that didn’t work either. What can I try next?


Sure, I’m at https://www.railstutorial.org/book/beginning#sec-heroku_step_two

I’m on Exercise 1, just below the image of a mostly blank browser window.


You need to set the browser environment variable in your bashrc. To do that you need to locate the full path to the exe file that launches your browser in windows. Can you get that path? If not what browser do you use?


Heroku uses git to track changes so you need to commit to git first.

git add .
git commit -m “update routes”
git push heroku master


C:\Program Files (x86)\Google\Chrome\Application\chrome.exe


You need to open your .bashrc file Ina text editor and add something like

export BROWSER="/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"

Then you’ll need to save it and open a new terminal to reload your bash profile then you can try and see if heroku open works.


Isn’t .bashrc a linux file and therefore we shouldn’t open/edit it with a windows text editor?

So how is it possible to edit the file then?


Figured it out. Works by using nano or vim text editor which do not use a GUI


You can use nano or vim if you are comfortable navigating them. The alternative is to use the terminal to add to the bashrc file but I think you have to escape spaces in the directory name maybe.


Thanks again @CouchofTomato!