rubynode won't build on Leopard Ruby

R

Rob Sanheim

I'm trying to build rubynode on a macports installed Ruby on Leopard,
and failing. (I'm aware rubynode is one of the stock gems installed
in leopard, but its out of date and my whole dev world is in macports,
so I'd like to stay there)

I've tried grabbing the source for ruby p110, and setting the
environment var before installation as instructed in the error message
below. I inevitably hit further errors down the road. Any ideas?


rsanheim@ares:~$ ruby -v
ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-darwin9.0.0]

rsanheim@ares:~$ sudo gem install rubynode
Building native extensions. This could take a while...
ERROR: Error installing rubynode:
ERROR: Failed to build gem native extension.

/opt/local/bin/ruby extconf.rb install rubynode
==================== ERROR =====================
Please set RUBY_SOURCE_DIR to the source path of ruby 1.8.6 (2007-09-23)!
================================================

Gem files will remain installed in
/opt/local/lib/ruby/gems/1.8/gems/rubynode-0.1.5 for inspection.
Results logged to
/opt/local/lib/ruby/gems/1.8/gems/rubynode-0.1.5/ext/rubynode_ext/gem_make.out


thanks,
- Rob

http://robsanheim.com
http://thinkrelevance.com
 
D

Dominik Bathon

Hi Rob,

