[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

RubyGems - update made a mess - help needed with Windows

Becca Girl

7/31/2008 9:39:00 PM

I just did a system update of RubyGems and it just broke my rake test. I
get a message saying that there is no such file to load ../initializer.

I'm wondering what the best thing to do would be. This project is in
svn, but I don't think that just dropping the rails directory and
reverting will solve the problem since there are a number of files that
sit in the ruby\bin directory that are part of ruby, not svn.

So how can I clean up the mess that I just made?

Thanks!!!!
--
Posted via http://www.ruby-....

15 Answers

Luis Lavena

7/31/2008 10:16:00 PM

0

On Jul 31, 11:39 pm, Becca Girl <csch...@yahoo.com> wrote:
> I just did a system update of RubyGems and it just broke my rake test. I
> get a message saying that there is no such file to load ../initializer.
>
> I'm wondering what the best thing to do would be.  This project is in
> svn, but I don't think that just dropping the rails directory and
> reverting will solve the problem since there are a number of files that
> sit in the ruby\bin directory that are part of ruby, not svn.
>
> So how can I clean up the mess that I just made?
>

Ok, first let's shed some light into this, with simple questions.

1) Which version of Ruby (ruby -v) you have installed?

2) Which version of Rails was your application built with (you can
check that into config/environement.rb)

3) Did RubyGems system update succeed? (gem update --system). can you
provide your gem environment? (gem env)

4) please indicate the version of Rails gem you have now installed
(gem list rails)

What you broke is your environment, not your application code, unless
you committed some changes related to the rails gem updates.

With the previous information we can be more helpful, without we will
be guessing.

Regards,
--
Luis Lavena

Becca Girl

7/31/2008 10:26:00 PM

0

Luis Lavena wrote:

Thanks for the help. Notes are below.

> 1) Which version of Ruby (ruby -v) you have installed?

ruby 1.8.5


>
> 2) Which version of Rails was your application built with (you can
> check that into config/environement.rb)

Rails 2.1


>
> 3) Did RubyGems system update succeed? (gem update --system). can you
> provide your gem environment? (gem env)

I believe that the gem update worked, but if I do 'gem env' I get
"unititialized constant Gem::GemRunner (NameError)


>
> 4) please indicate the version of Rails gem you have now installed
> (gem list rails)
>

Same error as above.


> What you broke is your environment, not your application code, unless
> you committed some changes related to the rails gem updates.

Yes, I believe my environment is broken, not the code.
>



THANKS Again for your help. So very much appreciated!!!!!

--
Posted via http://www.ruby-....

matu

7/31/2008 10:43:00 PM

0

Becca Girl wrote:

> "unititialized constant Gem::GemRunner (NameError)

in /usr/bin/gem add require 'rubygems/gem_runner' after require 'rubygems'

Luis Lavena

8/1/2008 6:05:00 AM

0

On Aug 1, 12:25 am, Becca Girl <csch...@yahoo.com> wrote:
> Luis Lavena wrote:
>
> Thanks for the help.  Notes are below.
>
> > 1) Which version of Ruby (ruby -v) you have installed?
>
> ruby 1.8.5
>
>
>
> > 2) Which version of Rails was your application built with (you can
> > check that into config/environement.rb)
>
> Rails 2.1
>
>
>
> > 3) Did RubyGems system update succeed? (gem update --system). can you
> > provide your gem environment? (gem env)
>
> I believe that the gem update worked, but if I do 'gem env' I get
> "unititialized constant Gem::GemRunner (NameError)
>
>
>
> > 4) please indicate the version of Rails gem you have now installed
> > (gem list rails)
>
> Same error as above.
>
> > What you broke is your environment, not your application code, unless
> > you committed some changes related to the rails gem updates.
>
> Yes, I believe my environment is broken, not the code.
>
>

Ok, first it seems the application was not started by you, but you
just checkout it, right? so we need to fix the rubygems stuff.

1) Download rubygems-1.2.0.zip file from RubyForge:

http://rubyforge.org/frs/?group_id=126&releas...

2) Extract the package and from the command prompt, inside the folder
run:

ruby setup.rb install

That should overwrite the installed rubygems with this one.

3) Go to into your Ruby/bin folder (usually C:\Ruby\bin or C:\Program
Files\Ruby\bin) and look for all the scripts named "gem", if you had
1.8.5, you should have:

