Skip to content

Instantly share code, notes, and snippets.

@darrencauthon
Created March 13, 2016 17:48
Show Gist options
  • Save darrencauthon/e9c9697b7cb555f39ffb to your computer and use it in GitHub Desktop.
Save darrencauthon/e9c9697b7cb555f39ffb to your computer and use it in GitHub Desktop.
Loading a gem via IRB
# https://github.com/banzsolt/wargaming_api/
wargaming_api git:(master) bundle exec irb
2.0.0-p647 :001 > WargamingApi::Accounts
NameError: uninitialized constant WargamingApi::Accounts
from (irb):1
from /Users/darrencauthon/.rvm/rubies/ruby-2.0.0-p647/bin/irb:12:in `<main>'
2.0.0-p647 :002 > require_relative 'lib/wargaming_api'
accounts -> Players loaded.
accounts loaded.
=> true
2.0.0-p647 :003 > WargamingApi::Accounts
=> WargamingApi::Accounts
2.0.0-p647 :004 >
@banzsolt
Copy link

I see now.

So the way to fix this is to run: require_relative 'lib/wargaming_api' every time when I am debugging?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment