Hi, have my stories running fine here on my dev machine but they blow up
on the build machine. Rspec and Rspec-rails are installed as plugins
When i attempt to run
ruby stories/all.rb
on the dev server i get this error
stories/steps/fields_steps.rb:1: undefined method `steps_for’ for
main:Object (NoMethodError)
what is going on here?!
It doesn’t seem to be loading the plugin does it?
On Wed, Aug 27, 2008 at 4:42 AM, aa aa [email protected] wrote:
It doesn’t seem to be loading the plugin does it?
Are you using git for your project? If so, did you delete the .git
directories in rspec and rspec-rails? If not, the files in those
directories didn’t get committed to your project. To fix, remove the
rspec and rspec-rails directories from your project and commit it.
Then re-install, this time removing the .git directories, commit and
push.
HTH,
David
David C. wrote:
On Wed, Aug 27, 2008 at 4:42 AM, aa aa [email protected] wrote:
It doesn’t seem to be loading the plugin does it?
Are you using git for your project?
No, we are using subversion and i used the script/install command which
strips out the git dirs anyway doesn’t it?
aa aa wrote:
what is going on here?!
It doesn’t seem to be loading the plugin does it?
Please post a runner file, your spec helper, and a steps file.
-Ben
Ben M. wrote:
aa aa wrote:
what is going on here?!
It doesn’t seem to be loading the plugin does it?
Please post a runner file, your spec helper, and a steps file.
-Ben
odd, i changed the line in the all.rb from
Dir[File.expand_path("#{dir}/**/.rb")].uniq.each do |file|
to
Dir[File.expand_path("#{dir}/.rb")].uniq.each do |file|
and it worked…
On Thu, Aug 28, 2008 at 3:39 AM, aa aa [email protected] wrote:
odd, i changed the line in the all.rb from
Dir[File.expand_path("#{dir}/**/.rb")].uniq.each do |file|
to
Dir[File.expand_path("#{dir}/.rb")].uniq.each do |file|
and it worked…
That will only load .rb files that are in the same directory as the
all.rb file. So it won’t load things like stories/foo/thingy.rb or
stories/foo/blah/thingy.rb. My guess is that is not what you want.This
is assuming your all.rb file looked like:
dir = File.dirname(FILE)
Dir[File.expand_path("#{dir}/**/*.rb")].uniq.each do |file|
require file
end
–
Zach D.
http://www.continuousthinking.com
http://www.mutuallyhuman.com