Note: Our Classic Hosting platform is now a legacy service and is no longer being updated or expanded. For faster, more secure, and fully supported hosting, please check out our new Web Hosting plans here. If you’re currently on Classic Hosting, our migrations team can move your site to a new plan free of charge. Please email our migration team. |
Our hosting system supports Ruby on Rails, with Ruby version 1.9.3-p392 and Rails version 3.2.12.
You can enable Ruby on Rails with supported hosting packages by following these steps:
Update the Apache directive file (.htaccess) to let the Ruby on Rails application handle all requests with this code:
# -------------------------------------------------------------------
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
</IfModule>
Options +FollowSymLinks +ExecCGI
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi/$1 [QSA,L]
ErrorDocument 500 "Rails application failed to start properly"
# -------------------------------------------------------------------Use these contents for the application launcher script (dispatch.fcgi):
#!/usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby
ENV['RAILS_ENV'] ||= 'production'
#
# The home environment points to the root of the rails application, it should not be placed within the
# public directory, only the the dispatch.fcgi should be there.
#
ENV['HOME'] ||= File.expand_path('/path/to/root/of/the/rails/applicationName')
ENV['GEM_HOME'] = File.expand_path('/usr/local/rvm/gems/ruby-1.9.3-p392')
ENV['GEM_PATH'] = File.expa
Comments
0 comments
Please sign in to leave a comment.