[Locomotive-users] forcing environment to production?

Ryan Raaum ryan.raaum at gmail.com
Wed Aug 2 21:31:03 GMT 2006


Hi,

I think you want to be very careful setting RAILS_ENV in your terminal...
For one thing, you might end up running your tests in your production
database, which could be unpleasant...

I think the best option is to use the switches for the command line tools.

> ruby script/console production
> ruby script/console development
> ruby script/console test

will load production, development, and test consoles respectively.
Similarly,

> rake migrate RAILS_ENV=production
> rake migrate RAILS_ENV=development
> rake migrate RAILS_ENV=test

will do the same for your migrations.

Best,

-r


On 8/2/06, Steven Talcott Smith <steve at talcottsystems.com> wrote:
>
> export RAILS_ENV=production     is the answer.
>
> hmmm...  Ryan, maybe this could be automatic when you launch a
> terminal from Locomotive?
>
> Thanks,
>
> Steven
>
> On Aug 2, 2006, at 3:51 PM, Steven Talcott Smith wrote:
>
> > I have set the environment to production in Locomotive and when I
> > start the terminal window for the application, the little indicator
> > is showing light blue for production.
> >
> > However, when I run script/console, it reports that it is using the
> > development environment.  Further, rake migrate seems to be trying
> > to access the development db.
> >
> > I uncommented the first setting in the config/environment.rb but it
> > seems not to do anything for me.
> >
> > Any suggestions?  I need to be able to migrate my production db to
> > get my app working...
> >
> > Much Appreciated,
> >
> > Steven
> >
> >
> > _______________________________________________
> > Locomotive-users mailing list
> > Locomotive-users at lists.raaum.org
> > http://lists.raaum.org/mailman/listinfo/locomotive-users
> >
> >
>
> _______________________________________________
> Locomotive-users mailing list
> Locomotive-users at lists.raaum.org
> http://lists.raaum.org/mailman/listinfo/locomotive-users
>



-- 
Ryan Raaum
http://www.anthro.ufl.edu - Molecular Anthropology, University of Florida
http://locomotive.raaum.org -- Self contained one-click Rails for Mac OS X
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://one.textdrive.com/pipermail/locomotive-users/attachments/20060802/f1560883/attachment.htm


More information about the Locomotive-users mailing list