Deployment on Dreamhost - Application Error

Hi, i’m a newb, just taught myself ruby/rails in the past 2 months and
have been having headache after headache. i need to get my app running
by the end of the week or my boss is going to kill me. The app runs
great on my local machine, but i’ve been having a ridiculous amount of
trouble deploying it on dreamhost. I’ve got everything uploaded into
the correct directory, i’ve added my .htaccess file and my
deployment.fcgi file. I’m on Windows. i emailed dreamhost support
yesterday and fixed a few things (before i emailed them i was getting an
internal server error). i fixed my .htaccess file and dispatch.fcgi
file like they told me and now i’m getting an application error, telling
me my app failed to start.

my question is - where do i go from here? i have little to no idea
what is wrong with my app, and all i need is for it to start working so
my boss won’t kill me. I’m an intern, and i really need to get this
going so i can actually feel like i’ve been doing something for the past
two months.

how do i go about getting an error log once my app is already on the
dreamhost server? I want to generate some sort of error log so i can be
more specific as to what problem i’m having so i can get some more help.
Any ideas?

First off, deployment is not trivial so if you are an intern you should
be doing this under the supervision of a more experienced
developer/system adm. In other words, your boss made a mistake and
assigned you to the wrong position or is deliberately using you as cheap
workforce (which happens a lot, btw).
My suggestion is that you talk to your boss and ask him/her to hire some
kind of special support from Dreamhost to get this done because as an
intern you don’t have the necessary experience.

If you’ve got ssh access, try calling dispatch.fcgi directly from the
command line. That will show you whatever error message is coming up.

–Matt J.

On Jul 8, 2:07 am, Tony S. [email protected]

Pepe J. wrote:

First off, deployment is not trivial so if you are an intern you should
be doing this under the supervision of a more experienced
developer/system adm. In other words, your boss made a mistake and
assigned you to the wrong position or is deliberately using you as cheap
workforce (which happens a lot, btw).
My suggestion is that you talk to your boss and ask him/her to hire some
kind of special support from Dreamhost to get this done because as an
intern you don’t have the necessary experience.

my boss asked me to make some web forms for us to sign up new affiliates
and customers with - i made the decision to learn rails on my own. as
an intern, i’m given a lot of freedom which i couldn’t be more grateful
for. the web forms weren’t urgent, and i was looking for a learning
experience. i had heard about how intuitive/convenient rails was and
decided that i would take the time to learn it. that’s why i really
like my boss and my internship - he gives me the opportunity to learn.
if had any idea how much of a nightmare it would be to deploy this, i
wouldn’t have even considered doing this. we’re a small, start-up
company so just “hiring some special support” isn’t an option. this was
my own mistake, i really really really just want to fix it.

i called dispatch.fcgi and this is what i got -

[catwoman]$ cd /home/tstrick4/holidayautosasia.pooldrive.com/log
[catwoman]$ tail -f fastcgi.crash.log
[07/Jul/2009:16:15:52 :: 2998] starting
[07/Jul/2009:16:22:00 :: 2998] Dispatcher failed to catch: (Interrupt)
/home/tstrick4/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:77:in
each' /home/tstrick4/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:77:inprocess_each_request’
/home/tstrick4/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:76:in
catch' /home/tstrick4/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:76:inprocess_each_request’
/home/tstrick4/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:51:in
process!' /home/tstrick4/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:23:inprocess!’
./dispatch.fcgi:32
stopping after unhandled signal

my code is attached, if it helps. i really appreciate any help you guys
can give me, i’ve been google searching and trying to figure this out
for a week.

Tony S. wrote:

my boss asked me to make some web forms for us to sign up new affiliates
and customers with - i made the decision to learn rails on my own. as
an intern, i’m given a lot of freedom which i couldn’t be more grateful
for. the web forms weren’t urgent, and i was looking for a learning
experience. i had heard about how intuitive/convenient rails was and
decided that i would take the time to learn it. that’s why i really
like my boss and my internship - he gives me the opportunity to learn.
if had any idea how much of a nightmare it would be to deploy this, i
wouldn’t have even considered doing this. we’re a small, start-up
company so just “hiring some special support” isn’t an option. this was
my own mistake, i really really really just want to fix it.

ok, i just got the wrong idea when you said “all i need is for it to
start working so my boss won’t kill me”. :slight_smile:
but i have to say that your boss didn’t give you the opportunity to
learn
at all. interns by definition should always work under the supervision
of
a tutor, someone to show you the directions and keep you out of
nightmares.
if this is not the case then you are a regular developer hired with
intern salary. i appreciate your commitment to get the job done but you
should be more realistic about your situation and your boss. cheers.

Matt H. wrote:

Tony S. wrote:

my boss asked me to make some web forms for us to sign up new affiliates

