What does this env.rb error mean, pls?
root# rake db:migrate WARNING: Cucumber-rails required outside of env.rb. The rest of loading is being defered until env.rb is called. To avoid this warning, move 'gem cucumber-rails' under only group :test in your Gemfile
The gemfile is here:
source 'http://rubygems.org' gem 'rails', '3.1.0' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' # for Heroku deployment - as described in Ap. A of ELLS book group :development, :test do gem 'sqlite3' gem 'ruby-debug19', :require => 'ruby-debug' gem 'cucumber-rails' gem 'cucumber-rails-training-wheels' gem 'database_cleaner' gem 'capybara' gem 'launchy' end group :production do # gem 'pg' end # Gems used only for assets and not required # in production environments by default. group :assets do gem 'therubyracer' gem 'sass-rails', " ~> 3.1.0" gem 'coffee-rails', "~> 3.1.0" gem 'uglifier' end gem 'jquery-rails' # Use unicorn as the web server # gem 'unicorn' # Deploy with Capistrano # gem 'capistrano' # To use debugger gem 'haml'
that's just how bundler works, you need to add :require => false
after gem 'cucumber-rails'
. I have to say the error message is a bit misleading.
It is suggesting that you isolate your test gems on a :test
group. Your Gemfile will then look somewhat like this:
group :development, :test do gem 'sqlite3' gem 'ruby-debug19', :require => 'ruby-debug' gem 'launchy' end group :test do gem 'cucumber-rails' gem 'cucumber-rails-training-wheels' gem 'database_cleaner' gem 'capybara' end
Personally, I liked the gem's suggestion. We really don't need the test gems loaded on our development environment.
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