Rails 3.1 Deployment to Heroku Error

安稳与你 提交于 2019-11-30 05:14:46

The Heroku stack needs to be migrated, you can run this command to do so:

heroku stack:migrate bamboo-mri-1.9.2 

I was running 1.9.2 locally, which is why it was working locally. But on Heroku, it was running 1.8.7.

preksha

The problem is that there is a new-style hash argument available in Ruby 1.9.2 but unavailable in Ruby 1.8.7 which is:

key: value  # only available in 1.9.2 but

:key => value # available in 1.8.7 and 1.9.2

This is just an additional pointer to some. If ever you are getting the same error in your development environment, on an app that was functioning just fine moments ago, check your ruby version as Preksha/Alex Kliuchnikau mentioned above.

$ ruby -v

If ruby is not set to 1.9.2 or above, you can do that with rvm

   $ rvm --default 1.9.2   (1.9.3 is what I currently use)

If it's not responding to rvm command, add rvm to your bashrc file by copying the following line in your terminal:

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" ' >> ~/.bash_profile
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!