Re: [Rails] Need to get the environment name

2012-02-13 Thread Max Schubert
You could use the rails runner and do something like # add rails bin dir to path first! RAILS_ENV=`rails runner "puts Rails.env"` That said, if this is something you need access to regularly, add initializer code to your app to write the end out to a well know file name under the project that scr

Re: [Rails] Need to get the environment name

2012-02-13 Thread Colin Law
On 13 February 2012 12:39, Rafi A wrote: > Hi All, > > I want to get the environment name in which the application is executing > whether in production or in development etc using the bash script and want > to write that result into the .sh file. Not by using the ruby. Any ideas of > how to get th

Re: [Rails] Need to get the environment name

2012-02-13 Thread Peter Vandenabeele
On Mon, Feb 13, 2012 at 1:39 PM, Rafi A wrote: > Hi All, > > I want to get the environment name in which the application is executing > whether in production or in development etc using the bash script and want > to write that result into the .sh file. Not by using the ruby. Any ideas of > how to

[Rails] Need to get the environment name

2012-02-13 Thread Rafi A
Hi All, I want to get the environment name in which the application is executing whether in production or in development etc using the bash script and want to write that result into the .sh file. Not by using the ruby. Any ideas of how to get this work? -- Cheers, Rafi *In Every moment, thank Go