Rails server fails to boot with mysql2 - Gems it requires, exists - mysql

This is me trying to use MySql on rails for the first time. This happens with using sqlite3 as well except it points to me do 'gem install activerecord-sqlite3-adapter`,the tells me there is no such gem named it.
I am using the lastest Ruby 2.0.
I am using the lastest Rails 3.2.13
I have the mysql2 (0.3.11) gem
I also have the activerecord-mysql2-adapter (0.0.3)
Yet... it is giving me the following message:
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/rubygems_integration.rb:214:in 'block in replace_gem': Please install the mysql2 adapter: 'gem install activerecord-mysql2-adapter' (mysql2 is not part of the bundle. Add it to Gemfile.) (LoadError)
The bundler ran when I executed rails new [project name]
If it was mysql2 gem's error, this command successfully installs mysql2 on 64 bit Windows systems:gem install mysql2 -v '0.3.11' -- '--with-mysql-lib="C:\MySQL\lib" --with-mysql-include="C:\MySQL\include"'
Gemfile generated is using gem 'mysql2'ok, normal as I have been told.
Database.yml is as follows:
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: shop_development
pool: 5
username: charlie
password: *******
host: localhost
And I have manually created a database called [projectname]_development.
C:\Users\Charlie\Documents\RailsProject\demo_app>rails s
=> Booting WEBrick
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/rubygems_integ
ration.rb:214:in `block in replace_gem': Please install the mysql2 adapter: `gem
install activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it
to Gemfile.) (LoadError)
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/mysql2_adapter.rb:3:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/dependencies.rb:251:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/dependencies.rb:251:in `block in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/dependencies.rb:251:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/abstract/connection_specification.rb:50:in `resol
ve_hash_connection'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/abstract/connection_specification.rb:41:in `resol
ve_string_connection'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/abstract/connection_specification.rb:130:in `esta
blish_connection'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/railtie.rb:82:in `block (2 levels) in <class:Railtie>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:36:in `instance_eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:36:in `execute_hook'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:42:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/base.rb:720:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/railtie.rb:88:in `block in <class:Railtie>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:30:in `instance_exec'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:30:in `run'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:55:in `block in run_initializers'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:54:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:54:in `run_initializers'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/a
pplication.rb:136:in `initialize!'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/r
ailtie/configurable.rb:30:in `method_missing'
from C:/Users/Charlie/Documents/RailsProject/demo_app/config/environment
.rb:5:in `<top (required)>'
from C:/Users/Charlie/Documents/RailsProject/demo_app/config.ru:3:in `re
quire'
from C:/Users/Charlie/Documents/RailsProject/demo_app/config.ru:3:in `bl
ock in <main>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder
.rb:51:in `instance_eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder
.rb:51:in `initialize'
from C:/Users/Charlie/Documents/RailsProject/demo_app/config.ru:in `new'
from C:/Users/Charlie/Documents/RailsProject/demo_app/config.ru:in `<mai
n>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder
.rb:40:in `eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder
.rb:40:in `parse_file'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.
rb:200:in `app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands/server.rb:46:in `app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.
rb:304:in `wrapped_app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.
rb:254:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands/server.rb:70:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands.rb:55:in `block in <top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands.rb:50:in `tap'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

Check for following things
Does your Gemfile have the entry saying gem 'mysql2' ?
What happens when you run $ bundle update command? any errors
Can you try the following command to generate your app,
rails new demo_app -d mysql
What error you get when you try the above app?

Related

MySQL gem is not installing on M1 mac

