Topic: Going CRAZY... Permissions? Ruby path? ... GRR (dedicated Linux box)

Hi there everyone.
First post on RailsForum.com! smile

PLEASE HELP ME! ...

OK I just spent a good part of the last 4 days going CRAZY trying to get a Rails app to run on my server. The box is dedicated (no sharing), but it's one of those Apache 1.3 with CPANEL.

I followed what this page on the official Wiki recommends to do (although half of the page has contradictions added by people who didn't succeed with the recommendations!):

http://wiki.rubyonrails.com/rails/pages … lsOnCpanel

What is my problem?

Well, when I SSH into the box as "root", I can create test RB files and run them "ruby test.rb" they execute fine in the command line. Problems arise when I try to show a dynamic Rails page in the browser. The "Welcome to Rails" page loads fine, but clicking on "environment" or typing some random (or existing) controller names in the URL lead to "hanging" and waiting forever. These are apps created from the box itself ("rails testapp"), not uploaded.

I must have read every blog post and article known to man about setting the correct permissions, and am running out of options...

Looking at the server log, this is what keeps coming back.
Note: I searched online for these errors, and found that I needed to "set the right ruby path at the top of RB files" ... Well the thing is, the paths are correct (in my case it's /usr/local/bin/ruby

[Mon May  7 22:48:39 2007] [warn] FastCGI: (dynamic) server "/home/xxxxx/public_html/rails/dispatch.fcgi" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds
[Mon May  7 22:48:39 2007] [error] [client 24.18.144.57] FastCGI: incomplete headers (0 bytes) received from server "/home/xxxxx/public_html/rails/dispatch.fcgi"
[Mon May  7 22:48:39 2007] [error] [client 24.18.144.57] FastCGI: comm with (dynamic) server "/home/xxxxx/public_html/rails/dispatch.fcgi" aborted: (first read) idle timeout (240 sec)

I must admit, I am getting DIZZY trying all the various settings and combinations... sad

The web link to the test app is here:
http://manuelclement.com/rails/

What do you guys suggest?


Thanks in advance for your help.

Re: Going CRAZY... Permissions? Ruby path? ... GRR (dedicated Linux box)

FYI

If I let the page load for a while, an error 500 comes back (the custom HTML I defined in .htaccess to be returned when a 500 occurs)

Application error
Rails application failed to start properly

Re: Going CRAZY... Permissions? Ruby path? ... GRR (dedicated Linux box)

Try running script/console on your host in your rails project directory. Does that work? Do you get an error?

Also, what version of Ruby are you using?

Railscasts - Free Ruby on Rails Screencasts

Re: Going CRAZY... Permissions? Ruby path? ... GRR (dedicated Linux box)

Thanks for replying so fast Ryan! I'm not alone... smile

OK here is exactly what ruby -v returns:

ruby 1.8.5 (2006-08-25) [i686-linux]

running script/console + typing a couple of commands returns:

Loading development environment.
/usr/local/lib/ruby/1.8/irb/completion.rb:201:NameError: uninitialized constant Readline
>> 2+2
=> 4
>> puts "hello"
hello
=> nil
>>

... Thanks again for your help.

PS: FYI I also read this thread where the first poster seems to be going through the same exact "hell" but he didn't fix the problem...

Re: Going CRAZY... Permissions? Ruby path? ... GRR (dedicated Linux box)

Hmm, that error "uninitialized constant Readline" makes me think Ruby wasn't properly compiled with readline. How did you install Ruby? I don't know if this is the true problem, but it's worth fixing.

Railscasts - Free Ruby on Rails Screencasts

Re: Going CRAZY... Permissions? Ruby path? ... GRR (dedicated Linux box)

interesting... I installed Ruby by following the instructions linked to the ROR Wiki in my original post at the top (InstallRubyOnRailsOnCPanel or something like this).

Re: Going CRAZY... Permissions? Ruby path? ... GRR (dedicated Linux box)

I'm about to give up... I don't understand why it is so complex to get Ruby installed and deploy an app that works sad

I do understand that CPanel and Apache 1.3 + FCGI isn't the perfect environment, but I don't really have a choice at the moment unfortunately (other websites run on the box and can't be taken down to redo the box with a more optimized Lighttpd or other system).

sad

Re: Going CRAZY... Permissions? Ruby path? ... GRR (dedicated Linux box)

have you considered using another server for your Rails site? I am using slicehost and it works beautifully. The 256slice should work fine for a site that gets moderate traffic. You can always bump it up if you need to.

Railscasts - Free Ruby on Rails Screencasts

Re: Going CRAZY... Permissions? Ruby path? ... GRR (dedicated Linux box)

I already run a site that's pretty successful (100K unique / week), on a server we just upgraded to only a few months back (dedicated) and we've been with the same server company for ~7 years...

I would like to find the little tiny thing I am missing (a weird path to Ruby not set correctly? ... Some HTTPD.conf lines to tweak?) that would make it "all better" smile ... before doing something as drastic as swithching over all our stuff to a whole different host.

I talked to tech from server company and they siad that only 4 customers of theirs use Rails (out of hundreds or more), that it's too new, and therefor not supported.

Re: Going CRAZY... Permissions? Ruby path? ... GRR (dedicated Linux box)

BTW thanks for replying to my thread... I truely hope I can find out what is causing these issues.