Browse the Ruby on Rails Community.

You are here: Forums General Discussion mod_rails...

Replytotopic

mod_rails

Posted in Forums : General Discussion

 
Jo_opaulo2

Authority 37
Posting Rating 0
Sign in to rate this post

Someone testing or using mod_rails?
Please speak of their experience, performace and difficulties encountered…

 
Img_4570

Authority 37
Posting Rating 88
Sign in to rate this post

I’m gearing up to use mod_rails on one project but I may not have any “real” benchmarks for a week, maybe two. I’ll let you know, but maybe someone else can post something before hand. Looks dead simple though! I’m excited!

 
Profile

Authority 0
Posting Rating 0
Sign in to rate this post

I recently moved a set of three older Rails applications that used Apache/fastCGI to a new server and used Apache2/Passenger/mod_rails.

The three apps are in the directories on both servers. (Documents is the web server document root under Mac OS X, substitute your document root directory)

  • /Documents/Store/CustomerService
  • /Documents/Store/Inventory
  • /Documents/Store/Orders

After installing mod_rails I modified the Apache2 httpd.conf to add these directives:

LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-1.0.5/ext/apache2/mod_passenger.so
RailsSpawnServer /Library/Ruby/Gems/1.8/gems/passenger-1.0.5/bin/passenger-spawn-server
RailsRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

# 4 hours idle time so apps will live a long time.
RailsPoolIdleTime 14400

<VirtualHost *:80>
 ServerName localhost
 DocumentRoot /Library/WebServer/Documents

 RailsBaseURI /Store/Orders/public
 RailsBaseURI /Store/Inventory/public
 RailsBaseURI /Store/CustomerService/public
</VirtualHost>

After restarting Apache2 I was able to run each of the apps from URL’s like

http://localhost/Store/<app>/public/<controller>/<method>

Note that the case of the URL has to match the case of the RailsBaseURI which has to match the case of the actual directories.

 
2660287362

Authority 50
Posting Rating 19
Sign in to rate this post

I’ve been using mod_rails with capistrano for a while now and haven’t had any problems other than the odd restart failing here and there, requiring an apache restart.

 
Cf720f06b

Authority 25
Posting Rating 0
Sign in to rate this post

installing mod_rails on ubuntu and deploying is fairly easy and seems somewhat relieable. touching restart.txt is working sometimes.
but, anyone uses engines in your rails app ? i experienced strange behaviour in configuring the static content paths in these subdirectories and referencing images within image_tag. all my applications without engines are working fine.

 
Profile

Authority 75
Posting Rating 0
Sign in to rate this post

I’m using Mac OS Leopard for developing and Ubuntu for production -deploying with capistrano.
Had no any problems with restart or/and performance.
Restart works just well.
desc “Restart Application” task :restart, :roles => :app do run “touch #{app_current_path}/tmp/restart.txt” end

where app_current_path is the RAILS_ROOT, or Rails.root for edge rails ;)

 
Profile

Authority 37
Posting Rating 74
Sign in to rate this post

Too good if memory consumption is considered. Still waiting for a mature release of product or a large site deployed on it. I’ll not take a risk of deploying a huge application on mod_rails yet since I have faced the ruby code being broken at several places frequently in my deployed test applications.

Replytotopic

Other Recent Topics

General Discussion : Plugin or Gem install is too slow

General Discussion : How to avoid DDOS attack

General Discussion : [Noob] How RoR handles data normalization

General Discussion : Whether it is possible to automated test the Ruby on Rails application using the QTP tool?

General Discussion : Sorting Array Of objects

General Discussion : RoR and client-side MVC

General Discussion : data tier and business logic separation

General Discussion : RoR books?

General Discussion : RoR Development Team

General Discussion : Radio Show [Subject: Agile Development]

Formatting Help
  • *bold*       _italics_      
    bq. (quotes)
  • "DSC":http://www.dsc.net
  • * or # (lists)
or cancel