Reputation: 211
I tried to install the new beta on my system with the command:
sudo gem install rails --pre
but no matter what I tried, 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 I'm 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?
Upvotes: 21
Views: 12006
Reputation: 29720
Same problem with beta 4.
The workaround is sudo gem install rails --pre --no-ri --no-rdoc
though I don't know why.
Upvotes: -1
Reputation: 4560
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:
gem install brewbygems
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).
Upvotes: 2
Reputation: 48757
All you need to run is gem install rdoc
, follow its 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.
Upvotes: 37
Reputation: 4805
Might be a different solution on your OS, but I got the same exact error in Ubuntu and creating a ¨lib¨ folder under the rails gem folder solved my problem. I have explained the solution in the following post:
Installing Rails: "File not found: lib"
For convenience I will copy it here as well. The solution:
mkdir /lib/ruby/gems/1.8/gems/rails-{whatever your version is}/lib
Explanation: The ¨[sudo] gem install rails¨ command expects the /lib folder (at the end) but for some reason it hasn´t been created yet.
The original source of this solution was the following URL. Hope it helps!
http://www.spritle.com/blogs/?p=915
Upvotes: 0
Reputation: 38919
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.
Upvotes: 0
Reputation: 19
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.
Upvotes: 0