My environment is ruby 1.9.3p327
and rails 3.2.8
on a mac.
I add the gem nokogiri
to my Gemfile
. Run bundle install
command. The command show me Using nokogiri (1.5.5)
and the gem list
command return nokogiri (1.5.5)
.
In the rails console require 'nokogiri'
return false
but in irb
it return true
.
How is this possible?
According to the first two lines of the API documentation, require
will:
true
if load successfulfalse
if already loadedLoadError
if file cannot be foundSince Rails console loads your gems, Nokogiri was probably required earlier. Irb doesn't do that.
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