Autotest Rails on Windows

Ruby on Rails, Testing 2 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]
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in