2008/08/26

Aptana RadRails で test_helper.rb の LoadError が発生する



Edge Rails (2.1.0) と、Aptana RadRails (1.0.3.200807071913NGT)の環境下で、ツールバー上のテストボタンでユニット・テストの実行をすると、以下のエラーが発生します。


c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- test_helper (LoadError)

コマンドでのテストは問題ないので、「rake test:units」とすればいいのですが、次のようにすれば解決できます。



There is an open issue on the Aptana issue tracker, but it doesn’t seem to be resolved yet.  Some people have suggested prefixing your requires with the test directory when requiring the test_helper file at the start of your test files -but I don’t think that’s a good solution, especially if you’re working with multiple developers.  Frustrated by not getting my daily green bar fix, I found this work-around:


  1. From the Eclipse Preferences option, choose Ruby | Installed Interpreters

  2. Select your interpreter (I use the Standard VM default interpreter named usr) and choose ‘Edit’. 

  3. Add -Itest to the Default VM Arguments option.  Don’t forget the leading dash!


  4. Click ‘OK’. 


参考:Chris Cruft » Blog Archive » Aptana RadRails and the test_helper.rb LoadError


0 件のコメント: