Autotest Rails on Windows

Ruby on Rails, Testing Add comments

If you have trouble getting Autotest to run on Windows with `expand_path’: couldn’t find HOME environment — expanding `~/.autotest’ (ArgumentError) messages and the like, this post might help you.

So the steps are:

Then “Autotestify” your Rails app by running in the app dir:

>>set home=.

>>autotest -rails

Test away.

Update: If you still get

/site_ruby/1.8/rubygems.rb:385:in `latest_partials’: undefined method `[]‘ for nil:NilClass (NoMethodError)

or the like, make sure to remove all foreign folders from your gems folder (on Windows, usually C:\ruby\lib\ruby\gems\1.8\gems). Rubygems needs all folders in the <name>-<version> format.

One more thing: To get this working with Netbeans 6 (if you still get the couldn’t find HOME environment error), you need to create an environment variable named HOME (containing anything), quickest from the command line (if you have the Resource Pack installed with the setx command) for example

setx HOME .

and then restart Netbeans. Autotest will not load before your restart the Netbeans IDE. Hope it helps.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

2 Responses to “Autotest Rails on Windows”

  1. lay Says:

    thanks a lot!

  2. Francis Fish Says:

    To be honest, personally, I’d install Cygwin and run it from an xterminal (after installing the gem etc. in the cygwin install).

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in