新手问题 Rails Migration 执行的时候遇到 wrong number of arguments (1 for 0)

easonlovejiven · 2015年01月27日 · 最后由 davidminaki 回复于 2015年01月27日 · 3061 次阅读

求大神....... 错误信息如下:gemfile 文件的版本号已经列下了。。。但不知道是哪个版本号配置的问题 -- create_table(:users) -> 0.0296s == 20150126025036 CreateUsers: migrated (0.0297s) =============================

rake aborted! StandardError: An error has occurred, this and all later migrations canceled:

wrong number of arguments(1 for 0)/home/weizhuli/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-4.2.0.beta4/lib/active_record/connection_adapters/abstract_adapter.rb:271:in `initialize'

gemfile 文件版本配置信息如下:

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.0.beta4'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '5.0.0.beta1'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '2.5.3'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '4.1.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jQuery as the JavaScript library
gem 'jquery-rails', '4.0.0.beta2'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks', '2.3.0'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '2.2.3'

gem 'rails-html-sanitizer','1.0.1'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '0.4.0', group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  gem 'sqlite3','1.3.9'
  # Call 'debugger' anywhere in the code to stop execution and get a debugger console

  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '2.0.0.beta3'

  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring', '1.1.3'
end

换 rails 4.2.0

2 楼 已删除
需要 登录 后方可回复, 如果你还没有账号请 注册新账号