Inconsistent specification of prod/dev environment

Is it just me (don't just answer "yes" :slight_smile: - or is there an
inconsistency in the way, that you specify the running environment for
command-line Rails scricts?

If e.g. I want to run the console in production-mode, I would write:

script/console production

If running a migration, I need to write it like:

RAILS_ENV=production rake db:migrate

I know, that "rake" is not a part of the Rails framework, but then why
is there another convention for the console/server scripts?

- Carsten

Is it just me (don't just answer "yes" :slight_smile: - or is there an
inconsistency in the way, that you specify the running environment for
command-line Rails scricts?

If e.g. I want to run the console in production-mode, I would write:

script/console production

If running a migration, I need to write it like:

RAILS_ENV=production rake db:migrate

I know, that "rake" is not a part of the Rails framework, but then why
is there another convention for the console/server scripts?

You can write RAILS_ENV=production script/console
It's just not very nice.

Fred

Frederick Cheung wrote:

You can write RAILS_ENV=production script/console
It's just not very nice.

Oh... I should have checked that before posting - sorry :slight_smile:

I went the other way - I got used to using "script/console production",
and then later discovered that this didn't work in "rake".

- Carsten