Hi All,
I am new in Ruby.This is my first post in this forum and hoping
my problem will get resolved.
[[email protected] ~]# which ruby
/usr/bin/ruby
[[email protected] ~]# which gem
/usr/bin/which: no gem in
(/usr/kerberos/sbin:/usr/kerberos/bin:/usr/bin:/bin:/usr/local/nz/bin:)
[[email protected] ~]# gem list
bash: gem: command not found
[[email protected] ~]# ruby -v
ruby 1.8.5 (2006-08-25) [x86_64-linux]
How I can install gems? I want to install gems. I am able to run all
ruby scripts like test.rb.
How I can install gems? I want to install gems. I am able to run all
ruby scripts like test.rb.
Please help me out.
1.) Download a copy of RubyGems’ .tgz release from http://rubyforge.org/frs/?group_id=126&release_id=46225
2.) Extract someplace convenient.
3.) run “ruby setup.rb” in the directory you extracted RubyGems to.
This step likely needs root permissions.
4.) Verify RubyGems is installed with “gem -v” (or so).
P.S.: IIRC, 1.8.5 and 1.8.6 are EOL, with only 1.8.7 receiving
(security) patches for a few more years, so you should upgrade to
1.8.7 at least, and 1.9.2 (which includes RubyGems!) if possible.
Thanks for your reply.
I am getting below error when trying to run setup.rb file.
Well, you’ll have to try different releases of RubyGems until you find
one that works with Ruby 1.8.5. It’d be be better if you could somehow
upgrade to 1.8.7 at a minimum, though.
Thanks for your reply.
I am getting below error when trying to run setup.rb file.
[[email protected] rubygems-1.8.10]# ruby setup.rb
./lib/rubygems.rb:332: warning: parenthesize argument(s) for future
version
./lib/rubygems.rb:514: warning: parenthesize argument(s) for future
version
./lib/rubygems.rb:30:in require': ./lib/rubygems/deprecate.rb:53: syntax error (SyntaxError) define_method name do |*args, &block| # TODO: really works on 1.8.7? ^ ./lib/rubygems/deprecate.rb:54: syntax error ./lib/rubygems/deprecate.rb:63: syntax error ./lib/rubygems/deprecate.rb:68: syntax error from ./lib/rubygems.rb:30 from setup.rb:27:inrequire’
from setup.rb:27
Debian based: aptitude (or apt-get) are your best bet, RHEL/Suse and
derivatives usually use yum, while many Rubyists on *NIX like to use rvm.beginrescueend.com to manage Ruby installs (and their gems).
Actually - some people still use 1.8.6 for 1.8 features and some use
1.8.7
which is in-between 1.8 and 1.9 and then 1.9 users probably mostly use
1.9.2.