1

I'm trying to install Ruby on Rails on Ubuntu 11.10, but receiving this error:

$ sudo gem install rails
ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: rails requires activesupport (= 3.2.3), actionpack (= 3.2.3), activerecord (= 3.2.3), activeresource (= 3.2.3), actionmailer (= 3.2.3), railties (= 3.2.3)

How can I fix this?

Note: Git (1.7.5.4 ) and Ruby (1.9.2p290) are installed properly.

sonnuforevis
  • 1,311
  • 6
  • 22
  • 38
  • Have you tried my solution below? It seems you have posted this question on a lot of forums and groups, but this is your answer. What has happened, if you've tried? – TryTryAgain Apr 02 '12 at 23:04

2 Answers2

1

What happens when you do the install without the sudo? does that work? If so, it may be a gem path / permissions issue. If that works, or even if it doesn't, check out 'sudo gem install' or 'gem install' and gem locations

Community
  • 1
  • 1
Geremy
  • 2,415
  • 1
  • 23
  • 27
0

It is suggested to use the RVM

Also, according to rails 3.2.0 and heroku it seems you need to play with versions and typically not use the packaged version from your distribution but some GIT or other repo.

Community
  • 1
  • 1
TryTryAgain
  • 7,632
  • 11
  • 46
  • 82
  • On 11.10, because of dependency issues, yes. This will also be of some help: http://www.railway.at/2010/02/13/avoiding-rails-3-dependency-hell-with-rvm/ and if you have trouble setting up the RVM: http://stackoverflow.com/questions/3626701/ruby-gems-under-rvm-on-ubuntu-failing-to-install-in-the-wrong-location – TryTryAgain Apr 02 '12 at 23:07