"File not found: lib" when installing rails-3.0.0

93 views
Skip to first unread message

Dongsheng Wang

unread,
Sep 4, 2010, 4:36:20 AM9/4/10
to rubyonra...@googlegroups.com
I got the following error when try to install rails-3.0.0 on my Ubuntu
box. Can anybody help?

dwang@dwang-bj-ws:~/Projects$ sudo gem install rails
Successfully installed rails-3.0.0
1 gem installed
Installing ri documentation for rails-3.0.0...
File not found: lib


dwang@dwang-bj-ws:~/Projects$ sudo gem install rails
Successfully installed rails-3.0.0
1 gem installed
Installing ri documentation for rails-3.0.0...
File not found: lib
dwang@dwang-bj-ws:~/Projects$ ruby gem
ruby: No such file or directory -- gem (LoadError)
dwang@dwang-bj-ws:~/Projects$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.8
- /home/dwang/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
dwang@dwang-bj-ws:~/Projects$
--
Posted via http://www.ruby-forum.com/.

PsiPro

unread,
Sep 4, 2010, 2:16:49 PM9/4/10
to Ruby on Rails: Talk
I can verify this on ubuntu using those specs.

I installed rails 3 using ruby 1.9.2 and RVM. I suggest that as well.

http://rvm.beginrescueend.com/
There is a railscsts on rvm as well.

Brian
>      -http://rubygems.org/

Sebastian S.

unread,
Dec 23, 2010, 4:54:51 AM12/23/10
to rubyonra...@googlegroups.com
Solution:

$ cd /usr/lib/ruby/gems/1.8/gems/rails-3.0.3/
$ ls .

bin

if you have only "bin" directory:

$ sudo mkdir lib

$ sudo gem install rails

Sebastian

coolesting d.

unread,
Jul 15, 2011, 10:39:18 PM7/15/11
to rubyonra...@googlegroups.com
Jens K. wrote in post #1009365:
> Hi,
>
> I had the same problem with Ruby 1.9.2 and Rails 3.0.9.
>
> Problem: "gem install rails" would always delete the "lib" folder, even
> after manually creating it.
>
> Solution: Creating a ".txt" file within the manually created "lib"
> folder and opening that file in an editor. Now the file was gone after
> "gem install rails" but at least the folder remained and the
> installation ran through. :-)
>
> Cheers,
>
> Jens

It not works, still delete the 'lib' folder if you have the permission
to write folder, otherwise you can not install it.

Reply all
Reply to author
Forward
0 new messages