unable to save or cancel subscriptions using Stripe

Using stripe’s API with Ruby on Rails I am unable to save subscriptions.

I am able to retrieve and update and save customer objects:

  • How to test for a redirect with Rspec and Capybara
  • Is there any exception notification gem for ruby project?
  • What is the purpose of stubbing an HTTP request (e.g. using the WebMock gem)?
  • Warning: this Gemfile contains multiple primary sources during vagrant-rsync-back plugin Installation
  • When developing a gem, do I have to keep installing after I make updates?
  • HTTParty parsing JSON in Rails
  • customer = Stripe::Customer.retrieve(some_customer_id) #this works
    customer.save #this works

    I am also able to retrieve subscriptions:
    subscription=customer.subscriptions.retrieve(“some_subscription_id”) #this works

    However, when trying to save a subscription:
    subscription.save #this doesn’t work

    I keep getting this:

    NoMethodError: undefined method `save' for 
    from /Users/me/.rvm/gems/ruby-2.0.0-p353/gems/stripe-    
    1.9.9/lib/stripe/stripe_object.rb:158:in `method_missing'

    Similarly when trying to cancel a subscription:


    I get:

    NoMethodError: undefined method `delete' for 
    from /Users/me/.rvm/gems/ruby-2.0.0-p353/gems/stripe-
        1.9.9/lib/stripe/stripe_object.rb:158:in `method_missing'

    Without this I am not able to allow customers to cancel directly from the site.

    What am I missing?

  • What is the difference between <%= … %> and <% … %> in Ruby on Rails
  • MongoMapper and Joint Plugin giving issues
  • rake assets:precompile, Command failed with status (137):
  • Using Bundler along with preinstalled gems
  • Ruby on Rails server error
  • NoMethodError on section 5.7 of Rails Guide
  • One Solution collect form web for “unable to save or cancel subscriptions using Stripe”

    Upgrade to their latest gem with bundle update stripe and try again. Subscriptions were changed sometime around 1.10.0 and requires a version after that to save them. By configuring your gemfile to use their github repository you’re essentially using the latest version available at the time of your bundle.

    Ruby is the best programming language in the world - Ruby on Rails.