Rubygem setup.rb failing

I’m having to setup multiple machines, and I’ve got a new problem (at
least each time my problem is new … I’m not repeating the old ones)

I’ve compiled ruby and installed it - I’ve put it into /usr/local/bin,
if that’s a problem, I can redo it to whereever. Note that I didn’t see
any errors in the ruby compile / install

Next was an attempt to install rubygems. I ran
ruby setup.rb

from the directory with rubygems. It starts out OK, then I get

/usr/local/lib/ruby/1.8/i686-linux/syck.so:
/usr/local/lib/ruby/1.8/i686-linux/syck.so: undefined symbol:
__stack_chk_fail_local - /usr/local/lib/ruby/1.8/i686-linux/syck.so
(LoadError)
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' from /usr/local/lib/ruby/1.8/yaml/syck.rb:5 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' from /usr/local/lib/ruby/1.8/yaml.rb:11 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:6 ... 11 levels... from setup.rb:887:inexec_install’
from setup.rb:705:in invoke' from setup.rb:674:ininvoke’
from setup.rb:1352

Either I’m missing something - or my ruby install wasn’t as clean as it
looked. I looked at the source, and I thought that all I needed to do
was install the yaml and syck files onto the machine (I’m running
kubuntu) - but that didn’t seem to do any good.

Would someone be so kind as to help here.

Thanks in advance
—Michael

Michael S. wrote:


Either I’m missing something - or my ruby install wasn’t as clean as it
looked. I looked at the source, and I thought that all I needed to do
was install the yaml and syck files onto the machine (I’m running
kubuntu) - but that didn’t seem to do any good.

I’ve installed ruby and rubygems on Kubuntu recently. No links handy
off the top of my head, but Google for ruby+rails+rubygems+ubuntu.
There are few sites that give very nice apt-get instructions to ensure
you can correctly compile Ruby and get gems running.

The default install on Unbuntu is lacking some things needed by
Ruby/Rubygems. (zlib comes to mind, and I had a problem with ssh
recently as well.)


James B.

“Inside every large system there’s a small system trying to get out”.
- Chet Hendrickson

On Sun, 17 Dec 2006, Michael S. wrote:

from the directory with rubygems. It starts out OK, then I get
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require’
was install the yaml and syck files onto the machine (I’m running
kubuntu) - but that didn’t seem to do any good.

Would someone be so kind as to help here.

Thanks in advance
—Michael

i’m guessing you have more that one ruby installs on your system and
compiled
without setting LD_RUN_PATH or LD_LIBRARY_PATH.

for any c code you compile you always want to consider these two env
vars and
their effect on ld.so.

if installing into /usr/local/bin you’d want to do this

export LD_RUN_PATH=/usr/local/lib
export LD_LIBRARY_PATH=/usr/local/lib

./configure --prefix=/usr/local && make && sudo make install

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

and ruby should work. to confirm that this might be your problem try

which -a ruby

if you see two the above is likely. man ld.so.conf or google
LD_RUN_PATH/LD_LIBRARY_PATH for more.

this is incomplete, but it might shed some light

http://sciruby.codeforpeople.com/sr.cgi/HowTosAndTutorials/CompilationFuTutorial

regards.

-a

On 12/16/06, Michael S. [email protected] wrote:

from the directory with rubygems. It starts out OK, then I get
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require’
was install the yaml and syck files onto the machine (I’m running

http://www.linuxlooney.com/past/2006/8/15/installing_ruby_and_rails_on/

I wrote this up, based on my experience. I hope it helps.

Cheers,

Aaron K.