I have RoR 4.0 and ruby-1.9.3-p484 installed. gem install bundler
and bundle install
run without any errors. Then I need to create a db using rake db:create
and I'm getting following error (I get the same error on rake about
as well):
rake aborted! Could not load 'active_record/connection_adapters/mysql2_adapter'. Make sure that the adapter in config/database.yml is valid. If you use an adapter other than 'mysql', 'mysql2', 'postgresql' or 'sqlite3' add the necessary adapter gem to the Gemfile.
From gem list
:
activerecord-mysql2-adapter (0.0.3)
mysql2 (0.3.14)
rake (10.1.1, 0.9.2.2)
config/database.yml
adapter: mysql2
encoding: utf8
host: localhost
database: my_database
pool: 20
username: root
password:
socket: /tmp/mysql.sock
MySQL is running
Please let me know if I should share some more informaion. Thank you!!!
bundle list|grep sql
– Малъ Скрылевъgem 'mysql2'
– PinnyMbundle exec rake db:migrate
(and I hope you use some ruby manager, such as rvm, rbenv,...) – gotva