View Full Version : RimuHosting Rails Stack Feedback
retep
08-18-2006, 01:22 AM
We have a RimuHosting Rails Hosting Stack howto over at http://bliki.rimuhosting.com/space/knowledgebase/linux/miscapplications/ruby+on+rails
We're keen to offer a great Rails hosting environment to customers. So we want to know everything we can do to setup the 'perfect' environment.
That said we want to get feedback from everyone that is using rails (if we set it up for you with our script or otherwise). We want to update that page to improve the documentation. Make rails easier to use. And update the install script so it includes everything most people need, and nothing that most people dont.
So: what can we do to make our rails offering better?
cdcarter
08-26-2006, 04:23 AM
Hey, I am going to be writing a tutorial on setting up rails, php and nginx soon. Would you want to add that to teh bliki page?
retep
08-26-2006, 04:38 AM
Feel free to post the url here when you're done.
cdcarter
08-26-2006, 05:25 PM
http://concentrationstudios.com/articles/2006/08/26/nginx-and-rimuhosting-a-grand-ol-time
rsanheim
08-27-2006, 07:21 PM
* would ubuntu be a good distro to go with for this?
* would 128 be enough to run one or two rails apps, plus trac and subversion?
* anyone have a script to install trac + its dependancies?
nickmc
09-06-2006, 07:41 AM
I'm using the basic rimuhosting rails stack (running apache).
It appears to run in development mode.
How can I switch it to production mode?
Thanks
Nick
retep
09-06-2006, 09:35 AM
What is it exactly that you wish to do / have happen in this 'production mode'? Can you describe this setup to me?
nickmc
09-06-2006, 10:08 AM
Well I'm a newbie, but here's what I know...
Running rails inside other packages (such as Locomotive on the Mac) you can always run the server in either development or production mode.
I think these are the differences:
- Production mode uses the "production" database specified in config/database.rb instead of the "evelopment" one
- Output goes to log/production.log file instead of log/development.log.
-In development mode, the server re-loads pages often. This means that if you have changed something it ripples through quickly. But it makes a lot of delays.
- In development mode, errors and unrecognised actions cause a "backtrace" - a debug output. In production mode this is hidden.
I think i am in development mode because 1) i think the server is re-loading alot and 2) log files are being written to development.log.
Looking at the apache2.2/mongrel configuration file, for example, I see:
mongrel_rails start -d -e production -p 8000 -a 127.0.0.1 -P log/mongrel.8000.pid -c /var/www/test
The "-e production" is setting production mode. There is no equivalent in the plain apache file.
Thanks
Nick
retep
09-06-2006, 10:19 AM
The mongrel command is launched from /etc/init.d/mongrel. So you can make changes there. Then post back here and let you know what you did, why, and what effect it had?
nickmc
09-06-2006, 10:20 AM
A further observation.
This is an extract from an apache configuration file:
FastCgiConfig -autoUpdate -initial-env RAILS_ENV=production -idle-timeout 120 -maxClassProcesses 5 -killInterval 300
Again, note the RAILS_ENV variable...
Would this work in the rimuhosting stack?
nickmc
09-06-2006, 10:24 AM
But I don't use mongrel.
Is that the only way to get production mode running?
nickmc
09-06-2006, 05:06 PM
I just disabled apache and used mongrel on its own.
Works like a dream for my simple app and is easy to put in production mode.
Nevertheless, it would be useful for the default rimuhosting stack to be configurable for production. Otherwise it would be better to recommend another set up (probably mongrel+apache).
Nick
rsanheim
09-27-2006, 03:55 AM
But I don't use mongrel.
Is that the only way to get production mode running?
Nick:
Generally, you set the RAILS_ENV to 'production' somewhere in your server's startup script or even in your general environment if you like. You _definitely_ want to do this for your app, as performance is very crippled in development mode since things get reloaded with every request. Stuff like caching is also disabled by default in development. You could even hard code it into environment.rb if you like, just make sure that you don't check that change in and mistakenly use production mode locally in development.
toddvault
11-03-2006, 05:21 AM
I just wanted to post the details (http://www.hackthat.com/2006/11/02/apache-mongrel-rails-mod_proxy_/) of my setup for anyone interested.
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.