I'm trying to build rubynode on a macports installed Ruby on Leopard,
and failing. (I'm aware rubynode is one of the stock gems installed
in leopard, but its out of date and my whole dev world is in macports,
so I'd like to stay there)

I've tried grabbing the source for ruby p110, and setting the
environment var before installation as instructed in the error message
below. I inevitably hit further errors down the road. Any ideas?

I just had a similar request last week and as a result I released a new
version (0.1.5) with improved and more flexible version detection, which
should work with 1.8.6-p110. Could you verify that gem tries to install
that version. And if that isn't the case please try downloading the gem
manually and install it directly (gem install rubynode-0.1.5.gem).

I hope that helps.

Dominik
 
R

Rob Sanheim

Hi Rob,



I just had a similar request last week and as a result I released a new
version (0.1.5) with improved and more flexible version detection, which
should work with 1.8.6-p110. Could you verify that gem tries to install
that version. And if that isn't the case please try downloading the gem
manually and install it directly (gem install rubynode-0.1.5.gem).

I hope that helps.

Dominik

Hi Dominik

I verified that gem does bring down the latest 0.1.5 version. It
fails with the same error. I tried downloading the archive and
installing manually, and still no luck:


rsanheim@ares:~/Downloads$ sudo ruby rubynode-0.1.5/setup.rb
---> lib
<--- lib
---> ext
---> ext/rubynode_ext
/opt/local/bin/ruby
/Users/rsanheim/Downloads/rubynode-0.1.5/ext/rubynode_ext/extconf.rb
==================== ERROR =====================
Please set RUBY_SOURCE_DIR to the source path of ruby 1.8.6 (2007-09-23)!
================================================
rubynode-0.1.5/setup.rb:655:in `command': system("/opt/local/bin/ruby"
"/Users/rsanheim/Downloads/rubynode-0.1.5/ext/rubynode_ext/extconf.rb")
failed (RuntimeError)
from rubynode-0.1.5/setup.rb:660:in `ruby'
from rubynode-0.1.5/setup.rb:1238:in `extconf'
from rubynode-0.1.5/setup.rb:1230:in `config_dir_ext'
from rubynode-0.1.5/setup.rb:1532:in `__send__'
from rubynode-0.1.5/setup.rb:1532:in `traverse'
from rubynode-0.1.5/setup.rb:1549:in `dive_into'
from rubynode-0.1.5/setup.rb:1530:in `traverse'
from rubynode-0.1.5/setup.rb:1534:in `traverse'
... 8 levels...
from rubynode-0.1.5/setup.rb:991:in `exec_config'
from rubynode-0.1.5/setup.rb:812:in `invoke'
from rubynode-0.1.5/setup.rb:773:in `invoke'
from rubynode-0.1.5/setup.rb:1578

After switching to root and setting the ruby source dir env var again,
I get this new error when trying to do setup.rb:

ares:Downloads root# ruby rubynode-0.1.5/setup.rb
---> lib
<--- lib
---> ext
---> ext/rubynode_ext
/opt/local/bin/ruby
/Users/rsanheim/Downloads/rubynode-0.1.5/ext/rubynode_ext/extconf.rb
==================== ERROR =====================
/opt/local/lib/ruby/1.8/i686-darwin9.0.0/node.h
is different from
/Users/rsanheim/Downloads/ruby-1.8.6-p110/node.h

Please set RUBY_SOURCE_DIR to the source path of ruby 1.8.6 (2007-09-23)!
================================================
rubynode-0.1.5/setup.rb:655:in `command': system("/opt/local/bin/ruby"
"/Users/rsanheim/Downloads/rubynode-0.1.5/ext/rubynode_ext/extconf.rb")
failed (RuntimeError)
from rubynode-0.1.5/setup.rb:660:in `ruby'
from rubynode-0.1.5/setup.rb:1238:in `extconf'
from rubynode-0.1.5/setup.rb:1230:in `config_dir_ext'
from rubynode-0.1.5/setup.rb:1532:in `__send__'
from rubynode-0.1.5/setup.rb:1532:in `traverse'
from rubynode-0.1.5/setup.rb:1549:in `dive_into'
from rubynode-0.1.5/setup.rb:1530:in `traverse'
from rubynode-0.1.5/setup.rb:1534:in `traverse'
... 8 levels...
from rubynode-0.1.5/setup.rb:991:in `exec_config'
from rubynode-0.1.5/setup.rb:812:in `invoke'
from rubynode-0.1.5/setup.rb:773:in `invoke'
from rubynode-0.1.5/setup.rb:1578

thanks,
Rob

http://robsanheim.com
http://thinkrelevance.com
 
D

Dominik Bathon

Hi Rob,

After switching to root and setting the ruby source dir env var again,=
I get this new error when trying to do setup.rb:

ares:Downloads root# ruby rubynode-0.1.5/setup.rb
---> lib
<--- lib
---> ext
---> ext/rubynode_ext
/opt/local/bin/ruby
/Users/rsanheim/Downloads/rubynode-0.1.5/ext/rubynode_ext/extconf.rb
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ERROR =3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
/opt/local/lib/ruby/1.8/i686-darwin9.0.0/node.h
is different from
/Users/rsanheim/Downloads/ruby-1.8.6-p110/node.h

That seems to be the problem. macports probably somehow modifies the =

node.h it installs. Could you diff the two files?

As a workaround you could just copy =

/opt/local/lib/ruby/1.8/i686-darwin9.0.0/node.h to =

/Users/rsanheim/Downloads/ruby-1.8.6-p110/node.h and try to install the =
=

gem again:

RUBY_SOURCE_DIR=3D"/Users/rsanheim/Downloads/ruby-1.8.6-p110" gem instal=
l =

rubynode

But I still would really like to know what the difference between the tw=
o =

files is.

Thanks.

Dominik
 
R

Rob Sanheim

Hi Rob,




That seems to be the problem. macports probably somehow modifies the
node.h it installs. Could you diff the two files?

As a workaround you could just copy
/opt/local/lib/ruby/1.8/i686-darwin9.0.0/node.h to
/Users/rsanheim/Downloads/ruby-1.8.6-p110/node.h and try to install the
gem again:

RUBY_SOURCE_DIR="/Users/rsanheim/Downloads/ruby-1.8.6-p110" gem install
rubynode

But I still would really like to know what the difference between the two
files is.

Thanks.

Dominik

Hi Dominik

I posted the diff to pastie here:

http://pastie.caboo.se/155179

I was finally able to get it to install, though I had to switch to
root user, set the env var, then do 'gem install'...which installed
into the macports rubygem context like I wanted. I couldn't figure
out a way to set the required env var _and_ run gem install via sudo
only.

- Rob
 

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,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top