[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

irb not recognized in windows command line

Bert Ameche

7/5/2008 8:40:00 PM

I'm reading Beginning Ruby and followed the installation process , using
the one-click installer for Windows from Ruby Forge. I successfully
loaded fxri.
Received the following message after typing irb in the Windows command
prompt:

'irb' is not recognized as an internal or external command, operable
program or batch file.

Any suggestions on how to get this working will be greatly appreciated.
--
Posted via http://www.ruby-....

8 Answers

Bill Walton

7/5/2008 8:54:00 PM

0

Hi Bert,

Have you checked your PATH? It should contain an entry to ruby/bin. If
not, you'll need to add it. You might also check, just to make sure ruby
itself is operable, 'ruby -v' at the command line.

HTH,
Bill

----- Original Message -----
Bert Ameche wrote:

> I'm reading Beginning Ruby and followed the installation
> process, using the one-click installer for Windows from
> Ruby Forge. I successfully loaded fxri.
> Received the following message after typing irb in the Windows command
> prompt:
>
> 'irb' is not recognized as an internal or external command, operable
> program or batch file.
>
> Any suggestions on how to get this working will be greatly appreciated.
> --
> Posted via http://www.ruby-....
>
>


Bert Ameche

7/5/2008 9:14:00 PM

0

Bill Walton wrote:
> Hi Bert,
>
> Have you checked your PATH? It should contain an entry to ruby/bin. If
> not, you'll need to add it. You might also check, just to make sure
> ruby
> itself is operable, 'ruby -v' at the command line.
>
> HTH,
> Bill
>
> ----- Original Message -----

Thank you, Bill!

As you can probably tell, I'm not a programmer. I thought the paths
would be created automatically since the author of Beginning Ruby just
said to type irb at the command prompt to get irb(main):001:0> and this
will shows it's installed correctly.

When I enter Ruby commands into fxri, the expected results appear, so
that is set up correctly.

How would I create a path to ruby/bin? The books I have do not go into
paths unfortunately.

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

Bert Ameche

7/5/2008 9:35:00 PM

0

Bill Walton wrote:
> Hi Bert,
>
> Have you checked your PATH? It should contain an entry to ruby/bin. If
> not, you'll need to add it. You might also check, just to make sure
> ruby
> itself is operable, 'ruby -v' at the command line.
>
> HTH,
> Bill
>
> ----- Original Message -----

I forgot to mention that 'ruby -v' does not work either - get the same
message "ruby" is not recognized.
--
Posted via http://www.ruby-....

Tim Hunter

7/5/2008 10:11:00 PM

0

Bert Ameche wrote:
> I forgot to mention that 'ruby -v' does not work either - get the same
> message "ruby" is not recognized.

Your path has nothing to do specifically with Ruby. It's part of the way
Windows command prompt windows work. Your path is a list of directories.
When you enter a command at a command prompt, if the command is not
built into Windows itself (like dir, or chdir), then Windows searches
for the command in the directories listed in your path. You can make
temporary changes to your path using the SET PATH= command, or permanent
changes via the System tab in Control Panel.

When you install Ruby using the One-Click Installer, the installer
changes your path to include the directory in which it installs the ruby
and irb commands. That change does not affect existing command prompt
windows, it only affects command prompt windows that you start after
running the One-Click Installer. If you continue to use an command
prompt window that was open before you used the One-Click Installer,
then that window is still using the old path and therefore can't find
ruby or irb.

If you haven't started a new command prompt window since you installed
Ruby, close all of the command prompt windows you have open now and
start a new one. The new path will be in effect and you should be able
to run ruby and irb.

Here's more information about the path. It's for WinXP but I think
things are very similar in Vista:
http://www.computerhope.com/issues/ch....


--
RMagick: http://rmagick.ruby...
RMagick 2: http://rmagick.ruby...rmagick2.html

Joel VanderWerf

7/5/2008 10:13:00 PM

0

Bert Ameche wrote:
> I forgot to mention that 'ruby -v' does not work either - get the same
> message "ruby" is not recognized.

Maybe helpful, maybe not:

Are you using a command prompt window that was open before you installed
ruby? If so, try opening a new window. The environment variable settings
performed by the installer (such as the PATH to search for executable
programs) will not take effect retroactively.

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

Bert Ameche

7/5/2008 11:01:00 PM

0

Tim Hunter wrote:
> Bert Ameche wrote:
>> I forgot to mention that 'ruby -v' does not work either - get the same
>> message "ruby" is not recognized.
>
> Your path has nothing to do specifically with Ruby. It's part of the way
> Windows command prompt windows work. Your path is a list of directories.
> When you enter a command at a command prompt, if the command is not
> built into Windows itself (like dir, or chdir), then Windows searches
> for the command in the directories listed in your path. You can make
> temporary changes to your path using the SET PATH= command, or permanent
> changes via the System tab in Control Panel.
>
> When you install Ruby using the One-Click Installer, the installer
> changes your path to include the directory in which it installs the ruby
> and irb commands. That change does not affect existing command prompt
> windows, it only affects command prompt windows that you start after
> running the One-Click Installer. If you continue to use an command
> prompt window that was open before you used the One-Click Installer,
> then that window is still using the old path and therefore can't find
> ruby or irb.
>
> If you haven't started a new command prompt window since you installed
> Ruby, close all of the command prompt windows you have open now and
> start a new one. The new path will be in effect and you should be able
> to run ruby and irb.
>
> Here's more information about the path. It's for WinXP but I think
> things are very similar in Vista:
> http://www.computerhope.com/issues/ch....

Thanks you very much, Tim!

I actually uninstalled Ruby in the meantime and installed InstantRails.
It's working now.
--
Posted via http://www.ruby-....

Bert Ameche

7/5/2008 11:02:00 PM

0

Joel VanderWerf wrote:
> Bert Ameche wrote:
>> I forgot to mention that 'ruby -v' does not work either - get the same
>> message "ruby" is not recognized.
>
> Maybe helpful, maybe not:
>
> Are you using a command prompt window that was open before you installed
> ruby? If so, try opening a new window. The environment variable settings
> performed by the installer (such as the PATH to search for executable
> programs) will not take effect retroactively.

Thanks so much, Joel. I got it working in the meantime by uninstalling
Ruby and installing Instant Rails.
--
Posted via http://www.ruby-....

Pawel Zielniok

4/19/2009 8:10:00 PM

0


Just for anybody still looking solution having no admin rights in WinXP:

Start
-> Control Panel
-> System
-> Advanced
-> Environment Variables
-> New for User Variables
-> Variable Name: Path, Variable Value: C:\ruby\bin (if installed in
this folder).

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