Is it possible to set rails environment from the command prompt?
578 views
Skip to first unread message
muni
unread,
Sep 22, 2009, 5:49:19 AM9/22/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to god.rb
Hi,
I was wondering if it is possible to set the rails environment from
the command prompt? like RAILS_ENV=production god -c config/xxx.god or
any other way?
Cheers
pete
unread,
Sep 22, 2009, 6:08:37 PM9/22/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to god.rb
Yes, that should work for changing the env for a single command. If
you want something a little more permanent (until you end the
session), you can do something like this:
$ export RAILS_ENV="production"
$ god -c config/xxx.god
pete
muni
unread,
Sep 25, 2009, 6:03:08 AM9/25/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to god.rb
Thanks for your reply,
for some reason inside the xxx.god file when I refer to ENV
["RAILS_ENV"] it is not set and it is NIL.
I tried it with:
export RAILS_ENV="production"
and
RAILS_ENV=production god -c config/xxx.god
any ideas?
Eric
unread,
Nov 9, 2009, 12:31:19 PM11/9/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to god.rb
I added a "w.env" option that takes a hash:
w.env = { 'RAILS_ENV' => production }
You should have it if you're running 0.7.8 or higher.
Claudio Poli
unread,
Dec 18, 2009, 6:19:46 AM12/18/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to god.rb
On 9 Nov, 18:31, Eric <e...@5stops.com> wrote: > I added a "w.env" option that takes a hash: > > w.env = { 'RAILS_ENV' => production } > > You should have it if you're running 0.7.8 or higher.
sorry, can you be a little more specific? thanks
Eric Lindvall
unread,
Dec 19, 2009, 8:43:21 PM12/19/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message