无法在 Windows 上的 RubyStack 2.1-1 dev 下使用 Spree 运行 db:migrate
我正在尝试在 Spree Windows 上的 ="nofollow">RubyStack 2.1-1 开发。
我已经能够安装所有内容,但在初始化数据库时遇到问题。在文档(http://spreecommerce.com/documentation/getting_started.html)中说我需要运行 rake db:bootstrap
但它会抛出以下内容:
** Invoke db:bootstrap (first_time)
** Execute db:bootstrap
This task will destroy any data in the database. Are you sure you want to
continue? [y/n] y
** Invoke db:remigrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:remigrate
** Invoke db:migrate (first_time)
** Invoke environment
** Execute db:migrate
== SpreeZeroNineZero: migrating ==============================================
-- create_table("addresses", {:force=>true})
-> 0.0160s
-- create_table("adjustments", {:force=>true})
-> 0.0140s
-- create_table("assets", {:force=>true})
-> 0.0140s
-- create_table("calculators", {:force=>true})
-> 0.0140s
-- create_table("checkouts", {:force=>true})
-> 0.0350s
-- create_table("configurations", {:force=>true})
-> 0.0160s
-- add_index("configurations", ["name", "type"], {:name=>"index_configurations_on_name_and_type"})
rake aborted!
An error has occurred, all later migrations canceled:
Invalid date: BTREE
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/active_record/connection_adapters/mysql2_adapter.rb:44
6:in `each'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/active_record/connection_adapters/mysql2_adapter.rb:44
6:in `indexes'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/schema_statements
.rb:406:in `index_name_exists?'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/schema_statements
.rb:343:in `add_index'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/migration.rb:383:in `block in method_missing'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/migration.rb:359:in `block in say_with_time'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/1.9.1/benchmark.rb:294:in `measure'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/migration.rb:359:in `say_with_time'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/migration.rb:379:in `method_missing'
D:/Users/Administrator/Projects/Delko/src/db/migrate/20090823005402_spree_zero_nine_zero.rb:74:in `up'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/migration.rb:312:in `block in migrate'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/1.9.1/benchmark.rb:294:in `measure'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/migration.rb:312:in `migrate'
D:in `migrate'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/migration.rb:537:in `block (2 levels) in migra
te'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/migration.rb:613:in `call'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/migration.rb:613:in `ddl_transaction'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/migration.rb:536:in `block in migrate'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/migration.rb:523:in `each'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/migration.rb:523:in `migrate'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/migration.rb:433:in `up'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/migration.rb:415:in `migrate'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/railties/databases.rake:142:in `block (2 level
s) in <top (required)>'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `call'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `each'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/spree_core-0.40.2/lib/tasks/core.rake:53:in `block (2 levels) in <top (required)>'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `call'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `each'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/spree_core-0.40.2/lib/tasks/core.rake:71:in `block (2 levels) in <top (required)>'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `call'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `each'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
D:/Program Files/BitNami RubyStack Development/ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
D:/Program Files/BitNami RubyStack Development/ruby/bin/rake:19:in `load'
D:/Program Files/BitNami RubyStack Development/ruby/bin/rake:19:in `<main>'
不知道这是什么意思 =S
谢谢你
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
修复了以下问题: https://github.com/brianmario/mysql2/ issues?authenticity_token=7fc933f9b5509f3efc173dd57522872113f9878d#issue/71
似乎是x64版本的libmysql.dll有问题,所以他们建议下载mysql 5.1 x86并替换libmysql.dll。
所以我所做的是:
Fixed it following this: https://github.com/brianmario/mysql2/issues?authenticity_token=7fc933f9b5509f3efc173dd57522872113f9878d#issue/71
It seems to be a problem with the x64 version of libmysql.dll, so they suggested to download mysql 5.1 x86 and replace the libmysql.dll.
So what I did was: