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.rbon 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? -- Posted via http://www.ruby-forum.com/.
David Chelimsky
2008-Aug-27 12:36 UTC
[rspec-users] story runner not running on build machine
On Wed, Aug 27, 2008 at 4:42 AM, aa aa <lists at ruby-forum.com> wrote:> 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?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> -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
David Chelimsky wrote:> On Wed, Aug 27, 2008 at 4:42 AM, aa aa <lists at ruby-forum.com> 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? -- Posted via http://www.ruby-forum.com/.
aa aa wrote:> No, we are using subversion and i used the script/install command whichof course, i meant> script/plugin installwhoops -- Posted via http://www.ruby-forum.com/.
aa aa wrote:> 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? >Please post a runner file, your spec helper, and a steps file. -Ben
Ben Mabey 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. > > -Benodd, 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.... -- Posted via http://www.ruby-forum.com/.
On Thu, Aug 28, 2008 at 3:39 AM, aa aa <lists at ruby-forum.com> wrote:> Ben Mabey 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....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 Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com