Installing Rubygems manually -'ruby setup.rb' fails PLEASE HELP!
Hello
After having tried the various methods such as:
$ gem update --system $ gem install rubygems-update
and getting:
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302
I read here that I need to update rubygems, so tried to do it
manually. But when I download and run
ruby setup.rb
I get:
./lib/rubygems.rb:334: warning: parenthesize argument(s) for future version ./lib/rubygems.rb:511: warning: parenthesize argument(s) for future version ./lib/rubygems/dependency_list.rb:8:in `require': ./lib/rubygems/deprecate.rb:53: syntax error, unexpected ',', expecting '|' (SyntaxError)
define_method name do |*args, &block| # TODO: really works on 1.8.7?
^
./lib/rubygems/deprecate.rb:54: syntax error, unexpected tCONSTANT, expecting '}' ./lib/rubygems/deprecate.rb:63: syntax error, unexpected kEND, expecting '}' ./lib/rubygems/deprecate.rb:68: syntax error, unexpected kEND, expecting '}' from ./lib/rubygems/dependency_list.rb:8
from ./lib/rubygems.rb:29:in `require'
from ./lib/rubygems.rb:29
from setup.rb:27:in `require'
from setup.rb:27
and no go with rubygems.
I have tried removing rubygems by this method: http://lists.rubyonrails.org/pipermail/rails/2006-May/038251.html
but still no go, and now I have no rubygems at all.
I have recently upgraded to Snow Leopard and apparently am running ruby v.1.8.6
Any ideas???
Support Staff 2 Posted by Eric Hodel on 05 Jul, 2011 11:32 PM
RubyGems 1.4 and newer only run on Ruby 1.8.7.
Snow Leopard ships with Ruby 1.8.7.
You will either need to:
Use Ruby 1.8.7 (or newer) from Snow Leopard
Build Ruby 1.8.7 (or newer) and install RubyGems on it
Download RubyGems 1.3.7 from Rubyforge:
3 Posted by Andrew on 06 Jul, 2011 01:14 AM
Thanks I have done the above using Macports and have it working now - I thought when I upgraded to Snow Leopard it would have given me the appropriate Ruby versions but it seems not to have done - and kept my older version of Ruby 1.8.6 - does 1.8.7 only come with a clean install of Snow Leopard??
Support Staff 4 Posted by Eric Hodel on 06 Jul, 2011 01:51 AM
Apple's ruby ships in /usr/bin.
If you've adjusted your path before upgrading to Snow Leopard you may have been using a ruby from /usr/local/bin or /opt/local/bin. The upgrade won't undo changes you've made to your $PATH.
You can use
gem envto see where ruby lives.