tag:help.rubygems.org,2010-01-19:/discussions/problems/661-installing-rubygems-manually-ruby-setuprb-fails-please-helpRubyGems.org: Discussion 2018-10-18T19:51:07Ztag:help.rubygems.org,2010-01-19:Comment/84156902011-07-05T23:22:46Z2011-07-05T23:22:48ZInstalling Rubygems manually -'ruby setup.rb' fails PLEASE HELP!<div><p>Hello</p>
<p>After having tried the various methods such as:</p>
<p>$ gem update --system $ gem install rubygems-update</p>
<p>and getting:</p>
<p>ERROR: While executing gem ... (Gem::RemoteSourceException)</p>
<pre>
<code>HTTP Response 302</code>
</pre>
<p>I read here that I need to update rubygems, so tried to do it
manually. But when I download and run<br>
ruby setup.rb<br>
I get:</p>
<p>./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)</p>
<pre>
<code> define_method name do |*args, &block| # TODO: really works on 1.8.7?
^</code>
</pre>
<p>./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</p>
<pre>
<code>from ./lib/rubygems.rb:29:in `require'
from ./lib/rubygems.rb:29
from setup.rb:27:in `require'
from setup.rb:27</code>
</pre>
<p>and no go with rubygems.</p>
<p>I have tried removing rubygems by this method: <a href=
"http://lists.rubyonrails.org/pipermail/rails/2006-May/038251.html">
http://lists.rubyonrails.org/pipermail/rails/2006-May/038251.html</a></p>
<p>but still no go, and now I have no rubygems at all.</p>
<p>I have recently upgraded to Snow Leopard and apparently am
running ruby v.1.8.6</p>
<p>Any ideas???</p></div>Andrewtag:help.rubygems.org,2010-01-19:Comment/84156902011-07-05T23:32:00Z2011-07-05T23:32:00ZInstalling Rubygems manually -'ruby setup.rb' fails PLEASE HELP!<div><p>RubyGems 1.4 and newer only run on Ruby 1.8.7.</p>
<p>Snow Leopard ships with Ruby 1.8.7.</p>
<p>You will either need to:</p>
<p>Use Ruby 1.8.7 (or newer) from Snow Leopard</p>
<p>Build Ruby 1.8.7 (or newer) and install RubyGems on it</p>
<p>Download RubyGems 1.3.7 from Rubyforge:</p>
<pre>
<code>http://rubyforge.org/frs/?group_id=126</code>
</pre></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/84156902011-07-06T01:14:00Z2011-07-06T01:14:03ZInstalling Rubygems manually -'ruby setup.rb' fails PLEASE HELP!<div><p>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??</p></div>Andrewtag:help.rubygems.org,2010-01-19:Comment/84156902011-07-06T01:51:09Z2011-07-06T01:51:09ZInstalling Rubygems manually -'ruby setup.rb' fails PLEASE HELP!<div><p>Apple's ruby ships in /usr/bin.</p>
<p>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.</p>
<p>You can use <code>gem env</code> to see where ruby lives.</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/84156902015-11-10T21:59:02Z2015-11-10T21:59:03ZInstalling Rubygems manually -'ruby setup.rb' fails PLEASE HELP!<div><p>I see the same error,</p>
<p>/home/user/rubygems-2.0.7/lib/rubygems/deprecate.rb:53: syntax
error (SyntaxError) define_method name do |*args, &block| #
TODO: really works on 1.8.7?</p>
<p>I am using ruby 2.0.0. Please help.</p></div>Prajaktatag:help.rubygems.org,2010-01-19:Comment/84156902015-11-10T22:52:27Z2015-11-10T22:52:28ZInstalling Rubygems manually -'ruby setup.rb' fails PLEASE HELP!<div><p>Never mind. It was an issue with my path.</p></div>Prajakta