Question

I am trying to use the subscription update API for ruby provided by FastSpring

https://github.com/FastSpring/fastspring-ruby

I added the following line in my Gemfile

gem "FastSpring", :git => "https://github.com/FastSpring/fastspring-ruby"

I ran bundle install and everything looked fine, but when I try to require FastSpring in my application (require 'FastSpring') I get the following error

LoadError: cannot load such file -- FastSpring

I also tried to manually build/install the gem as explained on github, but I get the same error.

Any idea what's wrong with this gem ? I am running out of solutions. The source looks simple enough to be replicated directly in my app, but I prefer to use a gem instead.

Was it helpful?

Solution

This is because your gems isn't automatically required by bundler, you can choose of three points:

  1. Either don't use a bundler, and install a gem directly into system, then just require the gem:

    require 'FastSpring'
    
  2. Or use bundler, issue bundle exec your_code.rb, in which you've defined require 'FastSpring', or etc:

    require 'FastSpring'
    
  3. Or use bundler, but before all of require instructions, issue Bundler.require :default. But this point strongly isn't recommended.

    Bundler.require :default
    require 'FastSpring'
    
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top