Rails works only if 'ruby script/server'


#1

I might be missing something simple after following along the wiki, but I can only get RAILS to operate if I run the server using the command ‘ruby script/server’ at the shell prompt.

This doesn’t seem right.

It is only when I ‘ruby script/server’ that I go to http://domain:3000/controller/action
I am getting what I expect to see.

If I do not run the server, and I go to:
http://domain/controller/action
I get: Application error (Rails)

and here is an excerpt of production.log:


SystemStackError (stack level too deep):
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/core_ext/string/…/…/inflector.rb:121:in underscore' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/core_ext/string/inflections.rb:26:inunderscore’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:168:in const_name_to_file_name' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:162:infilesystem_path’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:117:in const_available?' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:117:inany?’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:117:in each' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:117:inany?’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:117:in const_available?' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:188:inconst_missing’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:72:in const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:189:inconst_get’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:189:in const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:72:inconst_missing’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:189:in `const_get’

.
.
.
.
.

/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:189:in const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:72:inconst_missing’
routing.rb:234:in traverse_to_controller' generated/routing/recognition.rb:3:ineval’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:234:in traverse_to_controller' generated/routing/recognition.rb:3:inrecognize_path’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:458:in recognize!' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:indispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:141:in process_request' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:53:inprocess!’
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in each_cgi' /usr/lib/ruby/1.8/fcgi.rb:597:ineach’
/usr/lib/ruby/1.8/fcgi.rb:597:in each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:inprocess!’
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in `process!'
dispatch.fcgi:34

Any help would be great.

----update--------

Ok I was testing a little more and I have more info for you to think about.

If I change the .htaccess rewrite to use regular dispatch.cgi and not the .fcgi everything works.

any thoughts?


#2

Ok. I figured out my problem. I had edited my dispatch.fcgi with emacs and I had a file called dispatch.fcgi~ in the directory as well.

I deleted the dispatch.fcgi~ and bingo worked!


#3

I just figured out the minimal steps required to install and run typo on DreamHost. I created a step-by-step guide, so people can get typo installed and running quickly.

www.rowbee.com/articles/2006/03/17/typo-on-dreamhost

Have Fun.


#4

I have the same problem. And I’ve enabled fast cgi. Followed the wiki, all of it. But here’s the other thing. I have my app in cvs, and use a shell script that
simply does a cvs export, and then moves it over to the domain
directory. I exported it using a cvs tag yesterday, and it worked
fine. I redeployed using the exact same tag a little while later, and
now I get the error. I’m guessing it has something to
do with processes running that I am unable to kill, and not configuration. Is there anything
else I can do besides run ‘killall -v dispatch.fcgi’ that will
guarrantee my processes die?