"35.172.217.40 - 35.172.217.40"

Проблема совместимости? rake db: migrate - неправильное количество аргументов (1 для 0)

Я пытаюсь выполнить простую миграцию, и я получаю эту ошибку. Я думаю, что это какая-то ошибка совместимости. Как я могу это исправить и как я могу избежать проблем с совместимостью в будущем?


Migration: 'class CreateUsers < ActiveRecord::Migration
  def change
    create_table :users do |t|
      t.string :nume
      t.string :email
      t.string :localitate

      t.timestamps 
    end
  end
end
___________________

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', '>= 1.3.0'
# 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'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# 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
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'

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

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :jruby]

___________

Ошибка:

неправильное количество аргументов (1 для 0) C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/lib/active_record/connection_adapters/abstract_ adapter.rb: 271: in initialize' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/connection_adapters/abstract_adapter.rb:271:in новом' C : /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/connection_adapters/abstract_adapter.rb: 271: in substitute_at' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/relation.rb:97:in block in substitute_values 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/relation.rb: 96: в each' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/relation.rb:96:in each_with_index 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2. 0.beta4/li b/active_record/relatio n.rb: 96: in substitute_values' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/relation.rb:56:in insert 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/persistence.rb: 521: in _create_record' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/counter_cache.rb:139:in _create_record 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/attribute_methods/dirty.rb: 122: in _create_record' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/callbacks.rb:306:in блоке в _create_record 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport -4.2.0.beta4/l ib/active_support/callbacks.rb: 88: при call' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta4/l ib/active_support/callbacks.rb:88:in _run_callbacks 'C: /RailsInstaller/Ruby2.0.0/ lib/ruby /gems/2.0.0/gems/activesupport-4.2.0.beta4/l ib/active_support/callbacks.rb: 734: in _run_create_callbacks' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/callbacks.rb:306:in _create_record 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord- 4.2.0.beta4/li b/active_record/timestamp.rb: 57: in _create_record' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/persistence.rb:501:in create_or_update 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/callbacks.rb: 302: в block in create_or_update' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta4/l ib/active_support/callbacks.rb:88:in вызове 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta4/l ib/active_support/callbacks.rb: 88: in _run_callbacks' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta4/l ib/active_support/callbacks.rb:734:in _run_callbacks' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta4/l ib/active_support/callbacks.rb:734:in _run_save_callbacks 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/callbacks.rb: 302: in create_or_update' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/persistence.rb:142:in save!' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/validations.rb: 42: in save!' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/attribute_methods/dirty.rb:29:in save!' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/attribute_methods/dirty.rb:29:in save! ' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/transaction.rb: 289: в block in save!' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/transactions.rb:345:in block in save!' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/transactions.rb:345:in блоке with_transaction_returning_stat us 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/connection_adapters/abstract/database_statements.rb: 211: in tran saction' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/transactions.rb:218:in транзакции 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/transaction.rb: 342: in with_transaction_returning_status' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/transactions.rb:289:in save! ' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/persistence.rb: 51: in create!' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/migration.rb:1015:in create!' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/migration.rb:1015:in record_version_state_after_migrating 'C: /RailsInstaller/Ruby2. 0.0/lib/ruby /gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/migration.rb: 985: в block in execute_migration_in_transaction' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/migration.rb:1030:in блоке в ddl_transaction 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0. 0/gems/activerecord-4.2.0.beta4/li b/active_record/connection_adapters/abstract/database_statements.rb: 213: в bloc k in transaction' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/connection_adapters/abstract/transaction.rb:188:in inside_new_t ransaction 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/connection_adapters/abstract/database_statements.rb: 213: in tran saction' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/transactions.rb:218:in tran saction' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/transactions.rb:218:in транзакции "C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/migration.rb: 1030: in ddl_transaction' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/migration.rb:983:in execute_migration_in_transaction 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/migration.rb: 945: in block in migrate' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/migration.rb:941:in each 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/migration.rb: 941: in migrate' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/migration.rb:813:in up' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_reco rd/migration.rb: 791: in migrate' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/tasks/database_tasks.rb:137:in migrate 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta4/li b/active_record/railties/databases.rake: 44: в block (2 levels) in <top (require d)>' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4.0/lib/rake/task.r b:240:in вызове 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4.0/lib/rake/task.r b: 240: в block in execute' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4.0/lib/rake/task.r b:235:in каждом "C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4.0/lib/rake/task.rb: 235: in execute' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4.0/lib/rake/task.r b:179:in block in invoke_with_call_chain 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/monitor.rb: 211: in mon_synchronize' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4.0/lib/rake/task.r b:172:in mon_synchronize' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4.0/lib/rake/task.r b:172:in invoke_with_call_chain 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4.0/lib/rake/task.rb: 165: in invoke' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4.0/lib/rake/applic ation.rb:156:in invoke_task' C: /RailsInstaller/Ruby2.0.0/lib/ruby /gems/2.0.0/gems/rake-10.4.0/lib/rake/apply ation.rb: 112: в block (2 levels) in top_level' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4.0/lib/rake/applic ation.rb:112:in каждом 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4.0/lib/rake/applic ation.rb: 112: в block in top_level' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4.0/lib/rake/applic ation.rb:121:in run_with_threads 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4.0/lib/rake/applic ation. rb: 106: in top_level' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4.0/lib/rake/applic ation.rb:84:in блоке в run' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4 .0/lib/rake/apply ation.rb: 182: in standard_exception_handling' C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4.0/lib/rake/applic ation.rb:79:in run 'C: /RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.4.0/bin/rake: 33: in <top (required)>' C: /RailsInstaller/Ruby2.0.0/bin/rake:23:in load 'C: /RailsInstaller/Ruby2.0.0/bin/rake: 23: in' 'Задачи: TOP => db: migrate

0
источник поделиться
1 ответ

Ответ здесь: Не удается выполнить миграцию базы данных после эшафота. Раздел 2.2 Учебник по Ruby on Rails Майкл Хартл

Вам необходимо установить драгоценный камень isl, как указано там.

0
источник

Посмотрите другие вопросы по метке или Задайте вопрос