Wednesday, January 16, 2013

Ruby MySQL ActiveRecord::ConnectionNotEstablished

Trying my first ruby on rails, got me into this problem.
Modify gemfile, and add this be:

#below gem 'sqlite3'
gem 'mysql2'


Example database.yaml

development:
  adapter: mysql2
  encoding: utf8
  database: yourdbname
  username: yourusername
  password: "your password"
  host: localhost
  port: 3306

No comments: