# ruby
cd ~/rn
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.gz
tar -xzvf ruby-1.9.1-p0.tar.gz
cd ~/rn/ruby-1.9.1-p0
./configure
make
make test
sudo make install
# zlib
cd ~/rn/ruby-1.9.1-p0/ext/zlib
sudo apt-get install zlib1g-dev
ruby extconf.rb --with-zlib-include=/usr/include --with-zlib-lib=/usr/lib
make
sudo make install
# gem
cd ~/rn
wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
tar -xzvf rubygems-1.3.1.tgz
cd rubygems-1.3.1
sudo ruby setup.rb
# fix ruby executable
cd ~/rn/ruby-1.9.1-p0
sudo make install
Thursday, April 02, 2009
Installing Ruby and RubyGems On Ubuntu 8.10
Subscribe to:
Post Comments (Atom)


1 comments:
I tried this and it looks like it partially works but when I try to do a list I get:
$ gem --version
1.3.1
$ gem list --local
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:1:in `require': no such file to load -- zlib (LoadError)
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/commands/query_command.rb:3:in `require'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/commands/query_command.rb:3:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/commands/list_command.rb:2:in `require'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/commands/list_command.rb:2:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:140:in `require'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:140:in `rescue in load_and_instantiate'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:132:in `load_and_instantiate'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:65:in `[]'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:118:in `find_command'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:104:in `process_args'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:75:in `run'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:39:in `run'
from /usr/local/bin/gem:24:in `<main>'
Any ideas? It looks like something with zlib and I'm not sure where to look to make sure it built correctly
Post a Comment