当我在我的rails应用程序中运行bundle exec rake test时,我得到以下消息
Web Console is activated in the test environment, which is
usually a mistake. To ensure it's only activated in development
mode, move it to the development group of your Gemfile:
gem 'web-console', group: :development
If you still want to run it the test environment (and know
what you are doing), put this in your Rails application
configuration:
config.web_console.development_only = false但是,我的Gemfile在测试和开发环境中都有web控制台
group :development, :test do
gem 'sqlite3'
gem 'byebug'
gem 'web-console'
gem 'spring'
end这正是我在我的Cloud9账户上使用它的方式,它工作得很好,但我使用的是一台运行Ubuntu14.04的笔记本电脑,我遇到了这个问题。到底怎么回事?
发布于 2016-04-16 07:00:47
这可能是一个关于Cloud9的问题,我还没有用过它。要解决您的问题,请将“web-console”行移出组,并更改为
gem 'web-console', group: :development基本上,将web-console从:test组中删除。另外,也可以尝试使用rake test。您可能也忘记了bundle update。
https://stackoverflow.com/questions/36658119
复制相似问题