Phusion Passenger (mod_rails) Now Available! (And Rails 2.3.3!)

Friday, July 31st, 2009

phusion-passenger-collage

Motivation

So, after numerous issues with Mongrel and Mongrel Cluster, as reported in our last Rails-related post, and after following all the buzz, we decided to give Phusion Passenger a try – we were not disappointed!

Don’t get us wrong, we still prefer Mongrel as our development server, and there are instances where Mongrel Cluster makes lots of sense (load balancing, for example), but we wanted to explore the reputed simplicity of Passenger –

..And we wanted to multiplex multiple websites onto one Apache instance, simply and easily!

Simplicity

So, we followed the gem-basedinstallation  instructions here: http://www.modrails.com/install.html

After installation with Gem, the nicely-written text mode installer guided us through the install process for the ‘dev’ packages, and then compiled itself from source – Very nice! A polished touch!

Done!

So after one global include in /etc/apache2/conf.d/passenger:

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4
PassengerRuby /usr/bin/ruby1.8

We were able to use multiple files in ‘sites-available’ of the format:

<VirtualHost *:80>
    ServerName www.yourhost.com
    DocumentRoot /somewhere/public
    #                       ^-- be sure to point to 'public' within your rails app!
</VirtualHost>

To easily achieve multiple rails apps, with disparate domains, served by the single instance, reasonably painlessly – Note that you do have to have the domains point to the correct IP address, of course 🙂

The Verdict

Our verdict: All in all pretty painless and professional – and the benchmarks seem to support great performance –

So, if you want us to install Passenger for you, just indicate this in the “Notes” field when you place your order, and we’ll get it done for you.

We will likely soon make it the default, if no objections are heard from you, our customers, in the near future.

Notes

Please note that we can do this on top of either Turnkey rails, or our regular Rails instance.

Rails 2.3.3 now available

Please note that Rails 2.3.3 is also now available from the dropdowns when you place your order!

Nginx

nginx_passenger_eyecatcherNote also that Phusion Passenger also offers an Nginx version – we will be happy to install the highly acclaimed Nginx web server, along with the corresponding version of Phusion Passenger, via custom quote – Please contact us today regarding getting this set up for you!

j

Turnkey Rails 2.3.2 Now Available

Thursday, June 25th, 2009

rails-turnkey

Ruby on Rails 2.3.2

We are pleased to announce the availability of the Ruby on Rails 2.3 stack (currently 2.3.2, as of this writing).

We have opted to try out the excellent (Ubuntu-based) Turnkey Linux software appliance for Rails 2.3, rather than using our own installation and provisioning scripts, and so far we have had excellent results.

(We have also had good results with the Turnkey Drupal appliance as well).

Things we liked about the Turnkey appliance:

  • Preconfigured SSL / SSH support – all keys & certs  generated during installation, set up w/Apache
  • Security-related updates applied daily
  • Webmin preinstalled and precofigured for Apache, MySql, etc
  • RubyGems package manager installed the way we recommend – with Ruby managed by apt, but Gems installed from source.
  • Just as we say: “Use gem for managing Rails gems, and apt for everything else.”

Things we had trouble with or had to fix:

  • The 3-node mongrel cluster was cumbersome to administer, and difficult to modify for new rails apps from the “Example” rails app preinstalled by Turnkey.  Either No example app, or a more flexible way to add new apps would have been better.
  • No option for, or mention of Phusion Passenger.
  • SQLite and git were not installed
  • Our regular VMs do a reconfigure tzdata on first startup, so you don’t forget to set your timsezone correctly

Additional notes and packages we installed:

  • mc – Midnight Commander – tried-n-true text mode dual-pane file manager
  • file – Without this, obscure dependencies remain unmet for builds, etc
  • sqlite3, libsqlite3-ruby – should be installed, even if MySql is the default db (Postgres might be nice too)
  • git-core should be installed, given the percentage if Rails plugins that use it, plus gems can install from git, but only if it’s installed!
  • lynx, other viewers for mc – important for reading docs in console
/etc/init.d/mongrel_cluster stop

didn’t work, and had to manually stop the clusters on ports 8000, 8001, & 8002

Had to manually do things like:

mkdir -p tmp/pids

and

chown -R www-data:www-data *

on certain directories, etc, to make certain core components work, that shouldn’t have been necessary.

Anyway, these considerations are relatively minor, and are all addressed now, and working well – just select “Rails 2.3”  from the dropdown when you place your order –

Plus, look for a future update where we integrate Phusion Passeneger with your VM – Let us know what you prefer, please enter which deployment option you prefer for Rails in the comments on this post, and why –

  • Mongrel, Mongrel cluster
  • Phusion Passenger/mod_rails
  • mod_wsgi
  • Apache
  • nginx
  • Lighttpd
  • etc

…and we’ll listen!

j