mysql - ActiveRecord::ConnectionNotEstablished getting started with Ruby on Rails -


i absolutely new ruby on rails , i'm following book that's written tutorial, bit outdated.

when run server , browse localhost:3000 not working right, following error: activerecord::connectionnotestablished

mysql installed in computer, databases created , of works in other example applications have been giving to.

this databases.yml file:

development:   adapter: mysql2   database: emporium_development   username: emporium   password: hacked  test:   adapter: mysql2   database: emporium_test   username: emporium   password: hacked 

i made sure mysql2 gem installed this: gem install mysql2

shed light on me please.

first setup gems running

bundle install 

then database needs created:

rake db:create 

if have pending migrations (and if don't can still run, won't anything):

rake db:migrate 

this should setup database works, provided gave correct password.

note if have database want rid of, can run

rake db:drop 

and try create database again.

does of solve problem ?


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -