Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails & Heroku: bash: rails: command not found

I am trying to get into my rails heroku database. Usually I just run:

heroku run rails console

but it's giving me an error: bash: rails: command not found

I have no idea what caused this. Haven't updated my project code.

heroku --version
heroku-toolbelt/3.36.5 (x86_64-darwin15) ruby/2.2.4
heroku-cli/5.6.14-b0cc983 (darwin-amd64) go1.7.4
=== Installed Plugins
[email protected]
like image 202
Jackson Cunningham Avatar asked Sep 21 '25 13:09

Jackson Cunningham


1 Answers

The same happened to me. My problem was that I didn't commit my changes before the first push, so I didn't have the project up. I did:

git add .
git commit -m "first commit"
git push origin heroku

then, before trying rails c, you need to setup the database.

heroku run rake db:migrate

I followed this devcenter.heroku: getting started with rails4

like image 134
mperalt3 Avatar answered Sep 23 '25 06:09

mperalt3