Hi John, Thanks for the help. I tried putting the require in an if statement like you show below but I got the same error message. I guess in a way that makes sense because even when I comment out the line I get the same error.
As far as freezing it into the project itself I guess I could do that but I really don't want the Shoulda stuff on my staging server or production server. So, I don't know... The only other option that I can think of is just ditching Shoulda although I've heard of similar issues with RSpec... Thanks! Ken On Apr 15, 2009, at 9:24 AM, John Bresnik wrote: > You could freeze it into the project itself.. or wrap the require > in an if clause that only works in development.. > > if RAILS_ENV == 'development' > require 'shoulda/tasks' > end > > or.. ? > > On Wed, Apr 15, 2009 at 12:08 PM, Ken Hudson <[email protected] > > 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 -~----------~----~----~----~------~----~------~--~---