I am facing issue while installing MySQL gem on M1 mac. Bundle install fas failing to build mysql gem
An error occurred while installing mysql2 (0.5.3), and Bundler cannot continue.
In Gemfile:
mysql2
Found a solution which suggested to install mysql2 gem using following command
$ arch -x86_64 gem install mysql2 -v 0.5.3 -- --srcdir=/usr/local/mysql/include
This actually solved bundle install issue, but when i tried rails c got this error.
$ rails c
/Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': cannot load such file -- mysql2/mysql2 (LoadError)
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in `register'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `block in require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:299:in `load_dependency'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/mysql2-0.5.3/lib/mysql2.rb:36:in `<main>'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bundler-2.3.8/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bundler-2.3.8/lib/bundler/runtime.rb:55:in `each'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bundler-2.3.8/lib/bundler/runtime.rb:55:in `block in require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bundler-2.3.8/lib/bundler/runtime.rb:44:in `each'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bundler-2.3.8/lib/bundler/runtime.rb:44:in `require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/bundler-2.3.8/lib/bundler.rb:176:in `require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/spring-2.1.1/lib/spring/application.rb:92:in `require'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/spring-2.1.1/lib/spring/application.rb:92:in `preload'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/spring-2.1.1/lib/spring/application.rb:157:in `serve'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/spring-2.1.1/lib/spring/application.rb:145:in `block in run'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/spring-2.1.1/lib/spring/application.rb:139:in `loop'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/spring-2.1.1/lib/spring/application.rb:139:in `run'
from /Users/maneeshb/.rvm/gems/ruby-2.6.9/gems/spring-2.1.1/lib/spring/application/boot.rb:19:in `<top (required)>'
from /Users/maneeshb/.rvm/rubies/ruby-2.6.9/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/maneeshb/.rvm/rubies/ruby-2.6.9/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
Please help me to solve this issue.
This solved the issue
brew install openssl zstd mysql
LIBRARY_PATH=$(brew --prefix zstd)/lib/:$(brew --prefix openssl)/lib/ gem install mysql2

Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it to Gemfile.)

Trying to install gitlab
After I typed this:
sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
I'm getting this error:
RAILS_ENV=production
rake aborted!
Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (myis not part of the bundle. Add it to Gemfile.)
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/mysql2_adapter.rb:3:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/backports-3.3.2/lib/backports/tools.rb:328:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/backports-3.3.2/lib/backports/tools.rb:328:in `require_with_backports'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in `resolve_hash_connection'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in `resolve_string_connection'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/railtie.rb:82:in `block (2 levels) in <class:Railtie>'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:26:in `block in on_load'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:25:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:25:in `on_load'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/railtie.rb:74:in `block in <class:Railtie>'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/git/gitlab/config/environment.rb:5:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/backports-3.3.2/lib/backports/tools.rb:328:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/backports-3.3.2/lib/backports/tools.rb:328:in `require_with_backports'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application.rb:103:in `require_environment!'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application.rb:297:in `block (2 levels) in initialize_tasks'
Tasks: TOP => gitlab:env:info => environment
(See full trace by running task with --trace)
Inside gem list:
activerecord-mysql2-adapter (0.0.3)
bigdecimal (1.2.0)
bundler (1.12.5)
charlock_holmes (0.6.9.4)
io-console (0.4.2)
json (1.7.7)
minitest (4.3.2)
modernizr-rails (2.6.2)
mysql2 (0.4.4)
psych (2.0.0)
rake (11.2.2, 0.9.6)
rdoc (4.0.0)
test-unit (2.0.0.0)
I have tried changing the adapter to MySQL2 in config/database.yml.

Ruby on Rails installing - Ubuntu 15

I am trying to install RoR in Ubuntu 15(64 bit). I have done most of the installation process like installing rvm, ruby, mysql server, creating gemset.
rails new first_app
rvm gemset list
rvm gemset use rails3.2.13
rails new first_app
cd first_app/
bundle install
Above commads were executed successfully.
Ruby version 2.2.1
Rails version 3.2.13
When I am trying to start my server, I am getting error like below
rails s
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'coffee-rails'. (Bundler::GemRequireError)
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /home/ela/Documents/first_app/config/application.rb:7:in `<top (required)>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
My Gem file ::
source 'https://rubygems.org'
gem 'rails', '3.2.13'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
Same error for 'uglifier' gem also so I removed those 2 gems. Then I am getting error in mysql adapter.
rails s
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
=> Booting WEBrick
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/bundler-1.11.2/lib/bundler/rubygems_integration.rb:314:in `block in replace_gem': Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (can't activate mysql2 (~> 0.3.10), already activated mysql2-0.4.2. Make sure all dependencies are added to Gemfile.) (LoadError)
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/connection_adapters/mysql2_adapter.rb:3:in `<top (required)>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in `resolve_hash_connection'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in `resolve_string_connection'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/railtie.rb:82:in `block (2 levels) in <class:Railtie>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:42:in `each'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/base.rb:720:in `<top (required)>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/railtie.rb:88:in `block in <class:Railtie>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/ela/Documents/first_app/config/environment.rb:5:in `<top (required)>'
from /home/ela/Documents/first_app/config.ru:3:in `require'
from /home/ela/Documents/first_app/config.ru:3:in `block in <main>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/rack-1.4.7/lib/rack/builder.rb:51:in `instance_eval'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/rack-1.4.7/lib/rack/builder.rb:51:in `initialize'
from /home/ela/Documents/first_app/config.ru:in `new'
from /home/ela/Documents/first_app/config.ru:in `<main>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/rack-1.4.7/lib/rack/builder.rb:40:in `eval'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/rack-1.4.7/lib/rack/builder.rb:40:in `parse_file'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/rack-1.4.7/lib/rack/server.rb:200:in `app'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/rack-1.4.7/lib/rack/server.rb:304:in `wrapped_app'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/rack-1.4.7/lib/rack/server.rb:254:in `start'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
So I changed my gem mysql2 gem version to < 0.3
rake db:migrate --trace
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activesupport-3.2.13/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
============= WARNING FROM mysql2 =============
This version of mysql2 (0.2.24) isn't compatible with Rails 3.1 as the ActiveRecord adapter was pulled into Rails itself.
Please use the 0.3.x (or greater) releases if you plan on using it in Rails >= 3.1.x
============= END WARNING FROM mysql2 =============
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
rake aborted!
NoMethodError: undefined method `accept' for nil:NilClass
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `to_sql'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:38:in `select_values'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:587:in `get_all_versions'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:745:in `migrated'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:668:in `current_version'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:685:in `block in migrate'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:685:in `each'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:685:in `detect'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:685:in `migrate'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:570:in `up'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/migration.rb:551:in `migrate'
/home/ela/.rvm/gems/ruby-2.2.1#rails3.2.13/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:193:in `block (2 levels) in <top (required)>'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:240:in `call'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:240:in `block in execute'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:235:in `each'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:235:in `execute'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:179:in `block in invoke_with_call_chain'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:172:in `invoke_with_call_chain'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:165:in `invoke'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:150:in `invoke_task'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:in `block (2 levels) in top_level'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:in `each'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:in `block in top_level'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:115:in `run_with_threads'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:100:in `top_level'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:78:in `block in run'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
/home/ela/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:75:in `run'
/home/ela/.rvm/rubies/ruby-2.2.1/bin/rake:33:in `<main>'
Tasks: TOP => db:migrate
Someone please help me. Thanks in advance.
install nodejs
sudo apt-get install nodejs
then use
bundle install

