我试图在RoR上进行rake db:migrate。但是在运行命令后,我收到以下错误(我也包含了跟踪)。你能告诉我它是如何被捆绑的吗?我试图回滚并重复该过程,但它没有工作....:
Malions-MacBook-Air:omrails malionhoxhallari$ rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
== 20141128222329 AddDeviseToUsers: migrating =================================
-- change_table(:users)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: no such table: users: ALTER TABLE "users" ADD "email" varchar(255) DEFAULT '' NOT NULL/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in `initialize'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in `new'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in `prepare'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/sqlite3_adapter.rb:334:in `block in execute'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activesupport-4.1.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/sqlite3_adapter.rb:334:in `execute'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:375:in `add_column'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/sqlite3_adapter.rb:457:in `add_column'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/schema_definitions.rb:490:in `block (3 levels) in <class:Table>'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/schema_definitions.rb:489:in `each'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/schema_definitions.rb:489:in `block (2 levels) in <class:Table>'
/Users/malionhoxhallari/code/omrails/db/migrate/20141128222329_add_devise_to_users.rb:5:in `block in up'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:349:in `change_table'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:649:in `block in method_missing'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:621:in `block in say_with_time'
/Users/malionhoxhallari/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:621:in `say_with_time'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:641:in `method_missing'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:406:in `method_missing'
/Users/malionhoxhallari/code/omrails/db/migrate/20141128222329_add_devise_to_users.rb:3:in `up'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:558:in `up'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:598:in `exec_migration'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:579:in `block (2 levels) in migrate'
/Users/malionhoxhallari/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:578:in `block in migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in `with_connection'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:577:in `migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:752:in `migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:991:in `block in execute_migration_in_transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:1037:in `block in ddl_transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/transactions.rb:208:in `transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:1037:in `ddl_transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:990:in `execute_migration_in_transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:952:in `block in migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:948:in `each'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:948:in `migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:807:in `up'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:785:in `migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:240:in `call'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:240:in `block in execute'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:235:in `each'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:235:in `execute'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/malionhoxhallari/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:165:in `invoke'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:156:in `invoke_task'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:112:in `block (2 levels) in top_level'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:112:in `each'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:112:in `block in top_level'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:121:in `run_with_threads'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:106:in `top_level'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:84:in `block in run'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:182:in `standard_exception_handling'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:79:in `run'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/bin/rake:33:in `<top (required)>'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/bin/rake:23:in `load'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/bin/rake:23:in `<main>'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: users: ALTER TABLE "users" ADD "email" varchar(255) DEFAULT '' NOT NULL
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in `initialize'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in `new'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in `prepare'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/sqlite3_adapter.rb:334:in `block in execute'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activesupport-4.1.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/sqlite3_adapter.rb:334:in `execute'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:375:in `add_column'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/sqlite3_adapter.rb:457:in `add_column'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/schema_definitions.rb:490:in `block (3 levels) in <class:Table>'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/schema_definitions.rb:489:in `each'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/schema_definitions.rb:489:in `block (2 levels) in <class:Table>'
/Users/malionhoxhallari/code/omrails/db/migrate/20141128222329_add_devise_to_users.rb:5:in `block in up'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:349:in `change_table'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:649:in `block in method_missing'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:621:in `block in say_with_time'
/Users/malionhoxhallari/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:621:in `say_with_time'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:641:in `method_missing'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:406:in `method_missing'
/Users/malionhoxhallari/code/omrails/db/migrate/20141128222329_add_devise_to_users.rb:3:in `up'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:558:in `up'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:598:in `exec_migration'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:579:in `block (2 levels) in migrate'
/Users/malionhoxhallari/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:578:in `block in migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in `with_connection'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:577:in `migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:752:in `migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:991:in `block in execute_migration_in_transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:1037:in `block in ddl_transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/transactions.rb:208:in `transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:1037:in `ddl_transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:990:in `execute_migration_in_transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:952:in `block in migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:948:in `each'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:948:in `migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:807:in `up'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:785:in `migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:240:in `call'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:240:in `block in execute'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:235:in `each'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:235:in `execute'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/malionhoxhallari/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:165:in `invoke'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:156:in `invoke_task'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:112:in `block (2 levels) in top_level'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:112:in `each'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:112:in `block in top_level'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:121:in `run_with_threads'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:106:in `top_level'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:84:in `block in run'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:182:in `standard_exception_handling'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:79:in `run'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/bin/rake:33:in `<top (required)>'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/bin/rake:23:in `load'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/bin/rake:23:in `<main>'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'
SQLite3::SQLException: no such table: users
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in `initialize'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in `new'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in `prepare'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/sqlite3_adapter.rb:334:in `block in execute'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activesupport-4.1.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/sqlite3_adapter.rb:334:in `execute'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:375:in `add_column'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/sqlite3_adapter.rb:457:in `add_column'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/schema_definitions.rb:490:in `block (3 levels) in <class:Table>'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/schema_definitions.rb:489:in `each'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/schema_definitions.rb:489:in `block (2 levels) in <class:Table>'
/Users/malionhoxhallari/code/omrails/db/migrate/20141128222329_add_devise_to_users.rb:5:in `block in up'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:349:in `change_table'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:649:in `block in method_missing'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:621:in `block in say_with_time'
/Users/malionhoxhallari/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:621:in `say_with_time'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:641:in `method_missing'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:406:in `method_missing'
/Users/malionhoxhallari/code/omrails/db/migrate/20141128222329_add_devise_to_users.rb:3:in `up'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:558:in `up'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:598:in `exec_migration'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:579:in `block (2 levels) in migrate'
/Users/malionhoxhallari/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:578:in `block in migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in `with_connection'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:577:in `migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:752:in `migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:991:in `block in execute_migration_in_transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:1037:in `block in ddl_transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/transactions.rb:208:in `transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:1037:in `ddl_transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:990:in `execute_migration_in_transaction'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:952:in `block in migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:948:in `each'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:948:in `migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:807:in `up'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/migration.rb:785:in `migrate'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.8/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:240:in `call'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:240:in `block in execute'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:235:in `each'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:235:in `execute'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/malionhoxhallari/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/task.rb:165:in `invoke'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:156:in `invoke_task'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:112:in `block (2 levels) in top_level'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:112:in `each'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:112:in `block in top_level'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:121:in `run_with_threads'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:106:in `top_level'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:84:in `block in run'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:182:in `standard_exception_handling'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/lib/rake/application.rb:79:in `run'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/gems/rake-10.4.0/bin/rake:33:in `<top (required)>'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/bin/rake:23:in `load'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/bin/rake:23:in `<main>'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
/Users/malionhoxhallari/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate
答案 0 :(得分:0)
您是否遵循了Devise自述文件中的所有步骤(https://github.com/plataformatec/devise)?
确保你跑了:
rails g devise:install
和
rails g devise User
迁移前。
由于跟踪的第一部分显示:SQLite3 :: SQLException:没有这样的表:用户所以我要做的第一件事就是检查迁移文件和schema.rb,看看你是否创建了users表正常。
以下是使用Devise工作schema.rb和迁移的示例:
schema.rb:
create_table "users", force: true do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.inet "current_sign_in_ip"
t.inet "last_sign_in_ip"
t.datetime "created_at"
t.datetime "updated_at"
t.string "role"
end
相应的迁移到更新架构:
class DeviseCreateUsers < ActiveRecord::Migration
def change
create_table(:users) do |t|
## Database authenticatable
t.string :email, null: false, default: ""
t.string :encrypted_password, null: false, default: ""
## Recoverable
t.string :reset_password_token
t.datetime :reset_password_sent_at
## Rememberable
t.datetime :remember_created_at
## Trackable
t.integer :sign_in_count, default: 0, null: false
t.datetime :current_sign_in_at
t.datetime :last_sign_in_at
t.inet :current_sign_in_ip
t.inet :last_sign_in_ip
## Confirmable
# t.string :confirmation_token
# t.datetime :confirmed_at
# t.datetime :confirmation_sent_at
# t.string :unconfirmed_email # Only if using reconfirmable
## Lockable
# t.integer :failed_attempts, default: 0, null: false
# t.string :unlock_token # Only if unlock strategy is :email or :both
# t.datetime :locked_at
t.timestamps
end
add_index :users, :email, unique: true
add_index :users, :reset_password_token, unique: true
# add_index :users, :confirmation_token, unique: true
# add_index :users, :unlock_token, unique: true
end
end