Require and load a gem in IRB for testing purposes while developing the gem

Public, Ruby General, Gems

harrylevine

Created: Jan 18, 2018     Updated: Jan 20, 2018


Done.

Or,

Or,

For example:

$ irb -I lib
> require 'service_finance'
=> true

Either way, at this point, you can call methods from classes like you would in the rails console. For example:

irb(main):003:0> ServiceFinance::Client.new.authenticate

Source: http://wsmoak.net/2016/07/10/ruby-gem-dev-irb.html