The system returns rails 2.3.5 responding to rails -v. However it returns “rails not installed” for gem uninstall rails.
The system returns error for gem install rails:
@ubuntu:~$ gem install rails
ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: rails requires activesupport (= 3.1.1), actionpack (= 3.1.1), activerecord (= 3.1.1), activeresource (= 3.1.1), actionmailer (= 3.1.1), railties (= 3.1.1), bundler (~> 1.0)
Any idea about the problem?
Also, use RVM. It allows you to install gems in your user directory, thus eliminating the need to use
sudo(and thus putting yourself at risk).