On Tue, Jan 13, 2009 at 11:26 AM, Dominik Mayer
<[email protected]> wrote:
> thanks for your reply!
>
> sadly this only works for
>
>  ENV['VERSION']
>
> but not for
>
>  ENV['RAILS_ENV']
>
> so if i'm in development-environment, the following would not drop my
> test-db (unfortunately it would drop my development-db):
>
>  ENV['RAILS_ENV'] = 'test'
>  Rake::Task['db:drop'].invoke
>
> any other ideas on that?
>

Looks like your rails environment already initialized? your task is
depending on :environment?

You should try setting ENV['RAILS_ENV'] and also changing RAILS_ENV
constant (or at list check if it's defined).

-- 
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
_______________________________________________
Rake-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rake-devel

Reply via email to