Radiant in Rails Production mode

Hi,

I had Radiant initially set up in (Rails) development mode. I wanted
to switch it to production mode, for performance and to see if it
fixed the header problem I’m having on the admin pages.

I thought all I needed to do was to add a line to my Apache config file:

SetEnv RAILS_ENV production

I tried that, but the app was still in development mode (I could tell
because it was using the dev database)

I had to change the line is the environment.rb file to get it to
switch to production. Shouldn’t the change in the Apache config be
enough? I’m running Ubuntu Linux and Apache 2.0.55

Thanks,

jt

(and still can’t figure out why I’m getting headers in the middle of
the page :/)

On 01-Oct-2006 03:03 -0400, John T. was heard to say:

SetEnv RAILS_ENV production

I tried that, but the app was still in development mode (I could tell
because it was using the dev database)

Assuming you are using mod_fastcgi, try to set:

FastCgiConfig -initial-env RAILS_ENV=production

SetEnv happens on a per-request basis, but your Rails process starts in
the
context of Apache not that of a request.

Cheers,
Oliver

On 10/1/06, Oliver B. [email protected] wrote:

SetEnv happens on a per-request basis, but your Rails process starts in the
context of Apache not that of a request.

Thanks. I’m actually using fcgid, so I’m not sure where to put the
config. I see instructions to put

DefaultInitEnv RAILS_ENV production

in the /etc/apache2/mods-enabled/fcgid.conf file, but I don’t want to
enable production mode for all my rails apps. Can I put the
DefaultInitEnv into the .htaccess?

Thanks again.

On 10/1/06, John T. [email protected] wrote:

Thanks again.

I ended up putting that line into the .htaccess file in my public
folder and that did the trick.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs