[rspec-users] App can't start on production server due to RSpec missing

Mark Wilden mark at mwilden.com
Fri Jan 16 19:25:47 EST 2009


On Fri, Jan 16, 2009 at 3:19 PM, David Chelimsky <dchelimsky at gmail.com>wrote:

> >>
> >> I run rspec on my dev machine, but obviously not on my production
> >> machine, what would be the nicest way to handle such scenario? At the
> >> top of rspec.rake I could add a check on the environment
> >
> > That would get my vote.
>
> Unless I"m missing something, that would require this on the CLI:
>
>  RAILS_ENV=test rake spec
>
> Therefore, this would not get my vote :)
>

Because the rake tasks get loaded before the spec task has a chance to set
RAILS_ENV. But the rakefile wouldn't check RAILS_ENV=test, but
RAILS_ENV=production (or staging). And wouldn't it be set that way before
rake loads its files? (I'm gonna learn something here, whether I want to or
not!)

///ark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090116/aa986684/attachment.html>


More information about the rspec-users mailing list