Skip to content
  • About
  • Friends
  • About
  • Friends
The Blog of Philippmy personal Site of Things
  • About
  • Friends
Written by Philipp on 2008-07-03

Install Gems (Ruby with zlib) on Nexenta (GnuSolaris) 1.01

nexenta . ruby . Tech

Next in the row is the installation of the ruby gems package.
So it should be easy… just following the instructions.
So…..

root@sunny:~# wget http://rubyforge.org/frs/download.php/38647/rubygems-1.2.0.zip
root@sunny:~# unzip rubygems-1.2.0.zip
root@sunny:~# cd rubygems-1.2.0
root@sunny:~# ruby setup.rb config
./lib/rubygems/spec_fetcher.rb:1:in `require’: no such file to load — zlib (LoadError)
from ./lib/rubygems/spec_fetcher.rb:1
from ./lib/rubygems/source_index.rb:10:in `require’
from ./lib/rubygems/source_index.rb:10
from ./lib/rubygems.rb:767:in `require’
from ./lib/rubygems.rb:767
from setup.rb:22:in `require’
from setup.rb:22

Welcom to error world ;-).
Okay…. should be easy to solve:

root@sunny:~# apt-get install libzlib-ruby zlib1g-dev

or for 64bit Plattforms:

root@sunny:~# apt-get install libzlib-ruby lib64z1-dev

But still the same Error!
Finally i found something in the Weblog of Lucas Chan.
Hm its about readhat/centos…. okay why not.
Just go to the ruby sources:

root@sunny:~# cd /usr/local/src/ruby-1.8.6-p110/
root@sunny:~# cd ext/zlib
root@sunny:~# ruby ruby extconf.rb –with-zlib-include=/usr/include –with-zlib-lib=/usr/lib
checking for deflateReset() in -lz… yes
checking for zlib.h… yes
checking for kind of operating system… Unix
creating Makefile

root@sunny:~# make
root@sunny:~# make install

and finally:

root@sunny:~# cd /usr/local/src/rubygems-1.2.0/
root@sunny:~# ruby setup.rb config
….
== Thanks

Keep those gems coming!

— Jim & Chad & Eric (for the RubyGems team)

Again: something learned!

Blogged with the Flock Browser

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook

Like this:

Like Loading...

Related

6 comments

  • mark thomas has written: 2008-07-05 at 13:46

    Thanks for posting that. I found your site when I googled for the error. I had the same issue.
    can you tell me exactly what your command did?
    root@sunny:~# ruby extconf.rb ruby extconf.rb –with-zlib-include=/usr/include –with-zlib-lib=/usr/lib

    thanks
    Mark

  • Philipp Haussleiter has written: 2008-07-05 at 14:53

    Hello Mark,

    there was an error:
    the line should be:
    root@sunny:~# ruby ruby extconf.rb –with-zlib-include=/usr/include –with-zlib-lib=/usr/lib

    It just sets the lib and header path for the zlib extension.
    Normally if you use apt-get you should already have this extension delivered with your ruby package. In my case, i compiled Ruby myself. The gem installer uses the zlib extension so i had to compile this extension manually.

  • Anton has written: 2008-08-09 at 23:44

    Wow, thanks, it helped!

  • Aric has written: 2008-09-10 at 05:00

    Thanks a lot for this post, it definitely helped.

  • Letícia has written: 2009-04-28 at 05:10

    OMG, thank you so much! I was getting crazy about this zlib stuff!

Leave a ReplyCancel reply

Archives

  • August 2025
  • November 2023
  • February 2023
  • January 2023
  • April 2020
  • January 2018
  • December 2017
  • May 2017
  • February 2016
  • September 2015
  • December 2014
  • August 2014
  • June 2014
  • March 2014
  • February 2014
  • September 2013
  • August 2013
  • July 2013
  • November 2012
  • October 2012
  • September 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • January 2011
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • January 2010
  • November 2009
  • October 2009
  • September 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • September 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • February 2006
  • January 2006

Calendar

July 2008
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  
« Jun   Aug »

Categories

  • Bash
  • Bochum
  • Build
  • CCC
  • CLI
  • Coderwall
  • Coventry
  • DB
  • Edu
  • Freenas
  • Gitlab
  • Graphics
  • Hacking
  • iOS
  • Java
  • Javascript
  • Mac
  • NAS
  • Network
  • nexenta
  • Perl
  • Personal
  • PHP
  • Play! Framework
  • Proxmox
  • ruby
  • Ruby on Rails
  • Security
  • SmartOS
  • Snippets
  • Sound
  • Tech
  • Testing
  • Tooling
  • Twitter
  • UI
  • Uncategorized
  • Video
  • Virtualisierung
  • ZFS

Copyright The Blog of Philipp 2026 | Theme by ThemeinProgress | Proudly powered by WordPress

%d