Can't to run db:migrate with Spree under RubyStack 2.1-1 dev on Windows
I'm trying to install Spree under RubyStack 2.1-1 dev on Windows.
I've been able to install everything, but I'm having problems with initializing the db. In the docs (http://spreecommerce.com/documentation/getting_started.html) says I need to run rake db:bootstrap
But it throws the following:
** 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.r开发者_JAVA技巧b: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>'
No clue what is this all about =S
Thank you
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:
- Downloaded mysql 5.1 x32 (zip archive)
- Replace {path-to-rubystack}/mysql/bin/libmysql.dll with the libmysql.dll from the downloaded zip.
- Re-run the db:bootstrap
- Enjoy Spree =)
精彩评论