如题:rails 项目执行 rake db:migrate 时候遇到如下错误
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-mysql2-adapter-0.0.3/lib/active_record/connection_adapters/mysql2_adapter.rb:606: warning: constant ::Fixnum is deprecated
rake aborted!
ArgumentError: wrong number of arguments (given 4, expected 1)
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:1066:in `type_to_sql'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-mysql2-adapter-0.0.3/lib/active_record/connection_adapters/mysql2_adapter.rb:520:in `type_to_sql'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/schema_creation.rb:19:in `type_to_sql'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/schema_creation.rb:34:in `visit_ColumnDefinition'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/schema_creation.rb:16:in `accept'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/schema_creation.rb:47:in `block in visit_TableDefinition'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/schema_creation.rb:47:in `map'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/schema_creation.rb:47:in `visit_TableDefinition'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/schema_creation.rb:16:in `accept'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:311:in `create_table'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-mysql2-adapter-0.0.3/lib/active_record/connection_adapters/mysql2_adapter.rb:439:in `create_table'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.2.1/lib/active_record/schema_migration.rb:29:in `create_table'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.2.1/lib/active_record/migration.rb:1187:in `initialize'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.2.1/lib/active_record/migration.rb:1036:in `new'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.2.1/lib/active_record/migration.rb:1036:in `up'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.2.1/lib/active_record/migration.rb:1011:in `migrate'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.2.1/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
/usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.2.1/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <main>'
/usr/local/rvm/gems/ruby-2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
ruby -v 2.4.0 rails -v 5.2.1
database.ym 配置是这样的
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
#
default: &default
adapter: mysql2
encoding: utf8
pool: 5
host: 39.108.184.220
port: 3306
username: username
password: password
development:
<<: *default
database: sanm_dev
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: sanm_test
production:
<<: *default
database: sanm_pro
gemfile 中相关是这样的
gem 'mysql2', '~>0.3.6'
gem 'activerecord-mysql2-adapter'
不是很明白发什么了什么,并且要怎么解决,希望大神们帮忙看看,指点一下