Ruby on Rails
Saturday, January 21, 2012
On Sat, Jan 21, 2012 at 11:30 PM, Felipe Pieretti Umpierre <lists@ruby-forum.com> wrote:
$ which ruby # if it is a symlink, follow it also
-- Ok, but, when I try with 'gem install rails'
felipe@Felipe:~$ gem install rails
ERROR: Loading command: install (LoadError)felipe@Felipe:~$
no such file to load -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
some lib are missing, but I put the command
and was all updated
sudo apt-get install zlib1g zlib1g-dev
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment