views:

1125

answers:

7

Hello Friends,

i tryed to install the new beta on my system with the command:

sudo gem install rails --pre

but no matter what i tryed, i still get this damn error:

Successfully installed rails-3.0.0.beta3
1 gem installed
Installing ri documentation for rails-3.0.0.beta3...
File not found: lib

Since im very very new to ruby, i really don't know what to do.

How can i finish installing this? Is this installed already? Why does it abort here?

I'm at the end for today.

Thanks for reading.

have a nice day.

A: 

If you're looking to do ruby/rails development on Mac, I'd strongly recommend not using the version of ruby/rubygems shipped with your mac. What I do recommend is:

  1. Installing homebrew and using that to manage software packages on your mac.
  2. Install brewbygems, which makes homebrew play nice with rubygems: gem install brewbygems
  3. Install rvm and learn to love the different versions of ruby and rvm's gemsets feature: gem install rvm

Once you've done that you'll have a pretty robust development environment and you should be able to install any version of rails without a problem. Just keep in mind rails 3 works best using ruby 1.9.2 (install with rvm by running rvm install ruby-head) and is still in beta, meaning it isn't terribly stable and should not be used for anything production grade (yet).

Damien Wilson
`brew install rubygems` => "Error: No available formula for rubygems"
Mark Richman
Thanks for pointing that out, I forgot that I had installed rubygems manually. [Brewbygems](http://github.com/indirect/brewbygems/) seems to be a better alternative.
Damien Wilson
A: 

I found the same error message, while after some google I've successfully installed it by manually 'sudo mkdir lib' in the .../gems/rails-3.0.0.beta3. Though it hasn't raised further problem, I hope someone could tell what should be in the missing lib directory.

Yixi Zhang
A: 

The "sudo mkdir lib" worked perfectly.

Merovech
Path of lib would be nice.
balupton
A: 

I am having the same problem with beta 4. The workaround is sudo gem install rails --pre --no-ri --no-rdoc though I don't know why.

Mark Richman
It's not really a fix as it just doesn't install the documentation at all...
balupton
A: 

Hi, follow this railscast and you'll be just fine.

It seems anyhow that the problem arises in the documentation which shouldn't prevent you from using rails 3.

tommasop
A: 

All you need to run is gem install rdoc, follow it's instructions, then run the install rails command again and you're good. The problem is due to rdoc failing to install when installed with rails, if installed manually it works fine.

Source: http://gist.github.com/565967

^ I had the same problem, and this worked for me.

balupton
Would you edit this answer to add the actual content of that gist (namely, that `gem install rdoc` is what you need)?
Drew Stephens
@Drew, Done :-)
balupton
+1  A: 

You don't really need to do this sudo gem install rails --pre, simply sudo gem install rails. Rails3 is the default package now and out of beta.

It should work fine.

zengr
That is where we are all having problem, with that command.
balupton
please read before downvoting and commenting. This is a 6 month old question and at that time, the only option was `sudo gem install rails --pre`. But when I posted my answer, rails3 was default and you didn't need to append --pre!
zengr
@balupton explanation please?
zengr
Running `sudo gem install rails` two weeks ago caused the exact same problem the asker was experiencing. `sudo gem install rails --pre` didn't work either - this is with Rails 3.0.1. Hence the down vote, as all your answer said was do the same thing that's causing the problem and it should work.
balupton
every one answered do install rails because, there was no accurate answer as per today's rails distribution.
zengr