I'm a newbie to Rails. Therefore, apologies in advance if this is a dumb question. I have gone through Michael Heartl's book and tried coding an app myself.
I have written a few basic tests, but when trying to test the app with
$bundle exec rake test
I get the following message on the terminal
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
When I add the above to development.rb it still doesn't make a difference.
Please help me understand what I'm doing wrong.
What you need to do is make sure that in your Gemfile the line gem 'web-console'
is only loaded in the group development.
Can you maybe post your Gemfile? This way we can see if that is what's causing it.
In your Gemfile it should either be:
gem 'web-console', group: :development
or
group :development do
gem 'web-console'
end
In the Gem file if you have this line
gem 'web-console', '~> 2.0'
Remove it.
Then run
$ gem install bundler
$ bundle install --without production
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With