This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When I run a rails 2.1 test from nb using apple-f6 I get the following consistently: System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- test_helper (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require' from /Users/stu/projects/origin/iter1-stu/test/unit/lead_definition_test.rb:1 from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require' from /Users/stu/Downloads/netbeans/ruby2/nb_test_mediator.rb:97:in `add_to_suites' I can run the tests fine from rake. Even a simple test like this fails: (I have the shoulda plugin installed) require 'test_helper' class LeadDefinitionTest < ActiveSupport::TestCase should_have_many :questions end
This should be fixed by the fix for issue 136238, please try with the latest build (available at http:// deadlock.netbeans.org/hudson/job/trunk/lastSuccessfulBuild/artifact/nbbuild/dist/zip/) and reopen if this still does not work for you - thanks!
I just downloaded the latest nightly from hudson, at http://deadlock.netbeans.org/hudson/job/trunk/lastSuccessfulBuild/artifact/nbbuild/dist/zip/netbeans-hudson-trunk-2183-ruby.zip Created a new rails 2.1 project, and generated a single model. Here's the test: require 'test_helper' class SimpleTest < ActiveSupport::TestCase # Replace this with your real tests. def test_truth assert true end end It fails with the same message I reported earlier. Looks to me like rails isn't initializing itself when running the test - so test-helper isn't in the load path. And it works from rake, so it seems the project is fine. Thanks!
Right, the fix for issue 136238 was to add lib:test to the load path. The same scenario works for me on my Linux, perhaps this is system specific - could you please paste the info from the Help -> About dialog? Could you also please specify whether you use MRI or JRuby (and the version you use)?
Nevermind the MRI/JRuby question, I see that you use MRI. But the info from Help -> About would still be useful.
Hmm, it looks like I was running a build from yesterday, which wouldn't have included your fix. Odd - not sure where the one I just downloaded went. K, download it again and I'll see if I still have the issue (bet not!). If not I'll update this report and close it. Thanks for the quick response!
It works! Sorry, I thought I was running from today's build. The same test I reported on before now passes. And here's my version info: Product Version: NetBeans IDE Dev (Build 20080606123120) Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119 System: Mac OS X version 10.5.3 running on i386; MacRoman; en_US (nb) Userdir: /Users/stu/.netbeans/dev
Thanks for confirming! And for reporting too, of course.
I'm reopening this because upon further testing, the issue remains when debugging the test file. The details posted before are the same, except while the test successfully runs with apple-f6 (non-debug mode), the same test fails with: no such file to load -- test_helper (LoadError) error when invoking it in debug mode.
Reproduced, thanks for catching this. In fact running 'debug test' (i.e .ctrl-shift-f6 instead of ctrl-shift-f5) does not cause this error, but debugging still does not work.
Fixed a while ago, just noticed that IZ swallowed my previous attempt to mark this issue as fixed. Changeset #bed154b4e4b5, please reopen if this still does not work for you.