This is our Gemfile.
Is the line require mongo redundant since gem ‘mongo’ is already included?
If not, what is the purpose of require mongo?
We’re on Rails 3.
Thanks!
source 'http://rubygems.org'
require 'rubygems'
require 'mongo'
gem 'rails', '3.0.6'
gem 'mongo'
gem 'mongo_mapper'
gem 'fastercsv'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
#gem 'sqlite3'
gem 'mysql'
gem 'whois'
You shouldn’t put
requirestatements in your Gemfile. This is also true for therequire 'rubygems'on the line before.What require does, is what it always does: load the gem. The Gemfile is loaded when you run
bundle install. If you try to load a gem beforebundle installhas run, the gem might not be installed yet.Gems specified in your Gemfile are required by Rails by default too, by the way.