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.