First app on Dreamhost with Passenger : "rails needs to know your username and password"?

I am trying to deploy my first rails app with Dreamhost. I ftp’d over
my existing app, turned on Passenger and pointed it to my /public
directory. When I go to ‘www.mydomain.com’ I get the ‘Ruby on Rails:
Welcome aboard’ default page, including the following:

Getting started
Here’s how to get rolling:

  1. Create your databases and edit config/database.yml

    Rails needs to know your login and password.

Is that message about rails needing to know your login and pwd
unusual? Because I’ve uploaded the database.yml with the correct
username/pwd for the hosting environment and changed the host from
localhost to mysql.mydomain.com. I created the databases on
Dreamhost’s cpanel, and then ran rake db:migrate from within ssh. The
migrations went fine, so I thought I had the user/pwd/host correct in
database.yml.

I’ve also done the ‘touch tmp/restart.txt’ thing and I still get the
‘welcome to rails’ page.

I am mostly a rails newb and completely a hosted *nix environment
newb, so I don’t even know where to start looking. Any suggestions?

Thanks

Did you remove index.html from your /public directory?

Sounds like it is still there.

Nope, it’s still there. Now I really feel like a dork. Also, my
regular ‘starting point’ I had been using was a different page, and it
is loading.

However, now it looks like my data isn’t there. I’m loading a couple
of lookup tables in the migrations (I know now that is discouraged,
but I’m still doing it for now) and they appear to not be loaded,
although the migrations didn’t throw any errors. Also the php_myadmin
page for mysql.mydomain.com isn’t loading either, so apparently there
are other issues.

thanks for your reply

No, I think my app is there. Now it looks like there’s a problem with
restful_authentication. I get my logon page and when I login, it
redirects me back to the login page. When I look at the log, it looks
like it’s working; it’s going through the SessionsController#create,
getting a Session ID, then it lists the params, then says ‘rendering
sessions/new’, and I’m back at the login page. In the
SessionsController.create method, the only path through the code that
renders back to the :new action also has a flash[:notice] that isn’t
showing. Here’s the create method:

def create
self.current_user = User.authenticate(params[:login], params
[:password])
if logged_in?
if params[:remember_me] == “1”
self.current_user.remember_me
cookies[:auth_token] = {
:value => self.current_user.remember_token ,
:expires => self.current_user.remember_token_expires_at }
end
respond_to do |format|
format.html do
flash[:notice] = “Logged in successfully”
logger.info(“Trying to direct successful login to user
home”)
redirect_to(home_url)
end
format.xml { render :xml => self.current_user.to_xml }
end
else
respond_to do |format|
format.html do
flash[:notice] = “Error logging in”
render :action => ‘new’
end
format.xml { render :text => “badlogin” }
end
end
end

Hmm… check the obvious stuff - that the user account exists and you
have the correct username and password - if you do and everything
database wise looks ok, can you post a bit of the log?

This is a long shot, but is the Dreamhost server running the most
recent version of Passenger? There was an issue with some Passenger
versions from earlier this year that exhibited very similar
behavior…

–Matt J.

No problem. It sounds to me like there is a bare Rails app there, not
your app.

Good luck - post back if you need more help :slight_smile: