克隆ShopSpree 销售后,我按照安装说明进行操作,除了bundle exec rake spree_sample:load
. 它给了我以下错误:
asdf08:~/workspace (master) $ bundle exec rake spree_sample:load
Loaded Payment Methods samples
Loaded Shipping Categories samples
Loaded Shipping Methods samples
Loaded Tax Categories samples
Loaded Tax Rates samples
rake aborted!
Chewy::UndefinedUpdateStrategy: Index update strategy is undefined in current context.
Please wrap your code with `Chewy.strategy(:strategy_name) block.`
/usr/local/rvm/gems/ruby-2.3.0/gems/chewy-0.8.3/lib/chewy/strategy/base.rb:17:in `update'
/usr/local/rvm/gems/ruby-2.3.0/gems/chewy-0.8.3/lib/chewy/type/observe.rb:70:in `update_index'
/usr/local/rvm/gems/ruby-2.3.0/gems/chewy-0.8.3/lib/chewy/type/observe.rb:28:in `block in update_proc'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:446:in `instance_exec'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:446:in `block in make_lambda'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:263:in `block in simple'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:506:in `block in call'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:506:in `each'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:506:in `call'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:778:in `_run_commit_callbacks'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/transactions.rb:314:in `committed!'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/transaction.rb:89:in `commit_records'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/transaction.rb:153:in `commit'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/transaction.rb:175:in `commit_transaction'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `within_new_transaction'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/transactions.rb:220:in `transaction'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/transactions.rb:348:in `with_transaction_returning_status'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/transactions.rb:291:in `save!'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/persistence.rb:51:in `create!'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/spree-a275c9db4f0c/sample/db/samples/products.rb:129:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/spree-a275c9db4f0c/sample/db/samples/products.rb:124:in `each'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/spree-a275c9db4f0c/sample/db/samples/products.rb:124:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/usr/local/rvm/gems/ruby-2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/spree-a275c9db4f0c/sample/lib/spree/sample.rb:13:in `load_sample'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/spree-a275c9db4f0c/sample/lib/spree_sample.rb:16:in `load_samples'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/spree-a275c9db4f0c/sample/lib/tasks/sample.rake:20:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/cli/exec.rb:74:in `load'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/cli/exec.rb:74:in `kernel_load'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/cli/exec.rb:27:in `run'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/cli.rb:332:in `exec'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/cli.rb:20:in `dispatch'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/cli.rb:11:in `start'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/exe/bundle:34:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/exe/bundle:26:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/bin/bundle:23:in `load'
/usr/local/rvm/gems/ruby-2.3.0/bin/bundle:23:in `<main>'
/usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => spree_sample:load
(See full trace by running task with --trace)
但是我尝试启动铁路服务器,它给了我类似下面的东西,没有任何样式。我认为页面没有完全加载。
当我尝试在创建管理员用户 db:seed 时使用给定凭据登录时,它会继续显示您必须在继续之前确认您的帐户。 提供无效凭据会显示无效的电子邮件或密码。所以这意味着我在这里的凭据没有任何问题。
我知道这个应用程序是Spree Android App的后端 api 。
在这件事上,任何帮助都是显而易见的。谢谢你。