0

I'm trying to get Rails 3.0.x installed on my machine. The first time i tried it, it gave me the following error: cant find lib . So i found the rails3.0.3 gem folder and made the lib folder. I can install the gem correctly but when i type the following command rails -v It throws the following error.

Daniel-MacBook-Pro:~ Daniel$ sudo gem install rails Password: Successfully installed rails-3.0.3 1 gem installed Installing ri documentation for rails-3.0.3... Installing RDoc documentation for rails-3.0.3... Daniel-MacBook-Pro:~ Daniel$ rails -v /Library/Ruby/Site/1.8/rubygems.rb:233:in `activate': can't activate i18n (~> 0.4.1, runtime) for ["mail-2.2.9", "actionmailer-3.0.3", "rails-3.0.3"], already activated i18n-0.5.0beta3 for ["activemodel-3.0.3", "actionpack-3.0.3", "rails-3.0.3"] (Gem::LoadError) from /Library/Ruby/Site/1.8/rubygems.rb:249:in `activate' from /Library/Ruby/Site/1.8/rubygems.rb:248:in `each' from /Library/Ruby/Site/1.8/rubygems.rb:248:in `activate' from /Library/Ruby/Site/1.8/rubygems.rb:249:in `activate' from /Library/Ruby/Site/1.8/rubygems.rb:248:in `each' from /Library/Ruby/Site/1.8/rubygems.rb:248:in `activate' from /Library/Ruby/Site/1.8/rubygems.rb:249:in `activate' from /Library/Ruby/Site/1.8/rubygems.rb:248:in `each' from /Library/Ruby/Site/1.8/rubygems.rb:248:in `activate' from /Library/Ruby/Site/1.8/rubygems.rb:1082:in `gem' from /usr/bin/rails:18 Daniel--MacBook-Pro:~ Daniel$ 

How can i fix this problem?

Thanks

2 Answers 2

4

I would recommend using RVM and stop installing gems with sudo!

Sign up to request clarification or add additional context in comments.

2 Comments

Why should i/we stop installing gems with sudo?
RVM allows you to install gems as per project basis and have multiple ruby version installed.
1

probably you do not have rdoc installed. It does not hamper any functionality during development. If if you do want you can try this

 sudo gem install rdoc 

see details here problem in installing rails

2 Comments

This throws up a new error: Successfully installed rails-3.0.3 1 gem installed Installing ri documentation for rails-3.0.3... ERROR: While executing gem ... (NoMethodError) undefined method `coverage_level=' for nil:NilClass Daniel--MacBook-Pro:~ Daniel$
you may want to start over -- as mentioned in the link provided. I have tried the same in Ubuntu and got it working.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.