===EDIT:===
It works now. I haven't changed anything lately... and all of the sudden it works. Even the error from "ruby dispatch.fcgi" is gone...
==========
I've been working on getting my application online for hours now, but it just won't work.
Yes,
I read the tutorial and went through several posts regarding this issue.
.htaccess
Those are my top lines:
# General Apache options
#AddHandler fastcgi-script .fcgi
#AddHandler cgi-script .cgi
AddHandler fcgid-script .fcgi
Options +FollowSymLinks +ExecCGI
The RewriteRules look like this:
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
dispatch.fcgi, dispatch.rb, dispatch.cgi
First line is: #!/usr/local/bin/ruby
database.yml
production:
adapter: mysql
database: USERNAME_DBNAME
username: USERNAME_USERNAME
password: PASSWORD
routes.rb
I uncommented this line:
map.root :controller => "welcome"
Where "welcome" is my main controller
and even addes this line:
map.connect '', :controller => "welcome"
environment.rb
I haven't changed anything besides uncommenting:
ENV['RAILS_ENV'] ||= 'production'
My RAILS_GEM_SERSION in here is set to '2.1.0'
I don't use any non standard plugins and therefor didn't freeze anything.
ruby dispatch.fcgi
This command brought up the following:
/usr/local/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 1, col 9: `a' (ArgumentError)
from /usr/local/lib/ruby/1.8/yaml.rb:133:in `load'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:701:in `database_configuration'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:331:in `initialize_database'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:120:in `process'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in `send'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in `run'
from ./../config/environment.rb:13
from dispatch.fcgi:21:in `require'
from dispatch.fcgi:21
But as far as I can tell, the two files 'dispatch-fcgi' and 'environment.rb' are allright.
My 'development.log' stays empty and the cPanel ErrorLog tells me:
[Sun Aug 24 05:35:46 2008] [notice] mod_fcgid: process /home/USERNAME/public_html/dispatch.fcgi(2165) exit(communication error), terminated by calling exit(), return code: 1
So what the hack am I missing here?
Thanks for any help on this.
Sietsch.