indi indi - 1 year ago 86
Ruby Question

Why does this happen when i try to update rails to 4.0.0?

I pulled someone's project from github, and we seem to be using different rails versions. When i update the rails gem, it seems to go fine, but when i check the version it still shows the previous one and won't run the rails server.

me@ubuntu:~/Documents/RailsProjects/vega$ gem install rails
Successfully installed rails-4.0.0
Parsing documentation for rails-4.0.0
Done installing documentation for rails after 0 seconds
1 gem installed
me@ubuntu:~/Documents/RailsProjects/vega$ rails -v
Rails 3.2.6

Answer Source

You have multiple Rails versions installed and it's reporting the first one it finds.

Does the project have a gemfile? If so just let bundle handle this for you:

bundle install
bundle exec rails s
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download