Ruby on Rails Software Collections
The following collections are available for Ruby on Rails, rebuilt from RHSCL:
- ruby193, with Ruby on Rails 3.2 and Ruby 1.9.3
- ror40, with Ruby on Rails 4.0 and Ruby 2.0
- rh-ror41, with Ruby on Rails 4.1 and Ruby 2.2
The following RoR collections are developed in the SCLo:
- sclo-ror42, with Ruby on Rails 4.2 and Ruby 2.2
1. Using with Passenger
The main Ruby collections are integrated with the rh-passenger40 and httpd24 collections, which makes it easy to run Ruby on Rails applications under a full SCL stack.
First install the Passenger module, which will also install httpd24, and the appropriate Passenger/Ruby combination for the collection in use:
yum install rh-passenger40-mod_passenger rh-passenger40-ruby22
Use the VirtualHost example from /opt/rh/httpd24/root/etc/httpd/conf.d/passenger.conf to configure the site in /opt/rh/httpd24/root/etc/httpd/conf.d/, e.g.
<VirtualHost *:80> ServerName example.com PassengerRuby /opt/rh/rh-passenger40/root/usr/libexec/passenger-ruby22 DocumentRoot /var/www/public <Directory /var/www/public> AllowOverride all Require all granted Options -MultiViews </Directory> </VirtualHost>
Change the passenger-ruby* binary referred to in the PassengerRuby setting as appropriate. The app root is expected to be /var/www in the example here.
Start the web server using service httpd24-httpd start.
If using sclo-ror42 (or another non-rh* collection), the collections that get activated may need to be changed in /opt/rh/rh-passenger40/service-environment. For example, using sclo-ror42, edit RH_PASSENGER40_RUBY22_SCLS_ENABLED and change rh-ror41 to sclo-ror42. If asset precompilation isn't used or runtime compilation is desired, add v8314 too.