2009/6/18 TomRossi7 <[email protected]>: > > I have seen a lot of discussions about the issue where if you run a > unit test from the command line you get the error: > > "no such file to load -- test_helper" > > I have been using the workaround of changing: > > require 'test_helper' > > to: > > require File.dirname(__FILE__) + '/../test_helper' > > I'm hoping there is a better way? Maybe a fix in edge rails? Anyone > have an update?
The recommended way of avoiding this issue is to use ruby -I test test/unit/whatever.rb Apparently putting the dirname in the require can cause all sorts of issues that I do not understand and we just have to put up with it. ( I don't mean we have to put up with not understanding it). I must admit that since I have never come across any of those issues I just put the dirname in. My projects are personal rather than commercial however so the fact that I may fall over this some day is my problem only. I think if I were doing a commercial app I would probably not put the dirname in, and put up with it. Colin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

