Forum: Ruby on Rails "File not found: lib" installing rails-3.0.0.beta3 on my Mac

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
15aaada636d7af22dc4f727bbb50e872?d=identicon&s=25 Frank Burleigh (fburleigh)
on 2010-05-09 12:11
(Received via mailing list)
I've always distrusted the ruby and rails installs on my Mac (oOS X
10.6.3) -- sudo gem cleanup can't seem to get rid of old gem versions
(lots of Gem::InstallError: cannot uninstall).

Because of that, I don't trust the rails beta3 install I just
completed.  Here's the story:

* config is Apple's ruby 1.8.7 and gem 1.3.6.
* xcode is installed from Apple's developer site.
* gem env result is:

RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.6
  - RUBY VERSION: 1.8.7 (2009-06-08 patchlevel 173) [universal-
darwin10.0]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-10
  - GEM PATHS:
     - /Library/Ruby/Gems/1.8
     - /Users/burleigh/.gem/ruby/1.8
     - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/gems/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

I have done these commands:

sudo gem update --system
sudo gem cleanup

sudo gem install tzinfo builder i18n memcache-client rack \
  rake rack-test rack-mount erubis mail text-format \
  thor bundler
sodu gem install rails --pre

whose execution ends with:

Installing ri documentation for rails-3.0.0.beta3...
File not found: lib

The gems/rails-3.0.0.beta3 directory has a bin directory with a 20
character file named "rails."  The other gem directories seem fuller.

That, combined with the failure of gem cleanup, makes me think "this
can't be right."

I'd appreciate any advice how I might clean up my Mac rails
environment.

Thank you.

PS: I have so far avoided MacPorts.
15aaada636d7af22dc4f727bbb50e872?d=identicon&s=25 Frank Burleigh (fburleigh)
on 2010-05-10 00:21
(Received via mailing list)
On May 8, 10:39 pm, Frank <fburle...@gmail.com> wrote:
> I've always distrusted the ruby and rails installs on my Mac (oOS X
> 10.6.3) -- sudo gem cleanup can't seem to get rid of old gem versions
> (lots of Gem::InstallError: cannot uninstall).
>
> Because of that, I don't trust the rails beta3 install I just
> completed.  Here's the story:
>

I built and installed my own ruby and rubygems, leaving the Apple-
provided installations alone.  I used ruby 1.9.1 and gems 1.3.6.

Then I followed the procure outlined to install the gems, then rails
beta3 itself.  Again I got the complaint about the missing lib
directory. I followed common advice to create the lib directory in .../
gems/rails-3.0.0.beta3, then installed the rails gem once again -- to
successful completion.  There's nothing actually *in* the lib
directory -- I can only hope that's as it should be.  There are enough
references to this problem that I'll assume there's either some
dependance or some packaging issue, and that the Rails team has it on
their radar for a fix.
7bd3fe2cb0c4a8a6ce4554f8dd28350a?d=identicon&s=25 Mark A. Richman (Guest)
on 2010-06-10 23:03
(Received via mailing list)
I'm having the identical problem with beta4.
52dacf8918a0a918ac0231b142ee25dc?d=identicon&s=25 John Bellone (Guest)
on 2010-06-17 16:22
(Received via mailing list)
I am having this same problem, but I am using Ruby 1.8.7 and an
updated version of RubyGems. Does anyone have an answer for this
issue? I know that Rails 3 does not work at all with 1.9.1, so I tried
1.9.2 and it did not seem to work either. So I decided to go with the
older version.
5f58cf115f270c9e7d23ee178e372a62?d=identicon&s=25 Franck Fallateuf (ffallateuf)
on 2010-07-13 16:33
Is there an update on this problem?

I'm seeing the same problem:

[root@******* ruby-enterprise-1.8.7-2010.02]# gem install rails
--prerelease
Successfully installed rails-3.0.0.beta4
1 gem installed
Installing ri documentation for rails-3.0.0.beta4...
File not found: lib

I have upgraded Ruby to version 1.8.7.

Can anyone help me with this?

Thank you.
C2a69a79bb23987a2021685cb70f08c3?d=identicon&s=25 Armando ??? (alocay)
on 2010-08-31 22:14
Frank Burleigh wrote:
> I have done these commands:
>
> sudo gem update --system
> sudo gem cleanup
>
> sudo gem install tzinfo builder i18n memcache-client rack \
>   rake rack-test rack-mount erubis mail text-format \
>   thor bundler
> sodu gem install rails --pre
>
> whose execution ends with:
>
> Installing ri documentation for rails-3.0.0.beta3...
> File not found: lib
>
> The gems/rails-3.0.0.beta3 directory has a bin directory with a 20
> character file named "rails."  The other gem directories seem fuller.
>


Are you using RVM by any chance? If you are, you cannot use 'sudo' when
installing the gems. I had this issue at first (kept saying File not
found: lib) and then I noticed that RVM installs things as you, not as
sudo. Therefore I just used the command:

'gem install rails --pre' or just 'gem install rails' (since Rails 3 has
been released)

and I got rid of the 'File not found: lib' issue. Hope this helps.
Dd2d775dea75b381edb1bbf0600a0907?d=identicon&s=25 Marnen Laibow-Koser (marnen)
on 2010-08-31 22:36
Frank Burleigh wrote:
> I've always distrusted the ruby and rails installs on my Mac (oOS X
> 10.6.3) --

I've noticed this distrust in a lot of people.  Can't see any reason for
it myself.  Apple's Ruby has always worked fine for me.  I'll be
installing 1.9.2 and RVM at some point, but until then I'll save my
effort and disk space and not build my own Ruby.  If that costs me geek
brownie points, so be it. :D.

> sudo gem cleanup can't seem to get rid of old gem versions
> (lots of Gem::InstallError: cannot uninstall).

Never seen that.  Find and fix the problem instead of just "distrusting"
your development environment.

Again: Apple's Ruby is perfectly trustworthy.  If it's not working for
you, the problem is most likely elsewhere (perhaps a reinstallation of
Apple's dev tools is in order...).

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
Dd2d775dea75b381edb1bbf0600a0907?d=identicon&s=25 Marnen Laibow-Koser (marnen)
on 2010-08-31 22:36
Marnen Laibow-Koser wrote:
> Frank Burleigh wrote:
>> I've always distrusted the ruby and rails installs on my Mac (oOS X
>> 10.6.3) --
[...]

Sorry, neglected to notice I was replying to an oldish post.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
72895291e972d54fa8921a707b533403?d=identicon&s=25 Zu K. (zu_k)
on 2011-06-17 06:37
I had the same problem on ubuntu and I guess that's because I first
installed ruby using 'sudo apt-get install ruby' -- then I tried rvm
which messed up versions and ended up installing multiple versions of
ruby components.

I did 'sudo apt-get remove ruby' and 'sudo apt-get remove gem' (and did
a few more manual clearing). Then, I followed Hartl's tutorial:
http://ruby.railstutorial.org/

And now it works!!!
This topic is locked and can not be replied to.