我有一个 Rails 3.2, Ruby 1.9 应用程序,我正在尝试使用bandit gem进行设置。
我已经捆绑安装了 gem,运行bandit:install并修改了 和 的(bandit.yml用于开发)值。round_robinmemory
但是,所有启动开发服务器 ( ) 的尝试都会rails s导致以下错误:
/Users/michaelbuckbee/Sites/bshapp/config/routes.rb:148:in `block in ': 未初始化常量 Bandit::Engine (NameError)
来自 /Users/michaelbuckbee/.rvm/gems/ruby-1.9.3-p0@bshapp/gems/actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:282:in `instance_exec'
来自 /Users/michaelbuckbee/.rvm/gems/ruby-1.9.3-p0@bshapp/gems/actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:282:in `eval_block'
来自 /Users/michaelbuckbee/.rvm/gems/ruby-1.9.3-p0@bshapp/gems/actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:260:in `draw'
来自 /Users/michaelbuckbee/Sites/bshapp/config/routes.rb:1:in `'
如果我Bandit::Engine从 中删除该行routes.rb并进入 rails 控制台,我可以成功创建 Bandit Experiments。