Reply to topic
Development --> Production. How?
sonoflight


Joined: 16 Sep 2004
Posts: 15
Reply with quote
Hello, I curious how to go from the development setting to production setting on a Rails application hosted with HMS. I have been doing most of the generators on the server, downloading the app structure, modifying the files, and then re-uploading. I understand this is not the cleanest development cycle, however I am just curious if the app on the server is running in Production or Development mode, and if it is in development - how to get it kicked into production mode.

Thanks in advance.
pmeserve
HostMySite Tech

Joined: 19 Mar 2004
Posts: 178
Reply with quote
By default your app will be running in development mode. To switch it(which will speed up the app), just edit the file "config/environment.rb" - around the 5th line you'll see:
Code:
# ENV['RAILS_ENV'] ||= 'production'


just uncomment the line, so it reads:
Code:
ENV['RAILS_ENV'] ||= 'production'
sonoflight


Joined: 16 Sep 2004
Posts: 15
Reply with quote
Yes, PME that is correct - however if you notice at the top of the environment.rb file it says anytime you make a change to this file that you need to restart your app server . . .

So its not as simple as a change with that line of code.
Can you give suggestions regarding how to truly kick over a rails app into production mode once we have modified that line of code?

Gracias Smile
pmeserve
HostMySite Tech

Joined: 19 Mar 2004
Posts: 178
Reply with quote
Well the mod_fastcgi servers should restart themselves automatically from time to time. If you want to give your server a kick, try the following at the command line:
Code:
ps uxww|grep 'dispatch\.\(fcgi\)\?'|awk '{print $2}'|xargs kill -9


You can also just let HMS support know, we can do this as well
Development --> Production. How?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic