When I go to my projects folder and type in
rails s
I get the following error message:
Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0
I specified the ruby version (for Heroku) in my Gemfile like this:
ruby "2.0.0"
I found this issue on Github:
https://github.com/sstephenson/rbenv/issues/400
The issue is described as kind of a mess added by the Heroku Toolbelt by adding their own folder at the beginning of the $PATH environment variable. I already tried to implement the solution provided by the issue closer, but I could not bring it to work.
Here are the last lines of my ~/.bashrc file
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
and here is what I get for echo $PATH
/home/user/.rbenv/shims:/home/user/.rbenv/bin:/usr/local/heroku/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
and for ruby -v
ruby 2.0.0p195 (2013-05-14 revision 40734) [i686-linux]
What should I do now?
Please read this blog post, I think this is the answer for you. I had the same problem before so I specified the ruby version it worked afterwards.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.