Rails MySQL Connection Problems

I am having an issue connecting to the mysql database using rails. I'm a newbie to rails but I have tried the guide here:
rails + MySQL on OSX: Library not loaded: libmysqlclient.18.dylib
and this still does not work. I believe I have two installations of mysql installed and this is confusing rails.
I have MAMP installed with it's own mysql and I also have the rails mysql2 gem installed. When I follow the steps from the link provided above, I think this is using the MAMP mysql install instead of the mysql2 install that I have with rails gems so it isn't recognizing it.
Is there any way I can consolidate the two mysql's into one? Or is it easier to modify rails so it can see the mysql2 gem?
Here is my error:
~/Sites/RoR3-Essentials/simple_cms ->rails s
=> Booting WEBrick
=> Rails 3.2.13 application starting in development on http://localhost:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in
`connect': Unknown database 'simple_cms_development' (Mysql2::Error)
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
from /Users/markmilly/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
from /Users/markmilly/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.13/lib/active_record/railtie.rb:88:in `block in <class:Railtie>'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/markmilly/Sites/RoR3-Essentials/simple_cms/config/environment.rb:5:in `<top (required)>'
from /Users/markmilly/Sites/RoR3-Essentials/simple_cms/config.ru:3:in `require'
from /Users/markmilly/Sites/RoR3-Essentials/simple_cms/config.ru:3:in `block in <main>'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from /Users/markmilly/Sites/RoR3-Essentials/simple_cms/config.ru:in `new'
from /Users/markmilly/Sites/RoR3-Essentials/simple_cms/config.ru:in `<main>'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /Users/markmilly/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
#markmilly Answer to your last comment:
'rake db:create' creates the db that you specified in your config/database.yml file.
It will create the db for the current RAILS_ENV you're on. If the environment is not specified it will default to the development and test db's.
I see this answer is a bit late, but it might help someone else.

Rails 3.2.2 mysql2 adapter Error

I've been having trouble getting the mysql2 adapter working with the latest version of rails. I Just generated a new project. Added the following to my gemfile:
gem 'mysql2', '< 0.3.7'
then of course ran:
bundle install
I also modified my database.yml file:
development:
adapter: mysql2
encoding: utf8
database: blog_development
username: root
password: *********
socket: /tmp/mysql.sock
test:
adapter: mysql2
encoding: utf8
database: blog_test
username: root
password: ********
socket: /tmp/mysql.sock
production:
adapter: mysql2
encoding: utf8
database: blog_production
username: root
password: *********
socket: /tmp/mysql.sock
So when I try and run rake db:create, the following is the output.
$ rake db:create --trace
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
** Execute db:create
rake aborted!
Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (can't activate mysql2 (~> 0.3.10), already activated mysql2-0.3.6. Make sure all dependencies are added to Gemfile.)
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/rubygems_integration.rb:157:in `block in replace_gem'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.2/lib/active_record/connection_adapters/mysql2_adapter.rb:3:in `<top (required)>'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `block in require'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:48:in `resolve_hash_connection'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:27:in `spec'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:127:in `establish_connection'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.2/lib/active_record/railties/databases.rake:67:in `create_database'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.2/lib/active_record/railties/databases.rake:40:in `block (3 levels) in <top (required)>'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.2/lib/active_record/railties/databases.rake:40:in `each'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.2/lib/active_record/railties/databases.rake:40:in `block (2 levels) in <top (required)>'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/teddyknox/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/bin/rake:19:in `load'
/Users/teddyknox/.rvm/gems/ruby-1.9.3-p125/bin/rake:19:in `<main>'
Tasks: TOP => db:create
It's telling me to install:
gem install activerecord-mysql2-adapter
But this gem doesn't exist. I'm pretty confused. I've tried many different versions of mysql2 and none seem to work. Any ideas?
Using the following in the gemfile seemed to work:
gem "mysql2", "~> 0.3.11"
It looks like one of your gems requires mysql2 ~> 0.3.10 (meaning >= 0.3.10 && < 0.4), while you are requiring it < 0.3.7. Try removing the constraint on the version and bundle install again ?