Failed to install 'rubynode' gem after Snow Leopard upgrade

R

Richard M_

Hi,

I've just upgraded to Mac OS X 10.6, and was following the instructions
on the Rails blog
(http://weblog.rubyonrails.org/2009/8/30/upgrading-to-snow-leopard) to
upgrade my gems etc. This seemed to work OK, with the exception of the
'rubynode' gem which failed to reinstall. This is on a standard Mac OS X
install of Ruby (I don't have MacPorts or anything like that installed).
The errors were are follows:

ERROR: Error installing rubynode:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
extconf.rb
==================== ERROR =====================
Please set RUBY_SOURCE_DIR to the source path of ruby 1.8.7
(2009-06-12)!
================================================

Could anyone tell me how to fix this? I don't know where I can set
RUBY_SOURCE_DIR, or what I should set it to. I did find another post on
this forum (http://www.ruby-forum.com/topic/143021) with the same error,
but it's not clear to me how that was resolved.

Failing that, perhaps it I could just uninstall this gem. Could anyone
tell me if I'm actually likely to need it for Rails development?

Thanks,
Richard
 
R

Ryan Davis

Failing that, perhaps it I could just uninstall this gem. Could anyone
tell me if I'm actually likely to need it for Rails development?

No, you'll likely never need it for rails development. AFAIK, it isn't =
used as a dependency on any major libraries.=
 
S

Sora Harakami

Hi,

i think ruby's source isn't included in osx.

Could anyone tell me how to fix this? I don't know where I can set
RUBY_SOURCE_DIR, or what I should set it to. I did find another post on
this forum (http://www.ruby-forum.com/topic/143021) with the same error,
but it's not clear to me how that was resolved.

Build ruby yourself to solve this problem.

Download tarball of ruby and extract it,
and run the following line (replace some paths for your environment.):

cd /path/to/ruby-src
/configure --enable-shared --prefix=$HOME/local
make && make install

---
ruby will be installed to prefix ($HOME/local is in this example),
so you need to put the prefix path to $PATH in your shell.
And you must install rubygems also if you're using ruby1.8.x .

Thanks,

sorah
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top