Simply Rails 2 Installation Errors

I bought the book Simply Rails 2 and I would like to follow along with everything so I can get the most out of it. I downloaded InstantRails as per the instructions, but when I enter the command

gem update --system

I get the following error message:

[B]ERROR: While executing gem … <Gem::RemoteSourceException>
HTTP Response 302 fetching[/B]

I have tried turning off the firewall and still no luck. I also tried just installing ruby via the one-click installer, but when I try to use cmd to check even if it’s installed –

C:\\> ruby -v

I get this error message:

‘C:\’ is not recognized as an internal or external command, operable program or batch file.

How can I fix either of these problems?

Hm I just typed the error message into Google and there seemed to be quite a bit showing up.

It seems to be a naming error bug which has been fixed. Apparently you need to update the whole Gems packaging setup thingie:

because that URL your Gems are trying to use is not correct. This has apparently hit various versions of Ruby including JRuby so I guess it was a pretty major bug.

Edit: if either of you do a Gems update and this fixes the problem, could you post an affirmation? It would be nice to know if just an update works, esp since it seems one of you is on Windows and the other on Linux. Thanks.

I’m having the same problem.

entering: sudo gem update --system

and getting

ERROR: While executing gem … (Gem::RemoteSourceException)
HTTP Response 302 fetching

That error message looks like you might be typing the “C:\>” part. That’s just the prompt. You should only be typing “ruby -v”. Can you try that and let us know what you see?

@Louis: Ah, yeah I get ruby version 1.8.6.

@Stomme: I have successfully updated ruby gems, thank you!!

I am having the same problem and error message. If as suggested this is a ‘bug’ in the books code, were do we get the correct code. Or were do we get the instructions to overcome the problem?

As long as you’re not confusing the command prompt to be part of the command, you may need to set your system path values so Windows can find Ruby.

It depends on where tou installed it, but if you look at your autoexec.bat file do you see lines something like

SET RUBYOPT=-rubygems



Thanks very much for your prompt reply and help, much appreciated!
No I did not confuse the command prompt as part of the command, typing only ‘gem update --system’. In case it matters I’m running Windows 7 64 bit on a Dell Laptop.
Next problem the ‘autoexec.bat’ file does not exist. I have run the setup twice on one machine and once on another, being very pedantic in following the books instructions. Windows can find only 3 ‘*.bat’ files.



I have attached a screen shot to show what I have typed and the result I get.

Any help greatfully recieved.

I don’t think Windows since XP has had autoexec.bat.

Try cygwin

:blush: :d’oh: I didn’t think of that possibilty. But there must be some way it figures out system paths no?

Something, I just remember running into stuff on teh interwebs stating there’s no autoexec.bat in XP back when I was trying to get Lynx to run on the Windows machine at work : )

I wonder if the author has an update for these folks, especially the ones running 64bit? The Ruby posted above seems all 32-bit oriented.