# Rubygem setup.rb failing

**URL:** <https://www.ruby-forum.com/t/rubygem-setup-rb-failing/79618>\
**Category:** Ruby\
**Created:** [December 17, 2006, 6:38am UTC](https://www.ruby-forum.com/t/rubygem-setup-rb-failing/79618 "2006-12-17T06:38:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [December 17, 2006, 6:38am UTC](https://www.ruby-forum.com/t/rubygem-setup-rb-failing/79618/1 "2006-12-17T06:38:02Z")

</div>

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:in`gem\_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:in`gem\_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:in`exec\_install’ from setup.rb:705:in `invoke' from setup.rb:674:in`invoke’ 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

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [December 17, 2006, 7:01am UTC](https://www.ruby-forum.com/t/rubygem-setup-rb-failing/79618/2 "2006-12-17T07:01:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [December 17, 2006, 7:13am UTC](https://www.ruby-forum.com/t/rubygem-setup-rb-failing/79618/3 "2006-12-17T07:13:50Z")

</div>

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](http://sciruby.codeforpeople.com/sr.cgi/HowTosAndTutorials/CompilationFuTutorial)

regards.

-a

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [December 17, 2006, 8:39am UTC](https://www.ruby-forum.com/t/rubygem-setup-rb-failing/79618/4 "2006-12-17T08:39:56Z")

</div>

On 12/16/06, Michael S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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/](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.
