ken, glad you got it sorted out. it is true that shoulda will not be used on your staging or production server, so i understand your preference. but i find it a lot easier to manage everything required by a project with config.gem or geminstaller. that way i can check out the project on pretty much any dev machine and be up and running with just a couple of commands.
also, Test::Unit is part of the stdlib so putting a testing framework on your staging server wouldn't be unprecedented :) -neal On Fri, Apr 17, 2009 at 11:21 AM, Ken Hudson <[email protected]> wrote: > > Hi Neal, > > Well, as it turns out, the problem was with my Rakefile. When I > corrected the problems the begin/rescue block worked fine. As far as > why no Shoulda on the Staging Server - I guess it's just personal > preference. It just seems like it doesn't belong there. It would > never be used there so why have it? Same with production. I agree > that it wouldn't really "hurt" anything, though. > > Thanks! Ken > > > On Apr 15, 2009, at 4:53 PM, Neal Clark wrote: > >> >> hi ken. >> >> a begin/rescue block in your Rakefile should work.... (if i understand >> your problem correctly...). i just tried: >> >> begin >> require 'shoulda/tasks' >> rescue LoadError >> puts "It seems that you don't have shoulda" >> end >> >> in my Rakefile (i don't have shoulda). i get the little error message >> displayed and then whatever task i'm calling works fine. >> >> i'm confused though--why does it matter if you have shoulda on your >> staging environment? it's not going to take up a lot of space, why not >> just install it? >> >> -neal >> >> p.s. hi SDRuby, i'm Neal :) >> >> >> On Apr 15, 2009, at 9:08 AM, Ken Hudson wrote: >> >>> >>> Hi, >>> >>> I have just started using Shoulda for the first time. My Rakefile >>> has >>> this line in it: >>> >>> require 'shoulda/tasks' >>> >>> When I try to deploy to my staging server (cap staging >>> deploy:migrations) I am receiving this error: >>> >>> rake aborted! >>> no such file to load -- shoulda tasks >>> >>> Apparently, this is happening because I don't have shoulda installed >>> on my staging server. Since I don't want shoulda installed on my >>> staging server, I have been trying to find a workaround. I have >>> tried >>> using a "rescue LoadError" on the "require 'shoulda/tasks'" statement >>> but that didn't work and I've tried just commenting out the line and >>> that didn't work, either. Both approaches resulted in the same error >>> listed above. Can anyone tell me how to get around this problem? >>> >>> Thank you!! Ken >>> >>>> >> >> >> > > > > > > --~--~---------~--~----~------------~-------~--~----~ SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby -~----------~----~----~----~------~----~------~--~---
