Join the Stack Overflow Community
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

last day I have get a ruby on rails project. Know my question: How can I open this project (with postgres).

More information: My contribution is Windows. Ruby and Rails are both installed.

  1. First I navigate via cmd to my project folder

  2. I install the gemfiles with this prompt "bundle install"

  3. After that I try to run the thin server with this prompt "rails server"

Now I get the message that the database is confused. Database.yml is existing in the config folder.

Can someone help me?

share|improve this question
    
First thing I'd try is make sure that config/database.yml has the correct configuration to your database. try running postgres at the command line using the credentials, database name, host and port from that configuration. Look here for how to do run that tool: postgresql.org/docs/8.4/static/app-psql.html – jaydel Jul 13 at 18:46

If you're starting from scratch one option is to generate a fresh rails app with postgresql already set up as the default database.

From the command line: rails new MyApp --database=postgresql

Then move into the project directory with cd MyApp, bundle install your gemfile, and then create and migrate the database and run the server:

bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rails server   

Since you tagged Heroku, take a look at this guide from heroku for more detailed info

Hope that helps

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.