/home/tstrick4/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:76:in

my code is attached, if it helps. i really appreciate any help you guys
can give me, i’ve been google searching and trying to figure this out
for a week.

AFAIK, Dreamhost no long use fcgi. They moved over to Passenger some
months ago.

They do have several wiki articles about deploying rails apps to their
passenger servers. Unfortunately I don’t have the links to hand.

i was under the impression that passenger wasn’t compatible with
windows?

Tony S. wrote:

my boss asked me to make some web forms for us to sign up new affiliates

/home/tstrick4/.gem/ruby/1.8/gems/rails-2.3.2/lib/fcgi_handler.rb:76:in

my code is attached, if it helps. i really appreciate any help you guys
can give me, i’ve been google searching and trying to figure this out
for a week.

AFAIK, Dreamhost no long use fcgi. They moved over to Passenger some
months ago.

They do have several wiki articles about deploying rails apps to their
passenger servers. Unfortunately I don’t have the links to hand.

Tony,

If you’re looking for super simple deployment, I’d recommend switching
to http://Heroku.com. It doesn’t get any simpler and their entry
level service is free. You should have your application deployed in
less than 30 minutes.

Bryan

On Jul 9, 10:24 am, Tony S. [email protected]
wrote:

AFAIK, Dreamhost no long use fcgi. They moved over to Passenger some
months ago.

They do have several wiki articles about deploying rails apps to their
passenger servers. Unfortunately I don’t have the links to hand.

i was under the impression that passenger wasn’t compatible with
windows?

As far as I know, Dreamhost only runs Linux servers. Assuming you’re
on one, take a look at this article:

http://wiki.dreamhost.com/Passenger

You’ll probably want to vendor Rails before switching, as Dreamhost
may not have the latest version of Rails installed.

–Matt J.

Bryan A. wrote:

Tony,

If you’re looking for super simple deployment, I’d recommend switching
to http://Heroku.com. It doesn’t get any simpler and their entry
level service is free.

Yeah, Heroku is wonderful and beautifully designed – except that it
doesn’t work. Really, I so want to love it, but every time I’ve tried
to deploy anything nontrivial there, I’ve run into serious problems
(usually involving gems) that I can’t fix since there’s no shell access.

If the OP has a relatively simple app, Heroku may be a great solution.
But if it doesn’t work, he’s SOL.

You should have your application deployed in
less than 30 minutes.

Or not at all. :smiley:

Seriously, if Dreamhost is using Passenger, deployment should be
extremely easy there too. Check the Passenger docs for general info and
do use any documentation that DH provides.

Bryan

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Pepe J. wrote:

heroku seems very nice, i was about to deploy an app there to
check it out but they do not support mysql. :frowning:

Shouldn’t matter. Most Rails apps are DB-neutral enough that Heroku
should support them just fine.

(And PostgreSQL, which Heroku uses, is a better DB anyway…)

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

heroku seems very nice, i was about to deploy an app there to
check it out but they do not support mysql. :frowning:

Marnen Laibow-Koser wrote:

Shouldn’t matter. Most Rails apps are DB-neutral enough that Heroku
should support them just fine.

this particular app uses mysql specific features.

http://wiki.dreamhost.com/Passenger

You’ll probably want to vendor Rails before switching, as Dreamhost
may not have the latest version of Rails installed.

Passenger can make it pretty easy to deploy on Dreamhost.

Just log into your Dreamhost Web Panel select “Manage Domains”, and
edit the settings of the domain that you want to host with Passenger.

In the settings select the check box for “Ruby on Rails Passenger
(mod_rails)?” and set “Specify your web directory:” to “/home/username/
mysite.com/public”.

Once you have that all set up, you can also use Capistrano to help you
deploy the site. Here is a sample deploy.rb file:

http://gist.github.com/145348

Hope that helps.

-Tony Pelaez

Pepe J. wrote:

Marnen Laibow-Koser wrote:

Shouldn’t matter. Most Rails apps are DB-neutral enough that Heroku
should support them just fine.

this particular app uses mysql specific features.

Like what? I confess that I’m extremely hard-put to think of a mySQL
feature that PostgreSQL doesn’t have. (Syntax is sometimes different,
but you probably shouldn’t be writing literal SQL in a non-portable way
in Rails.)

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Pepe J. wrote:
[…]

fulltext search. each database or indexing tool requires a different
implementation.

Sure, but isn’t there an abstraction layer just like with basic SQL in
ActiveRecord?

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Marnen Laibow-Koser wrote:

Like what? I confess that I’m extremely hard-put to think of a mySQL
feature that PostgreSQL doesn’t have. (Syntax is sometimes different,
but you probably shouldn’t be writing literal SQL in a non-portable way
in Rails.)

fulltext search. each database or indexing tool requires a different
implementation.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs