user1367895
user1367895

Reputation: 1

Rails local server can't boot up

I'm trying to set up a local test server in my rails but I keep getting errors, errors that I can't find a solution online so this is why I came here. I'm a graphic designer so my knowledge of rails isn't that great, this is for work. Anyways here is the code when I try to boot up a test server...I'm guessing it's something to do with not being able to establish connection but just can't figure out how to fix that...

/Users/yungtsai/.rvm/gems/ruby-1.8.7-p352/gems/activerecord 3.1.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:62:in `establish_connection': development database is not configured
(ActiveRecord::AdapterNotSpecified)

Upvotes: 0

Views: 159

Answers (3)

Rustam Gasanov
Rustam Gasanov

Reputation: 15791

Go to {yourapp}/config/database.yml and type a correct params in the development section

Upvotes: 0

crftr
crftr

Reputation: 8546

Start by attempting to create+build your database from any existing migrations

rake db:create
rake db:migrate

If that doesn't work, rebuild it from the migrations (with a higher level of verbosity), and let us know if it throws any errors.

rake db:migrate:reset --trace

Upvotes: 1

tihm
tihm

Reputation: 620

It's likely that you do not have a database.yml file in the config/ folder.

Take a look at the Rails getting started guide section on configuring a database: http://guides.rubyonrails.org/getting_started.html#configuring-a-database

Upvotes: 0

Related Questions