Know environment active from command line

I'm trying to deploy my application in a shared host but I get an
error when running rake processes. Their IT tell me that perhaps I'm
running the process in development mode and that's why a get a DB
connection error, but how can I know wich is the active environment?

Hi Abel, could you provide some details about your deployment? For

example, how’s your environment.rb configured? Are you using Passenger?

Please provide as much information that can allow us to assist you.

-Conrad

I was just looking for a command line that shows wich is the active
environment just to make sure, but now you ask I'm using Capistrano
via a Gem developed by the hosting company, wich is called Brightbox.
I suck at deployment and I always have this kind of problem so I just
followed the guide they provide at their site and it's my
understanding that Capistrano would change the environment to
production, but it doesn't seem to be working.

Try to run your rake task like this:

rake name:of:your:task RAILS_ENV=production

Thanks Mauricio,

I thought the default environment would be production. I wonder if
there's a way to change it permanently.

Hi Abel,

The default environment is "development", but you can set a default by
setting the system variable RAILS_ENV with the environment you want to
have as the default.