Problem Installing Rails from Gem 0.8.4

Hey Folks,

Am working on installing Ruby On Rails on my PowerBook (OS X 10.3.5).
Have downloaded Ruby 1.8.2 and then RubyGems 0.8.4, but when doing "gem
install rails" from the command line, I get the following error:

/usr/local/lib/ruby/site_ruby/1.6/rubygems.rb:2:in `require': No such
file to load -- rbconfig (LoadError)
        from /usr/local/lib/ruby/site_ruby/1.6/rubygems.rb:2
        from /usr/bin/gem:3:in `require'
        from /usr/bin/gem:3

Anyone have any ideas?

Many thanks,

Anthony

You will need to upgrade to at least ruby 1.8.1 to get Rails to run. Since it is late, I can't dig up the exact instructions for OS X, but I'm sure somebody will chime in shortly.

PGP.sig (186 Bytes)

···

On 08 Feb 2005, at 00:15, AnthonyBaker wrote:

Hey Folks,

Am working on installing Ruby On Rails on my PowerBook (OS X 10.3.5).
Have downloaded Ruby 1.8.2 and then RubyGems 0.8.4, but when doing "gem
install rails" from the command line, I get the following error:

/usr/local/lib/ruby/site_ruby/1.6/rubygems.rb:2:in `require': No such
file to load -- rbconfig (LoadError)
        from /usr/local/lib/ruby/site_ruby/1.6/rubygems.rb:2
        from /usr/bin/gem:3:in `require'
        from /usr/bin/gem:3

Anyone have any ideas?

--
Eric Hodel - drbrain@segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04

Eric Hodel wrote:

Hey Folks,

Am working on installing Ruby On Rails on my PowerBook (OS X 10.3.5).
Have downloaded Ruby 1.8.2 and then RubyGems 0.8.4, but when doing "gem
install rails" from the command line, I get the following error:

/usr/local/lib/ruby/site_ruby/1.6/rubygems.rb:2:in `require': No such
file to load -- rbconfig (LoadError)
        from /usr/local/lib/ruby/site_ruby/1.6/rubygems.rb:2
        from /usr/bin/gem:3:in `require'
        from /usr/bin/gem:3

Anyone have any ideas?

You will need to upgrade to at least ruby 1.8.1 to get Rails to run. Since it is late, I can't dig up the exact instructions for OS X, but I'm sure somebody will chime in shortly.

I'm not a Mac person, but after installing Ruby 1.8.2, how does one "upgrade" to Ruby 1.8.1? :slight_smile:

Anyway, it appears that there is a path issue, as Ruby 1.6 (or parts of it) is on the machine and is getting in the way. (I'm assuming, of course, that "[h]ave downloaded Ruby 1.8.2" also means "... and installed it.")

Can one just delete the 1.6 sub-tree? It also seems that rubygems installed itself in the 1.6 tree. Odd. (Think different?)

Does 1.6 have to be uninstalled before installing 1.8, on OS X?

James

···

On 08 Feb 2005, at 00:15, AnthonyBaker wrote:

Eric Hodel <drbrain@segment7.net> writes:

--Apple-Mail-69-696767581
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed

> Hey Folks,
>
> Am working on installing Ruby On Rails on my PowerBook (OS X 10.3.5).
> Have downloaded Ruby 1.8.2 and then RubyGems 0.8.4, but when doing "gem
> install rails" from the command line, I get the following error:
>
> /usr/local/lib/ruby/site_ruby/1.6/rubygems.rb:2:in `require': No such
> file to load -- rbconfig (LoadError)
> from /usr/local/lib/ruby/site_ruby/1.6/rubygems.rb:2
> from /usr/bin/gem:3:in `require'
> from /usr/bin/gem:3
>
> Anyone have any ideas?

You will need to upgrade to at least ruby 1.8.1 to get Rails to run.
Since it is late, I can't dig up the exact instructions for OS X, but
I'm sure somebody will chime in shortly.

http://www.sateh.com/projects/sateh/wiki/InstallingRailsOnOSX

S.

···

On 08 Feb 2005, at 00:15, AnthonyBaker wrote:

James Britt wrote:

Does 1.6 have to be uninstalled before installing 1.8, on OS X?

No. When compiling and installing from source on OSX, ruby installs it's binary into /usr/bin/ruby18 in which you have to rename it to /usr/bin/ruby. Because /usr/bin/ruby still is the 1.6 binary.

The lib files get installed into /usr/local/lib/ruby/ with subdirectories 1.8/ and site_ruby/

I dont even have a /usr/local/lib/ruby/1.6 directory anymore. I didn't intentionally delete it. Perhaps 'make install' did it for me. I'm running OSX 10.3, everything is factory install except for compiling ruby from source and installing wxRuby from Curt Hibb's one-click installer.

Zach

But there seems to be a /usr/local/lib/ruby/site_ruby/1.6/ directory,
based on the error message you posted.

Is there something misleading the rubygems installer into thinking the
current Ruby is 1.6?

James

···

On Tue, 8 Feb 2005 23:14:06 +0900, Zach Dennis <zdennis@mktec.com> wrote:

I dont even have a /usr/local/lib/ruby/1.6 directory anymore. I didn't
intentionally delete it.

Okay. Here's the latest. (And boy, is this a pain in the ass.)

I went and downloaded the latest 1.8.2 build of Ruby -- the DMG
installer version from http://homepage.mac.com/discord/Ruby/

That's in. I, too, also noticed that there was a 1.6 folder inside of
/usr/local/lib/ruby/site_ruby/1.6 -- I deleted this directory.

Remaining is /usr/local/lib/ruby/1.8

Downloaded the latest RubyGems version 0.8.4

Based on a tidbit from a piece I read on installing Ruby and Ruby on
Rails from http://www.splashed.org/archives/2004/08/23/installing, I
also created a directory at /usr/local/lib/ruby/gems/1.8 -- there was a
note that not having this caused someone some grief when installing
RubyGems.

I then ran the following command from the RubyGems directory:

  sudo ruby setup.rb all

And got the following error:

setup.rb:52:in `require': No such file to load -- rbconfig (LoadError)
        from setup.rb:52

This is different from the ruby/1.6 errors I was getting prior to
deleting that install (which, btw, I'm still stumped as to how it got
there).

Anyone have any further ideas?

Would love to get this installed today...

I had the same problem. What's going on is that os x has 1.6 and you
installed the new 1.8.2. HOWEVER, this does not over write the older
version. SO you are running into path issues.

to change this, check out the following article:

Hope this helps...have fun with ruby!

Solved this problem, folks. Thanks!

Tried the link to the Ruby On Rails wiki at:

But this was causing grief, too. There's a typo in the export path that
needs to be added to the .bash_profile. In the above URL, it says to
write:

export PATH=/usr/local/bin:'$PATH'

and it should be:

export PATH=/usr/local/bin:$PATH

-- no quotes around $PATH.

Once the proper modification to my .bash_profile was made, all was well.