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

**URL:** <https://www.ruby-forum.com/t/first-app-on-dreamhost-with-passenger-rails-needs-to-know-your-username-and-password/172034>\
**Category:** Rails\
**Created:** [July 13, 2009, 5:36pm UTC](https://www.ruby-forum.com/t/first-app-on-dreamhost-with-passenger-rails-needs-to-know-your-username-and-password/172034 "2009-07-13T17:36:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![brian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@brian](https://www.ruby-forum.com/u/brian)\
**Post date:** [July 13, 2009, 5:36pm UTC](https://www.ruby-forum.com/t/first-app-on-dreamhost-with-passenger-rails-needs-to-know-your-username-and-password/172034/1 "2009-07-13T17:36:05Z")

</div>

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](http://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

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](http://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

---

<div class="post-metadata">

**Author:** ![brian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@brian](https://www.ruby-forum.com/u/brian)\
**Post date:** [July 13, 2009, 5:42pm UTC](https://www.ruby-forum.com/t/first-app-on-dreamhost-with-passenger-rails-needs-to-know-your-username-and-password/172034/2 "2009-07-13T17:42:31Z")

</div>

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

Sounds like it is still there.

---

<div class="post-metadata">

**Author:** ![brian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@brian](https://www.ruby-forum.com/u/brian)\
**Post date:** [July 13, 2009, 7:29pm UTC](https://www.ruby-forum.com/t/first-app-on-dreamhost-with-passenger-rails-needs-to-know-your-username-and-password/172034/3 "2009-07-13T19:29:30Z")

</div>

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](http://mysql.mydomain.com) isn’t loading either, so apparently there  
are other issues.

thanks for your reply

---

<div class="post-metadata">

**Author:** ![brian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@brian](https://www.ruby-forum.com/u/brian)\
**Post date:** [July 13, 2009, 11:07pm UTC](https://www.ruby-forum.com/t/first-app-on-dreamhost-with-passenger-rails-needs-to-know-your-username-and-password/172034/4 "2009-07-13T23:07:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![brian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@brian](https://www.ruby-forum.com/u/brian)\
**Post date:** [July 14, 2009, 4:06am UTC](https://www.ruby-forum.com/t/first-app-on-dreamhost-with-passenger-rails-needs-to-know-your-username-and-password/172034/5 "2009-07-14T04:06:04Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![brian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@brian](https://www.ruby-forum.com/u/brian)\
**Post date:** [July 14, 2009, 4:40pm UTC](https://www.ruby-forum.com/t/first-app-on-dreamhost-with-passenger-rails-needs-to-know-your-username-and-password/172034/6 "2009-07-14T16:40:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![brian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@brian](https://www.ruby-forum.com/u/brian)\
**Post date:** [July 13, 2009, 9:13pm UTC](https://www.ruby-forum.com/t/first-app-on-dreamhost-with-passenger-rails-needs-to-know-your-username-and-password/172034/7 "2009-07-13T21:13:30Z")

</div>

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 🙂
