Forum: Ruby on Rails Rails app won't run on Dreamhost - "incomplet headers" error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Rich B. (Guest)
on 2006-01-25 19:36
(Received via mailing list)
Can anyone provide some expert debugging help here?  What's the first
step to take to see what the issue is here?

I have no errors in the rails app's log files. The only errors I have
are those provided by apache and they are:

'FastCGI: Incomplete headers (0) bytes received from server'

I've tried editing the shebang line, removing line feeds, but nothing
seems to work.

Thanks for any ideas.


rich
Jeff C. (Guest)
on 2006-01-25 20:08
When this happened to me, I found that I had some leftover puts
statements that I had used when debugging with webrick locally.

Maybe you also have some puts statements in your code somewhere?

Just a shot in the dark...

Jeff
www.softiesonrails.com

Rich B. wrote:
> Can anyone provide some expert debugging help here?  What's the first
> step to take to see what the issue is here?
>
> I have no errors in the rails app's log files. The only errors I have
> are those provided by apache and they are:
>
> 'FastCGI: Incomplete headers (0) bytes received from server'
>
> I've tried editing the shebang line, removing line feeds, but nothing
> seems to work.
>
> Thanks for any ideas.
>
>
> rich
rich (Guest)
on 2006-01-25 20:12
Thanks, Jeff, but no puts for me :(.  It's frusterating -  I've tried so
many things.  It seems pretty common though, this error. dig your blog,
by the way, been reading it for a little while now.  I share your
sentiments with regard to m$!

Jeff C. wrote:
> When this happened to me, I found that I had some leftover puts
> statements that I had used when debugging with webrick locally.
>
> Maybe you also have some puts statements in your code somewhere?
>
> Just a shot in the dark...
>
> Jeff
> www.softiesonrails.com
Andrew S. (Guest)
on 2006-01-25 20:43
(Received via mailing list)
either your dispatch.cgi or dispatch.fcgi (depends on your setup in
.htaccess) is referencing an invalid ruby location.

check the shebang (#!/usr/bin/ruby) declaration of the dispatch file and
verify that it's referring to the correct ruby location.

hope this works for you,
andy
Andrew S. (Guest)
on 2006-01-25 20:46
(Received via mailing list)
oops, looks like this has been tried?  ( I should have read the entire
email)

I haven't run across that error without the shebang line correction
being
the fix.  :(
Jeff C. (Guest)
on 2006-01-25 20:56
Rich,

What happens if you just create a new rails app from scratch?  Can you
at least get the "Congratulations..." page to appear?

I guess maybe some more background might help... has your site ever
worked before on DreamHost?  Do you get this error only when calling a
certain action?  Oh, and did you select FastCGI when setting up the
virtual root in the DreamHost control panel?

Sorry for the seeminly dumb questions... just trying to think of all the
stuff I had to look at when I had this problem before.

Jeff
Russ McBride (Guest)
on 2006-01-25 21:04
(Received via mailing list)
Hi Rich,

Did you have your app running at Dreamhost at one point and it
failed, or has it not ever been running?

On Dreamhost I had to change the Ruby path in dispatch.fcgi and
dispatch.rb to:
    #!/usr/bin/ruby1.8

Don't forget to:
   chmod -R 775 public
   chmod -R 775 log

And to cycle an update to the app:
   killall -USR1 dispatch.fcgi

And (in the normal case) your app directory has to be given the full
domain name that you set up, e.g.  myRailsApp.myDomain.com, and it
must be set to the path myRailsApp.myDomain.com/public

I suspect the shebang line might do the trick though.

FYI-- just found out that Dreamhost already has ImageMagic installed
so you just need to put the RMagic gem in your vendor/plugins
directory and you've got RMagic available.  Cool!  ...especially when
used with the filecolumn plugin.

Cheers,
russ
rich (Guest)
on 2006-01-25 21:24
Andrew S. wrote:
> either your dispatch.cgi or dispatch.fcgi (depends on your setup in
> .htaccess) is referencing an invalid ruby location.

thats what i was hoping for.  I've tried:

#!/usr/bin/env ruby
#!/usr/bin/ruby
#!/usr/bin/ruby1.8

none seem to work :(


>
> check the shebang (#!/usr/bin/ruby) declaration of the dispatch file and
> verify that it's referring to the correct ruby location.
>
> hope this works for you,
> andy
rich (Guest)
on 2006-01-25 21:30
hi russ,  I've tries all your ideas, still no go. Oddly, to answer your
first question, it did work at one point.  A few requests ran
successfully and then I needed to update a few things and reload the
app.  THis is where I get fuzzy.. I can't remember doing anything other
than tring to hard code the RAILS[ENV] into environment.rb THis was
before understanding how to best reload an app on a shared host.  But
that files been replace by the origianl so I can't imagine that having
any effect.

When i try to run ruby dispatch.fcgi, I get a 500 error at the command
line.


Russ McBride wrote:
> Hi Rich,
>
> Did you have your app running at Dreamhost at one point and it
> failed, or has it not ever been running?
>
> On Dreamhost I had to change the Ruby path in dispatch.fcgi and
> dispatch.rb to:
>     #!/usr/bin/ruby1.8
>
> Don't forget to:
>    chmod -R 775 public
>    chmod -R 775 log
>
> And to cycle an update to the app:
>    killall -USR1 dispatch.fcgi
>
> And (in the normal case) your app directory has to be given the full
> domain name that you set up, e.g.  myRailsApp.myDomain.com, and it
> must be set to the path myRailsApp.myDomain.com/public
>
> I suspect the shebang line might do the trick though.
>
> FYI-- just found out that Dreamhost already has ImageMagic installed
> so you just need to put the RMagic gem in your vendor/plugins
> directory and you've got RMagic available.  Cool!  ...especially when
> used with the filecolumn plugin.
>
> Cheers,
> russ
rich (Guest)
on 2006-01-25 21:36
> What happens if you just create a new rails app from scratch?  Can you
> at least get the "Congratulations..." page to appear?

yup


>
> I guess maybe some more background might help... has your site ever
> worked before on DreamHost?

i have, see the replyto russ

 Do you get this error only when calling a
> certain action?

it seems to be all requests. can't pull up anything.

Oh, and did you select FastCGI when setting up the
> virtual root in the DreamHost control panel?

yes

> Sorry for the seeminly dumb questions... just trying to think of all the
> stuff I had to look at when I had this problem before.

no problem, i apreciate the extra eyes!
Vicente Gallur V. (Guest)
on 2006-01-26 12:12
(Received via mailing list)
rich escribió:

>hi russ,  I've tries all your ideas, still no go. Oddly, to answer your
>first question, it did work at one point.  A few requests ran
>successfully and then I needed to update a few things and reload the
>app.  THis is where I get fuzzy.. I can't remember doing anything other
>than tring to hard code the RAILS[ENV] into environment.rb THis was
>before understanding how to best reload an app on a shared host.  But
>that files been replace by the origianl so I can't imagine that having
>any effect.
>
I experimented similar errors. If you work on Windows perhaps executing

dos2unix dispatch.*

fixes the problem, cleaning the characters that Windows uses for
carriage returns . It worked for me.

--
Vicente Gallur V.
http://www.vgcomunicacion.com
Rich B. (Guest)
on 2006-01-26 15:53
(Received via mailing list)
I've finally got it running. I cahnged two things. the first was to
uncomment the line:

ENV['RAILS_ENV'] ||= 'production'

in environment.rb

and the second was changing (per Dreamhost's wiki) the default code in
dispatch.fcgi to:


class MyRailsFCGIHandler < RailsFCGIHandler
SIGNALS = {
'TERM' => :exit_now,
}

def exit_now_handler(signal)
dispatcher_log :info, "ignoring request to terminate immediately"
end
end

MyRailsFCGIHandler.process! nil, 50

I'm not sure which is responsible for fixing the problem, but it's one
of the two...


On 1/26/06, Vicente Gallur V. <removed_email_address@domain.invalid> wrote:
> I experimented similar errors. If you work on Windows perhaps executing
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
http://brantinteractive.com
removed_email_address@domain.invalid
4034 skippack pike
v. 267.640.2195
f. 215.689.1454
Jeff C. (Guest)
on 2006-01-26 19:30
Rich B. wrote:
> I've finally got it running. I cahnged two things. the first was to
> uncomment the line:
>
> ENV['RAILS_ENV'] ||= 'production'
>
> in environment.rb
>

I suspect that was the problem all along.  Perhaps with this line
commented out, it was looking at the development environment instead?

If you're feeling adventurous, could you undo the other change you made
to dispatch.fcgi and report back?  (If you'd rather not it would be
understandable).

Thanks
Jeff
www.softiesonrails.com
Dave (Guest)
on 2006-01-30 17:43
Rich B. wrote:
> I've finally got it running. I cahnged two things. the first was to
> uncomment the line:
>
> ENV['RAILS_ENV'] ||= 'production'
>
> in environment.rb
>

Hi, I have a similar problem.

Where is environment.rb? I checked in config/environment.rb and there
was no such line that was commented out. The only thing that looks
similar is:

RAILS_ENV  = ENV['RAILS_ENV'] || 'development'

It says to "put it in your webserver's configuration as the RAILS_ENV
environment variable instead" but I'm not sure what it means. I've
changed dispatch.fgci already and I'm still getting a "application
failed to start properly" error and my Apache logs are similar.
Rich B. (Guest)
on 2006-01-30 19:35
(Received via mailing list)
> Where is environment.rb? I checked in config/environment.rb and there
> was no such line that was commented out. The only thing that looks
> similar is:
>

environment.rb is in the /config directory. but your line is correct
below

> RAILS_ENV  = ENV['RAILS_ENV'] || 'development'
>
> It says to "put it in your webserver's configuration as the RAILS_ENV
> environment variable instead" but I'm not sure what it means. I've
> changed dispatch.fgci already and I'm still getting a "application
> failed to start properly" error and my Apache logs are similar.

and if you request it from the command line, what do you see?
Dave (Guest)
on 2006-01-31 02:09
Rich B. wrote:
> and if you request it from the command line, what do you see?

Well, this brings up another problem. Maybe I don't have it turned on or
something, but I can't log in via SSH. Putty just automatically closes
afer I login.
That is a problem, another problem is that I don't have my DB set up
with the proper tables yet, but if that happens, shouldn't I get a
DB-specific rails error, instead of an "application failed?"
I have also heard that syntax errors could cause Rails to not start.
Anyway to check these errors? They work fine locally.
David M. (Guest)
on 2006-01-31 02:28
(Received via mailing list)
This might be obvious, but by default Dreamhost users only get ftp
access - not ssh.  You need to specifically enable each user to access
via ssh in the Control Panel.  If this isn't enabled, you'll get the
behaviour you're describing from Putty.

I use Putty myself on Dreamhost and it's very reliable.

Regards

Dave M.
Rich B. (Guest)
on 2006-01-31 04:43
(Received via mailing list)
> Well, this brings up another problem. Maybe I don't have it turned on or
> something, but I can't log in via SSH. Putty just automatically closes
> afer I login.

I second what david said.

> That is a problem, another problem is that I don't have my DB set up
> with the proper tables yet, but if that happens, shouldn't I get a
> DB-specific rails error, instead of an "application failed?"

perhaps, but if you can't successfully request dispatch.fcgi, then the
app will never load in the first place to make an entry to the log.


> I have also heard that syntax errors could cause Rails to not start.
> Anyway to check these errors? They work fine locally.

ruby dispatch.fcgi from the command line :)
zdennis (Guest)
on 2006-01-31 05:07
(Received via mailing list)
Rich B. wrote:
>>DB-specific rails error, instead of an "application failed?"
>
> ruby dispatch.fcgi from the command line :)

Check the shebang line in the dispatch.fcgi file. If you are using the
default that ships then it is
setup for something crazy like /usr/local/bin/ruby ... which I think is
a OSX default. Crazy mac people.

Zach
Juan Lupión (Guest)
on 2006-01-31 08:35
(Received via mailing list)
Oh, and don't forget to check that your public/.htaccess file refers
dispatch.fcgi and NOT dispatch.cgi.

> Check the shebang line in the dispatch.fcgi file. If you are using the default that 
ships then it is
> setup for something crazy like /usr/local/bin/ruby ... which I think is a OSX default. 
Crazy mac people.

--
Dave (Guest)
on 2006-01-31 22:09
Ah, thanks guys. I've checked the .htaccess and the shebang line but
they all match. I've followed almost all of the standard troubleshooting
procedures that I can, such as 775'ing, the shebang line, .htaccess,
production, and others. I have written to Dreamhost support about the
SSH access, does anyone know how to activate it or another way to run
dispatch.fcgi?
Siva J. (Guest)
on 2006-01-31 22:50
(Received via mailing list)
just try running dispatch.fcgi manually
it will show u if it has any problems


On 1/31/06, Dave <removed_email_address@domain.invalid> wrote:
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>



--

Rgds,
--Siva J.
http://www.varcasa.com/
My First Rails Project. Powered by Typo and soon by RForum too
Dave (Guest)
on 2006-02-02 01:51
Siva J. wrote:
> just try running dispatch.fcgi manually
> it will show u if it has any problems
>

Okay, after running dispatch.fcgi, it says I have an error on line 21,
which reads:

require File.dirname(__FILE__) + "/../config/environment"

Could part of the problem be that I didn't create this via "rails
appname"? What do you think I should do?

Thanks for all the help!
Jon S. (Guest)
on 2006-02-02 02:06
(Received via mailing list)
Rails works on Dreamhost, my apps are running there without problem.

To enable ssh access:

http://panel.dreamhost.com
login to your account
Click users
Click manage user
Click on your user id
Click edit
Check the box next to shell
Click Save Changes

--
Jon S.
removed_email_address@domain.invalid
Rich (Guest)
on 2006-02-05 13:13
Rich B. wrote:
>> Well, this brings up another problem. Maybe I don't have it turned on or
>> something, but I can't log in via SSH. Putty just automatically closes
>> afer I login.
>
> I second what david said.
>
>> That is a problem, another problem is that I don't have my DB set up
>> with the proper tables yet, but if that happens, shouldn't I get a
>> DB-specific rails error, instead of an "application failed?"
>
> perhaps, but if you can't successfully request dispatch.fcgi, then the
> app will never load in the first place to make an entry to the log.
>
>
>> I have also heard that syntax errors could cause Rails to not start.
>> Anyway to check these errors? They work fine locally.
>
> ruby dispatch.fcgi from the command line :)

Well, if you run dispatch.fcgi from the command line, all you get is:

"Status: 500 Internal Server Error"

And in the error log you get:

Sun Feb  5 02:47:45 2006] [error] [client 12.222.74.240] FastCGI: comm
with (dynamic) server "/path-to-app/public/dispatch.fcgi" aborted:
(first read) idle timeout (120 sec)
[Sun Feb  5 02:47:45 2006] [error] [client 12.222.74.240] FastCGI:
incomplete headers (0 bytes) received from server
"/path-to-app/public/dispatch.fcgi"

This is an infrastructure issue meaning that either Dreamhost can't
figure out how to get ruby running or Ruby just isn't ready for use as
anything clost to a production application. Webbrick/development works
great -- ruby+apache/fastcgi just plain sucks!
Jon S. (Guest)
on 2006-02-05 17:02
(Received via mailing list)
On 2/5/06, Rich <removed_email_address@domain.invalid> wrote:
> This is an infrastructure issue meaning that either Dreamhost can't
> figure out how to get ruby running or Ruby just isn't ready for use as
> anything clost to a production application. Webbrick/development works
> great -- ruby+apache/fastcgi just plain sucks!

Dreamhost is working just fine using Apache for me.

Did you do:
panel.dreamhost.com
domains/manage domains/.edit
Web Directory

And point Apache at your Rails app? You need to point into the public
directory.

--
Jon S.
removed_email_address@domain.invalid
Jon S. (Guest)
on 2006-02-05 17:05
(Received via mailing list)
On 2/5/06, Rich <removed_email_address@domain.invalid> wrote:

When you copied your app up to the host, did you include the hidden
.htaccess file generated by Rails in the public directory?

--
Jon S.
removed_email_address@domain.invalid
Ezra Z. (Guest)
on 2006-02-05 22:37
(Received via mailing list)
On Feb 5, 2006, at 3:13 AM, Rich wrote:

>>> with the proper tables yet, but if that happens, shouldn't I get a
>> ruby dispatch.fcgi from the command line :)
> [Sun Feb  5 02:47:45 2006] [error] [client 12.222.74.240] FastCGI:
> incomplete headers (0 bytes) received from server
> "/path-to-app/public/dispatch.fcgi"
>
> This is an infrastructure issue meaning that either Dreamhost can't
> figure out how to get ruby running or Ruby just isn't ready for use as
> anything clost to a production application. Webbrick/development works
> great -- ruby+apache/fastcgi just plain sucks!
>

Do not use running dispatch.fcgi from the command line as a test for
anything. If your app is configured properly, you will always get a
500 error from dispatch.fcgi on the command line. It expects to be
spoken to using the fcgi protocol and when you run it from the cli it
doesn't get that so it gives the 500 error. Dispatch.cgi on the other
hand can be run from the cli.  Just and FYI

Cheers-
-Ezra Z.
WebMaster
Yakima Herald-Republic Newspaper
removed_email_address@domain.invalid
509-577-7732
Rich B. (Guest)
on 2006-02-06 02:15
(Received via mailing list)
although it will potentially shed light on an improperly configured
app, such as typos, unknown method errrors and the like. I had a typo
in my production environment and the command line is how I was able to
catch it.

On 2/5/06, Ezra Z. <removed_email_address@domain.invalid> wrote:

> Yakima Herald-Republic Newspaper
> removed_email_address@domain.invalid
> 509-577-7732
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
http://brantinteractive.com
removed_email_address@domain.invalid
4034 skippack pike
v. 267.640.2195
f. 215.689.1454
Christer (Guest)
on 2007-02-28 17:36
Rich B. wrote:
> although it will potentially shed light on an improperly configured
> app, such as typos, unknown method errrors and the like. I had a typo
> in my production environment and the command line is how I was able to
> catch it.
>
> On 2/5/06, Ezra Z. <removed_email_address@domain.invalid> wrote:
>
>> Yakima Herald-Republic Newspaper
>> removed_email_address@domain.invalid
>> 509-577-7732
>> _______________________________________________
>> Rails mailing list
>> removed_email_address@domain.invalid
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>
>
> --
> http://brantinteractive.com
> removed_email_address@domain.invalid
> 4034 skippack pike
> v. 267.640.2195
> f. 215.689.1454



Hey guys.

I have the exact same problem trying to get Beast running on Dreamhost.
I have followed all the help in the wiki and i have other rails apps
working there, so i suspect its something else with the Beast files.

From error.log:

[Wed Feb 28 06:46:02 2007] [error] [client 213.112.85.87] FastCGI: comm
with (dynamic) server "/home/cb
ermar/cepta.deepdarkhole.net/http/dispatch.fcgi" aborted: (first read)
idle timeout (60 sec)
[Wed Feb 28 06:46:02 2007] [error] [client 213.112.85.87] FastCGI:
incomplete headers (0 bytes) receive       d from server
"/home/cbermar/cepta.deepdarkhole.net/http/dispatch.fcgi"

When running dispatch.fcgi and dispatch.cgi from command line i get
this:

[silk]$ ruby dispatch.fcgi
./../config/boot.rb:38:Warning: require_gem is obsolete.  Use gem
instead.
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:523:in
`read': No such file or directory - ../config/../config/database.yml
(Errno::ENOENT)
        from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:523:in
`database_configuration'
        from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:228:in
`initialize_database'
        from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:88:in
`process'
        from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:43:in `send'
        from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:43:in `run'
        from ./../config/environment.rb:13
        from dispatch.fcgi:21:in `require'
        from dispatch.fcgi:21
[silk]$ ruby dispatch.cgi
./../config/boot.rb:38:Warning: require_gem is obsolete.  Use gem
instead.
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:523:in
`read': No such file or directory - ../config/../config/database.yml
(Errno::ENOENT)
        from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:523:in
`database_configuration'
        from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:228:in
`initialize_database'
        from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:88:in
`process'
        from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:43:in `send'
        from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/initializer.rb:43:in `run'
        from ./../config/environment.rb:13
        from dispatch.cgi:3:in `require'
        from dispatch.cgi:3
[silk]$


Any ideas? Cant understand what i did wrong...
Russell N. (Guest)
on 2007-02-28 19:08
(Received via mailing list)
"No such file or directory - ../config/../config/database.yml"

Looks like your database.yml is missing from config. Is it possible
you've
got something like database.yml.sample and forgotten to copy it as
database.yml?

RSL

On 2/28/07, Christer <removed_email_address@domain.invalid> wrote:

Hey guys.
Christer (Guest)
on 2007-02-28 19:31
Russell N. wrote:
> "No such file or directory - ../config/../config/database.yml"
>
> Looks like your database.yml is missing from config. Is it possible
> you've
> got something like database.yml.sample and forgotten to copy it as
> database.yml?
>
> RSL
>
> On 2/28/07, Christer <removed_email_address@domain.invalid> wrote:
>
> Hey guys.

Hey,

Dont know why that happend to be honest, i started from scratch getting
source, setting up the paths etc from the wiki and now i get this when
running dispatch.fcgi.

[silk]$ ruby dispatch.fcgi
./../config/boot.rb:38:Warning: require_gem is obsolete.  Use gem
instead.
Install the ruby-openid gem to enable OpenID support
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.
rb:266:in `load_missing_constant': uninitialized constant
ActiveRecord::VERSION
(NameError)
        from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/
dependencies.rb:452:in `const_missing'
        from
/usr/lib/ruby/gems/1.8/gems/gettext-1.8.0/lib/gettext/active_record
.rb:49
        from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_
original_require'
        from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `requ
ire'
        from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/
dependencies.rb:495:in `require'
        from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/
dependencies.rb:342:in `new_constants_in'
        from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/
dependencies.rb:495:in `require'
        from
/usr/lib/ruby/gems/1.8/gems/gettext-1.8.0/lib/gettext/rails.rb:435
        from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_
original_require'
        from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `requ
ire'
        from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/
dependencies.rb:495:in `require'
        from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/
dependencies.rb:342:in `new_constants_in'
        from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/
dependencies.rb:495:in `require'
        from ./../config/environment.rb:69
        from dispatch.fcgi:21:in `require'
        from dispatch.fcgi:21

Seems to be complaining about ActiveRecord::VERSION not being set. Is
there any other logs that can be examined to find the cause of the
problem? I still only get a HTTP 500 when i try to run the app.

Thanks,

Christer
Christer (Guest)
on 2007-02-28 19:33
I might add that rake db:migrate works fine, so database.yml is not the
problem. Also, i created an empty rails app and that worked fine. Must
be something with one of the files or a dependency... grr..
Russell N. (Guest)
on 2007-02-28 23:16
(Received via mailing list)
Did you by chance edit your app on a Windows machine? You might want to
run
dos2unix on the files if so. I know that's been a problem for more than
a
few people on Dreamhost. Including myself before I switched to
developing in
Linux.

RSL
Christer (Guest)
on 2007-02-28 23:31
Russell N. wrote:
> Did you by chance edit your app on a Windows machine? You might want to
> run
> dos2unix on the files if so. I know that's been a problem for more than
> a
> few people on Dreamhost. Including myself before I switched to
> developing in
> Linux.
>
> RSL

No, i grabbed source (Beast) from their subversion repository, and used
vi to edit the files on the dreamhost servers. Thanks for the tip tho.
Christer (Guest)
on 2007-03-02 14:22
No more ideas? Starting to doubt i will get this running if there are no
logs to tell me what fails. A bit hard to debug then. I guess the output
from dispatch.fcgi above suggests that there is a problem with
ActiveRecord (ActiveRecord::VERSION) but i dont know how that could be
since its a core module of rails.

Could it be some environment setting missing or such? Would really
appreciate any help here.

Rich B., if you read this, would you mind mailing me personally? If
you could send me a zip with your app's files i would be most greatful.
Might be something in there. I check all in panel and the wiki tutorial
so im really clueless what it could be.

Cheers.
Christer (Guest)
on 2007-03-02 14:23
Oh, incase i dont get it running, are there any other nice Rails forum
alternatives for Beast? Would really like to get one up, not necessarily
Beast.

Thanks.
Nick S. (Guest)
on 2007-03-02 16:35
This one, RForum, you can find it at http://rforum.andreas-s.net/

Nick
---
http://www.railshostinginfo.com
Compare Rails hosting companies
Christer (Guest)
on 2007-03-02 20:36
Nick S. wrote:
> This one, RForum, you can find it at http://rforum.andreas-s.net/
>
> Nick
> ---
> http://www.railshostinginfo.com
> Compare Rails hosting companies

Hi, looks pretty nice but i would prefer to get Beast running. Has a
richer styling and seems to have most needed features.

I started all over again, following these steps:

1. in dreamhost control panel, create a sub-domain called y.x.com.
2. make sure FastCGI is enabled.
3. point the web root to y.x.com/trunk/public.
4. svn checkout http://svn.techno-weenie.net/projects/beast/trunk.
5. rake freeze_edge.
6. gem install RedCloth (already installed).
7. copy config/database.example.yml to database.yml and set it
correctly.
8. rake db:schema:load RAILS_ENV=production (complains about
ActiveRecord::VERSION, without RAILS_ENV param works fine).
9. change SALT in config/environment.rb.
10. update .htaccess so RewriteRule points to dispatch.fcgi.
11. add the RailsFCGIHandler class in dispatch.fcgi as dreamhost wiki
explains.
12. update shebang line in public/dispatch.cgi, public/dispatch.fcgi and
public/dispatch.rb.
13. set ENV['RAILS_ENV'] to ||= 'production' in config/environment.rb.
14. check permissions, specially public and log dirs (u+rwX,go-w).
15. check if all worked - alas, std 500 error response:

Application error
Rails application failed to start properly

Log files contains this:

logs/production:
--
# Logfile created on Fri Mar 02 09:53:33 -0800 2007 by logger.rb/1.5.2.9

logs/y.x.com/http/error.log:
--
[Fri Mar 02 10:05:48 2007] [error] [client 213.112.85.87] FastCGI: comm
with (dynamic) server
"/home/cbermar/c.deepdarkhole.net/trunk/public/dispatch.fcgi" aborted:
(first read) idle timeout (60 sec)
[Fri Mar 02 10:05:48 2007] [error] [client 213.112.85.87] FastCGI:
incomplete headers (0 bytes) received from server
"/home/cbermar/c.deepdarkhole.net/trunk/public/dispatch.fcgi"

Question: Where can i find more logs that might contain explain what the
problem is? Any ideas how to fix it? Im getting really bummed here,
please help out.

Cheers.
This topic is locked and can not be replied to.