On Sat, Jan 21, 2012 at 11:30 PM, Felipe Pieretti Umpierre <
li...@ruby-forum.com> wrote:

> Ok, but, when I try with 'gem install rails'
>
> felipe@Felipe:~$ gem install rails
> ERROR:  Loading command: install (LoadError)
>    no such file to load -- zlib
> ERROR:  While executing gem ... (NameError)
>    uninitialized constant Gem::Commands::InstallCommand
> felipe@Felipe:~$
>
>
> some lib are missing, but I put the command
>
> sudo apt-get install zlib1g zlib1g-dev
>
> and was all updated
>

>From which source did you install your ruby and rubygems?
Where are they installed?

Could you run these commands and show the output please.

$ ruby -v

$ which ruby # if it is a symlink, follow it also

$ gem -v

$ which gem # if it is a symlink follow it also

$ echo $PATH

And again ... even if you have started with manual install
of Ruby etc, you can still go to rvm (and inside rvm you
can use `$ rvm system` to go back to the system installed
ruby if you need to; I demonstrate that below).

As reference, on my system (rvm on Ubuntu 11.10):

peterv@ASUS:~$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
peterv@ASUS:~$ which ruby
/home/peterv/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
peterv@ASUS:~$ gem -v
1.8.10
peterv@ASUS:~$ which gem
/home/peterv/.rvm/rubies/ruby-1.9.3-p0/bin/gem
peterv@ASUS:~$ echo $PATH
/home/peterv/.rvm/gems/ruby-1.9.3-p0/bin:/home/peterv/.rvm/gems/ruby-1.9.3-p0@global
/bin:/home/peterv/.rvm/rubies/ruby-1.9.3-p0/bin:/home/peterv/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

Falling back (what I normally never do anymore) to system ruby:

peterv@ASUS:~$ rvm use system
Now using system ruby.
peterv@ASUS:~$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
peterv@ASUS:~$ which ruby
/usr/bin/ruby
peterv@ASUS:~$ gem -v
1.3.7
peterv@ASUS:~$ which gem
/usr/bin/gem
peterv@ASUS:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/peterv/.rvm/bin

HTH,

Peter

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to