我做了installfest项目设置:
http://installfest.railsbridge.org/installfest/create_a_rails_app
在执行rake db:migrate
时遇到此错误。
我尝试过重新安装导轨和红宝石,但这没有用。
使用:
Ubuntu在Windows 8.1主机上设置了vagrant(VM)
vagrant@vagrant-ubuntu-trusty-64:/vagrant/odin/test_app$ rake db:migrate --trace
**调用db:migrate(first_time) **调用环境(first_time) **执行环境 **调用db:load_config(first_time) **执行db:load_config **执行db:migrate 耙子流产了! ActiveRecord :: StatementInvalid:SQLite3 :: IOException:磁盘I / O错误:SELECT名称 来自sqlite_master WHERE(type =' table' OR type =' view')AND NOT name =' sqlite_sequence' AND name =" schema_migrations" /home/vagrant/.rvm/gems/ruby-2.2.1/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in
initialize' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in
新' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in exec_query中的prepare' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:296:in
阻止' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:inblock in log' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in
instrument' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:inlog' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:293:in
exec_query' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:374:intables' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:380:in
table_exists?' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/schema_migration.rb:21:intable_exists?' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/schema_migration.rb:25:in
CREATE_TABLE' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:805:ininitialize_schema_migrations_table' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:922:in
初始化' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:820:innew' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:820:in
起来' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:798:inmigrate' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/tasks/database_tasks.rb:137:in
迁移&#39; /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/railties/databases.rake:44:inblock (2 levels) in <top (required)>' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:240:in
呼叫&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:240:inblock in execute' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:235:in
各&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:235:in {* 1}}阻止invoke_with_call_chain&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/monitor.rb:211:inexecute' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:179:in
invoke_with_call_chain&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:165:inmon_synchronize' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:172:in
invoke_task&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:ininvoke' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:150:in
各&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:inblock (2 levels) in top_level' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:in
run_with_threads&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:100:inblock in top_level' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:115:in
阻止运行&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:176:intop_level' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:78:in
运行&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/bin/rake:33:instandard_exception_handling' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:75:in
初始化&#39; /home/vagrant/.rvm/gems/ruby-2.2.1/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in<main>' SQLite3::IOException: disk I/O error /home/vagrant/.rvm/gems/ruby-2.2.1/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in
制备&#39; /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:296:innew' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in
阻止日志&#39; /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:inblock in exec_query' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in
登录&#39; /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:293:ininstrument' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in
表&#39; /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:380:inexec_query' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:374:in
table_exists?&#39; /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/schema_migration.rb:25:intable_exists?' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/schema_migration.rb:21:in
initialize_schema_migrations_table&#39; /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:922:increate_table' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:805:in
新&#39; /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:820:ininitialize' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:820:in
迁移&#39; /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/tasks/database_tasks.rb:137:inup' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:798:in
阻止(2级)&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:240:inmigrate' /home/vagrant/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/railties/databases.rake:44:in
阻止执行&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:235:incall' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:240:in
执行&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:179:ineach' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:235:in
mon_synchronize&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:172:inblock in invoke_with_call_chain' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/monitor.rb:211:in
调用&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:150:in top_level中的invoke_with_call_chain' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:165:in
阻止(2个级别)&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:in top_level中的invoke_task' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:in
阻止&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:115:ineach' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:in
TOP_LEVEL&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:78:inrun_with_threads' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:100:in
standard_exception_handling&#39; /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:75:inblock in run' /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:176:in
&#39; 任务:TOP =&gt;分贝:迁移
答案 0 :(得分:0)
我解决了这个问题,更改了NFS共享文件夹挂载选项!
mount_options:['nolock,vers=3,udp,noatime,actimeo=1']
现在rake db:migrate运行正常!