Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Daniel Sullivan
5,187 PointsRequire Ruby Gems
Hi, When I put in the command require 'rubygems' it is returning false? Any idea why?
1.9.3p362 :001 > require 'rubygems' => false
4 Answers
rayorke
27,709 PointsFrom RubyGems
3.2
- "A false return from the require method does not indicate an error. It just means that the file has already been loaded. " *
So if it continues to work, then it should be loaded. It may be that Jason's setup didn't load awesome_print initially (remember that Jason often switches between multiple versions of Ruby).
I tried the same video and also got the return value of 'false'
Daniel Sullivan
5,187 PointsIt seems like it may be working though, but still the video showed it saying True.
Successfully installed awesome_print-1.1.0 1 gem installed Installing ri documentation for awesome_print-1.1.0... Installing RDoc documentation for awesome_print-1.1.0... daniels-imac-2:~ dsully15$ irb 1.9.3p362 :001 > require 'rubygems' => false 1.9.3p362 :002 > gem 'awesome_print' => true 1.9.3p362 :003 > require 'awesome_print' => true 1.9.3p362 :004 > h = Hash.new => {}
Jason Seifer
Treehouse Guest TeacherThanks, Rhys! Great post!
Daniel Sullivan
5,187 PointsPerfect thanks.