Discussion:
Victor needs help installing Rubygems on ubuntu 6.06
Victor Soich
2007-05-08 20:10:19 UTC
Permalink
Hi all,

I just successfully installed and compiled from source Ruby on ubuntu
6.06 Yay! When I type

ruby --version at the command line I get:


***@tiberius:~$ ruby --version
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux]
***@tiberius:~$

so, I think I did everything properly. I am able to start irb sessions!!


Anyways, I have my ruby 1.8.6 files in

/home/vsoich/ruby-1.8.6



I have the file rubygems-0.9.2.tgz located in

/home/vsoich



In /home/vsoich I executed the commanded

tar -xzvf rubygems-0.9.2.tgz


and everything seem to work fine.
Then I switched to

/home/vsoich/rubygems-0.9.2



and executed the command

sudo ruby setup.rb

and things didn't go so well. I expected to get the response
Successfully built RubyGem

but instead got the following extensive output:


***@tiberius:~/rubygems-0.9.2$ sudo ruby setup.rb
Password:
---> bin
<--- bin
---> lib
---> lib/rbconfig
<--- lib/rbconfig
---> lib/rubygems
<--- lib/rubygems
<--- lib
---> bin
<--- bin
---> lib
---> lib/rbconfig
<--- lib/rbconfig
---> lib/rubygems
<--- lib/rubygems
<--- lib
rm -f InstalledFiles
---> bin
mkdir -p /usr/local/bin/
install gem /usr/local/bin/
install gem_mirror /usr/local/bin/
install gem_server /usr/local/bin/
install gemlock /usr/local/bin/
install gemri /usr/local/bin/
install gemwhich /usr/local/bin/
install index_gem_repository.rb /usr/local/bin/
install update_rubygems /usr/local/bin/
<--- bin
---> lib
mkdir -p /usr/local/lib/ruby/site_ruby/1.8/
install gemconfigure.rb /usr/local/lib/ruby/site_ruby/1.8/
install rubygems.rb /usr/local/lib/ruby/site_ruby/1.8/
install ubygems.rb /usr/local/lib/ruby/site_ruby/1.8/
---> lib/rbconfig
mkdir -p /usr/local/lib/ruby/site_ruby/1.8/rbconfig
install datadir.rb /usr/local/lib/ruby/site_ruby/1.8/rbconfig
<--- lib/rbconfig
---> lib/rubygems
mkdir -p /usr/local/lib/ruby/site_ruby/1.8/rubygems
install builder.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install cmd_manager.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install command.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install config_file.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install custom_require.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install dependency_list.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install doc_manager.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install format.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install gem_commands.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install gem_open_uri.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install gem_openssl.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install gem_runner.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install installer.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install old_format.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install open-uri.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install package.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install remote_fetcher.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install remote_installer.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install rubygems_version.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install security.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install server.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install source_index.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install source_info_cache.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install source_info_cache_entry.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install specification.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install timer.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install user_interaction.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install validator.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install version.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
<--- lib/rubygems
<--- lib
/usr/local/lib/ruby/1.8/net/protocol.rb:21:in `require': no such file
to load -- socket (LoadError)
from /usr/local/lib/ruby/1.8/net/protocol.rb:21
from /usr/local/lib/ruby/1.8/net/http.rb:28:in `require'
from /usr/local/lib/ruby/1.8/net/http.rb:28
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:1:in
`require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:1
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:8:in
`require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:8
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:501:in `require'
... 7 levels...
from setup.rb:894:in `exec_install'
from setup.rb:712:in `invoke'
from setup.rb:681:in `invoke'
from setup.rb:1359
***@tiberius:~/rubygems-0.9.2$







I don't know what the above output means.
When I type gem -v at the command line I get:




***@tiberius:~/rubygems-0.9.2$ gem -v
/usr/local/lib/ruby/1.8/net/protocol.rb:21:in `require': no such file
to load -- socket (LoadError)
from /usr/local/lib/ruby/1.8/net/protocol.rb:21
from /usr/local/lib/ruby/1.8/net/http.rb:28:in `require'
from /usr/local/lib/ruby/1.8/net/http.rb:28
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:1:in
`require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:1
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:8:in
`require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:8
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:501:in `require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:501
from /usr/local/bin/gem:9:in `require'
from /usr/local/bin/gem:9
***@tiberius:~/rubygems-0.9.2$



Pleas help me get RubyGem to work. I then want to get Rails working.

Sincerely,
Victor Soich
Devin Ben-Hur
2007-05-08 20:32:32 UTC
Permalink
Post by Victor Soich
/usr/local/lib/ruby/1.8/net/protocol.rb:21:in `require': no such file
to load -- socket (LoadError)
from /usr/local/lib/ruby/1.8/net/protocol.rb:21
protocol.rb is requiring 'socket'. Usually you'll have a file socket.so
under /usr/local/lib/ruby/1.8/[host-arch]

where [host-arch] is a directory name for your system architecture, eg:
i368-linux or x86_64-linux

You say you installed ruby in /home/vsoich/ruby-1.8.6, so, perhaps the
socket.so shared lib got placed relative to there instead of in
/usr/local/lib/ruby/1.8/. You may need to add a directory to
environment variable RUBYLIB to let ruby find your local ruby libraries.

--
Devin Ben-Hur 503/860-4114 mailto:***@ben-hur.net

"Startups are basically comedies, or at least seem so in retrospect."
-- Paul Graham
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.467 / Virus Database: 269.6.6/794 - Release Date: 5/8/2007 2:23 PM
Tim Dysinger
2007-05-08 20:35:05 UTC
Permalink
Victor,

This is how I install it on Ubuntu or Debian:

sudo apt-get install \
build-essential libreadline5-dev libssl-dev \
mysql-server libmysqlclient15-dev \

cd /usr/local/src

curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.gz
tar xvzf ruby-1.8.6.tar.gz
cd ruby-1.8.6
./configure --enable-pthread
make
sudo make install
cd ..

curl -O http://files.rubyforge.mmmultiworks.com/rubygems/
rubygems-0.9.2.tgz
tar xzvf rubygems-0.9.2.tgz
cd rubygems-0.9.2
sudo ruby setup.rb
cd ..

-Tim

Loading...