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 -~----------~----~----~----~------~----~------~--~---
