Posts filed under 'Rails'

Instant Rails, RadRails and a broken console

9th April 2007

This week end I was playing around with RadRails, putting it through its paces and seeing if I want to use it to develop my apps. I encountered a problem when I tried to use the Console.

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

I did a little digging around on the internet and found out it was a problem with using Instant Rails and RadRails together. Instant Rails is a self contained development environment for Ruby on Rails on a Widows machine. It does not modify your system environment at all, as a concequence Windows did not know where to find my irb.bat file to run the Ruby shell for the console.

This is easily fixed though, all you have to do is go to

My Computer > Properties > Advanced > Environment Variables > System Variables.

Find the variable named Path, then click Edit and add in the following (this assumes you installed Instant Rails into a directory called InstantRails in your C drive, if not replace the path with your own path):

C:\\InstantRails\\ruby\\bin;

Make sure there is a ; separating the value you add and the current variable value. Windows will now know where to find the Ruby executable files. For completeness you could also add in some more paths to let Widows know where the executables are for MySQL, Apache and PHP.

C:\\InstantRails\\mysql\\bin;C:\\InstantRails\\Apache;C:\\InstantRails\\PHP

There does not seem to be a huge amount of support documentation out there at the moment for RadRails. I think this will improve soon. Aptana has only just taken over the RadRails project and are settling in at the moment, there is a good resource here for setting up RadRails and Instant Rails.

PHOTOS

BITS AND PIECES

Bits of me scattered around the web.

SUBSCRIBE