I know godaddy is one of the worst hosting companies for rails apps and
everywhere I look for help that is all I read about. My client already
has a site with godaddy and they refuse to use anyone else so I have to
make this work. I have one question. I followed this blog entry on how
to host a rails app with godaddy and I am getting the same problem as
the two people posted at the bottom of it. I am getting a blank screen
when the project tries to load.
I have been poking around in the Dispatch.cgi, Dispatch.fcgi and
.htaccess files. In the .htaccess file I read the following:
If your Rails application is accessed via an Alias directive,
then you MUST also set the RewriteBase in this htaccess file.
Example:
Alias /myrailsapp /path/to/myrailsapp/public
RewriteBase /myrailsapp
When you set up the rails app with godaddy you have to create a symbolic
link to your project. Is that what this is referring to? If so, the
rails app directory is “rails_app” so would I use the following:
Alias /symbolic_link_name /rails_app/project_name/public
RewriteBase /symbolic_link_name
This is my first app that is going live and from what I have been
reading godaddy is the hardest hosting company to work with. Any help
would be much appreciated.
Thanks a lot,
Chris
Chris,
Did you use unix line feeds on your dispatch.fcgi and .htaccess files?
Also, what rails version? I haven’t tried to deploy to goDaddy since
that blog entry which was rails 1.2 at that point. If I get a chance,
I’ll try to redeploy with 2.1.
Can you tell from the process manager if you’re getting a fcgi process
dispatched?
Marlon M. wrote:
Chris,
Did you use unix line feeds on your dispatch.fcgi and .htaccess files?
Also, what rails version? I haven’t tried to deploy to goDaddy since
that blog entry which was rails 1.2 at that point. If I get a chance,
I’ll try to redeploy with 2.1.
Can you tell from the process manager if you’re getting a fcgi process
dispatched?
I dont mean to sound dumb but all I have learned is the programming part
of ruby on rails so I am completely new to all of this and don’t really
understand most of it.
Im not exactly sure what you mean about the unix line feeds. I opened
the files up in netbeans on my mac and edited the files from there. For
the .htaccess the mac wouldnt even recognize the file on the desktop and
it wasn’t in the netbeans folder so I opened it in windows using
wordpad.
The rails version on the mac is 2.0.2
As for the checking if I am getting a fcgi process dispatched, I dont
know how I would check this.
Once again sorry for being completely lost on this.
Chris
Chris,
FYI, The fcgi processes can be monitored from the “CGI
Administration” screen…the same place you create the links to your
rails app. Also, you’re using a mac so you would have unix line feeds
by default. That said, it doesn’t look like rails 2.x apps will run
on godaddy without a lot of modifications. A quick way to check this
is to change your .htaccess file back so that it redirects to
dispatch.cgi. In cgi mode, godaddy gives you a little bit more info.
From the test app that I threw up there, it looks like they’re
running an old version of ruby/rubygems that doesn’t recognize the
“gem” command.
This is from the log in the CGI Administration screen:
/home/content/m/c/m/mcmoyer/html/rails_apps/godaddy_test/vendor/rails/
activerecord/lib/…/…/activesupport/lib/active_support/vendor.rb:5:
undefined method gem' for main:Object (NoMethodError) from /home/content/m/c/m/mcmoyer/html/rails_apps/godaddy_test/vendor/ rails/activerecord/lib/../../activesupport/lib/active_support.rb:26 from /home/content/m/c/m/mcmoyer/html/rails_apps/godaddy_test/vendor/ rails/activerecord/lib/active_record.rb:31 from /home/content/m/c/m/mcmoyer/html/gdt/../config/../vendor/rails/ railties/lib/initializer.rb:156:in
require_frameworks’
from /home/content/m/c/m/mcmoyer/html/gdt/…/config/…/vendor/rails/
railties/lib/initializer.rb:156:in require_frameworks' from /home/content/m/c/m/mcmoyer/html/gdt/../config/../vendor/rails/ railties/lib/initializer.rb:88:in
process’
from /home/content/m/c/m/mcmoyer/html/gdt/…/config/…/vendor/rails/
railties/lib/initializer.rb:49:in `run’
from /home/content/m/c/m/mcmoyer/html/gdt/…/config/environment.rb:13
from /home/content/m/c/m/mcmoyer/html/gdt/dispatch.cgi:3
Looks like it’s time for a new blog entry!