gem
gem.bat
gem.cmd

Please remove the gem.cmd file to avoid conflicts.

4) RubyGems should be working now.

>
> THANKS Again for your help.  So very much appreciated!!!!!
>

HTH,
--
Luis Lavena

Becca Girl

8/1/2008 2:10:00 PM

0

Luis Lavena wrote:
> 4) RubyGems should be working now.
>


Thanks for the great, great instructions and help. So now, if I run
'rake test', the message that I get is rake.bat:24: undefined method
'require_gem' for main:Object (NoMethodError)

Any thoughts?
--
Posted via http://www.ruby-....

Ryan Davis

8/1/2008 7:07:00 PM

0


On Aug 1, 2008, at 07:09 , Becca Girl wrote:

> Luis Lavena wrote:
>> 4) RubyGems should be working now.
>>
>
>
> Thanks for the great, great instructions and help. So now, if I run
> 'rake test', the message that I get is rake.bat:24: undefined method
> 'require_gem' for main:Object (NoMethodError)

require_gem was deprecated long long ago... that must be an old
rake.bat. I suggest nuking it and another loop through Luis'
instructions to ensure you get a fresh copy and everything is happy.

Ryan Davis

8/1/2008 7:08:00 PM

0


On Jul 31, 2008, at 23:04 , Luis Lavena wrote:

> Ok, first it seems the application was not started by you, but you
> just checkout it, right? so we need to fix the rubygems stuff.
>
> 1) Download rubygems-1.2.0.zip file from RubyForge:
>
> http://rubyforge.org/frs/?group_id=126&releas...
>
> 2) Extract the package and from the command prompt, inside the folder
> run:
>
> ruby setup.rb install
>
> That should overwrite the installed rubygems with this one.
>
> 3) Go to into your Ruby/bin folder (usually C:\Ruby\bin or C:\Program
> Files\Ruby\bin) and look for all the scripts named "gem", if you had
> 1.8.5, you should have:
>
> gem
> gem.bat
> gem.cmd
>
> Please remove the gem.cmd file to avoid conflicts.
>
> 4) RubyGems should be working now.

This is a really good fix-it list for windows users. Luis, can you add
this to the README or a FAQ-WINDOWS or something?


Becca Girl

8/1/2008 7:30:00 PM

0

Ryan Davis wrote:

> require_gem was deprecated long long ago... that must be an old
> rake.bat. I suggest nuking it and another loop through Luis'
> instructions to ensure you get a fresh copy and everything is happy.


Hi Ryan -

I don't want to make another mess, so could you please be specific as to
what I need to remove from my system to get this all to work? Do I
simply remove the rake.bat file? Then what's next to get rake working?

Thanks!

--
Posted via http://www.ruby-....

Ryan Davis

8/1/2008 8:08:00 PM

0


On Aug 1, 2008, at 12:29 , Becca Girl wrote:

> Ryan Davis wrote:
>
>> require_gem was deprecated long long ago... that must be an old
>> rake.bat. I suggest nuking it and another loop through Luis'
>> instructions to ensure you get a fresh copy and everything is happy.
>
> I don't want to make another mess, so could you please be specific
> as to
> what I need to remove from my system to get this all to work? Do I
> simply remove the rake.bat file? Then what's next to get rake
> working?

I don't use windows... buyer beware.

I think you should remove that bat file and anything else rubygems in
the same directory and repeat steps 2-3 in Luis' instructions. If the
problem persists, then something is legitimately fubar in rubygems (I
doubt it--Luis has been awesome helping with windows support).

Becca Girl

8/1/2008 9:27:00 PM

0

Ryan Davis wrote:

> I don't use windows... buyer beware.
>
> I think you should remove that bat file and anything else rubygems in
> the same directory and repeat steps 2-3 in Luis' instructions. If the
> problem persists, then something is legitimately fubar in rubygems (I
> doubt it--Luis has been awesome helping with windows support).

This is the list of files that appear to be related to rubygems. Do I
delete all of these files and then repeat steps 2-4?

gem
gem.bat
gemhelp.bat
gemlock
gemlock.bat
gemlock.cmd
gemri
gemri.bat
gemri.cmd
gemwhich
gemwhich.bat
gemwhich.cmd
gem_mirror
gem_mirror.bat
gem_mirror.cmd
gem_server
gem_server.bat
gem_server.cmd
--
Posted via http://www.ruby-....