So I’ve written my first real-world RoR app and I’m now getting ready
to deploy it. Unfortunately, my client decided to use GoDaddy as the
hosting provider and based on what I’ve seen so far from the web, it’s
not really the smoothest or ideal hosting for RoR apps. There were
several posts here that I tried to follow but they were kinda old
(2008, 2007). Most of them are talking about the dispatch.fcgi being
in the public folder. Well I tried searching my app for those and I
found them in the ‘vendor\rails\railties\dispatches’ folder instead.
I am hoping you folks have recently experienced deploying an app to
GoDaddy. I followed the instructions and have already attempted it 3
times and I still could not get my app to show. I kept getting ‘Page
Not Found’. I’m not sure with what’s supposed to be in my .htaccess
file for ruby app.
Here’s what I have right now for .htaccess.
RewriteEngine On
RewriteRule !/public/dispatch.fcgi [QSA,L]
+++++++++++++++++++++++++++++++
Here’s dispatch.fcgi :
#!/usr/local/bin/ruby
RewriteBase /access
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
require File.dirname(FILE) + “/…/config/environment”
require ‘fcgi_handler’
RailsFCGIHandler.process!
+++++++++++++++++++++++++++++++
Here’s what my environment.rb looks like:
Be sure to restart your server when you modify this file
Specifies gem version of Rails to use when vendor/rails is not
present
#RAILS_GEM_VERSION = ‘2.3.5’ unless defined? RAILS_GEM_VERSION
RAILS_GEM_VERSION = ‘1.1.6’ unless defined? RAILS_GEM_VERSION
ENV[‘GEM_HOME’] = ‘/usr/local/lib/ruby/gems-dev/1.8’
Bootstrap the Rails environment, frameworks, and default
configuration
require File.join(File.dirname(FILE), ‘boot’)
Rails::Initializer.run do |config|
config.time_zone = ‘UTC’
end
+++++++++++++++++++++++++++++++++
I’m not sure what else I’m missing. I used the GoDaddy CGI Admin to
create the rails directory where I uploaded my project. This also
generated the .htaccess file.
I’d appreciate all the help and advice I can get. Thanks.