Problem Installing Rails from Gem 0.8.4

A

AnthonyBaker

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
 
E

Eric Hodel

--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.

--
Eric Hodel - (e-mail address removed) - http://segment7.net
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04

--Apple-Mail-69-696767581
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCCH66MypVHHlsnwQRAuopAKCcukRuJhT/PtQZDemrLyCnbsIyMQCgrWw1
AgzWineh3bkfjFQcLA0HLnI=
=5mAc
-----END PGP SIGNATURE-----

--Apple-Mail-69-696767581--
 
J

James Britt

Eric said:
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? :)

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
 
Z

Zach Dennis

James said:
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
 
J

James G. Britt

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

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
 
A

AnthonyBaker

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...
 
A

AnthonyBaker

Solved this problem, folks. Thanks!

Tried the link to the Ruby On Rails wiki at:
http://wiki.rubyonrails.com/rails/show/SettingYourPath

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top