please install the mysql2 adapter
Opened this issue · 1 comments
lazywhite commented
/usr/local/ruby-2.3.1/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (Could not find 'mysql2' (~> 0.3.10) - did find: [mysql2-0.4.4] (LoadError)
Checked in 'GEM_PATH=/root/.gem/ruby/2.3.0:/usr/local/ruby-2.3.1/lib/ruby/gems/2.3.0', execute `gem env` for more information)
from /usr/local/ruby-2.3.1/lib/ruby/2.3.0/rubygems/dependency.rb:328:in `to_spec'
from /usr/local/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
from /usr/local/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22.2/lib/active_record/connection_adapters/mysql2_adapter.rb:3:in `<top (required)>'
from /usr/local/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
from /usr/local/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
from /usr/local/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from /usr/local/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-3.2.22.2/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-3.2.22.2/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-3.2.22.2/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in `resolve_hash_connection'
from /usr/local/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:29:in `spec'
from /usr/local/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-3.2.22.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
from /usr/local/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/mongify-1.2.4/lib/mongify/database/sql_connection.rb:40:in `setup_connection_adapter'
from /usr/local/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/mongify-1.2.4/lib/mongify/database/sql_connection.rb:56:in `has_connection?'
from /usr/local/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/mongify-1.2.4/lib/mongify/cli/command/worker.rb:95:in `check_sql_connection'
from /usr/local/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/mongify-1.2.4/lib/mongify/cli/command/worker.rb:64:in `execute'
from /usr/local/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/mongify-1.2.4/lib/mongify/cli/application.rb:28:in `execute!'
from /usr/local/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/mongify-1.2.4/bin/mongify:15:in `<top (required)>'
from /usr/local/ruby/bin/mongify:23:in `load'
from /usr/local/ruby/bin/mongify:23:in `<main>'
here is my database.confi
sql_connection do
adapter "mysql2"
host "localhost"
username "root"
password "root"
database "jiedianqian_test"
end
mongodb_connection do
host "develop_env"
database "udw"
end
but after run 'gem install activerecord-mysql2-adapter' , it still prompt this error
pedrosalpr commented
Try change the line adapter "mysql2"
to adapter "mysql"
.
And install gem install activerecord-mysql-adapter
I run with mysql instead of mysql2