i am trying to use mysql as a database for my rails application.
here is what my database.yml file looks like
development:
adapter: mysql2
encoding: utf8
database: blog_development
pool: 5
username: root
password:
socket: /tmp/mysql.sock
and this is the error i am getting when i try the rake db:create command
hilarl@isa009:~/workspace/blog$ rake db:create rake aborted! Please
install the mysql2 adapter:gem install activerecord-mysql2-adapter
(mysql2 is not part of the bundle. Add it to Gemfile.)Tasks: TOP => db:create (See full trace by running task with –trace)
and when i try gem install activerecord-mysql2-adapter i get ‘ERROR: Could not find a valid gem ‘activerecord-mysql2-adaptor’ (>= 0) in any repository’
i am using ubuntu with ruby 1.9.3p194 and rails 3.2.3
what the contents of your Gemfile ?
you should add :
in your gem file, after that from your directory apps in terminal you should execute bundle install