--- - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :post uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts.xml body: | subscription-addons-create-1297746103 Verena Test verena@test.com Recurly Ruby Gem headers: authorization: - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw== content-type: - application/xml accept: - "*/*" user-agent: - Ruby connection: - close response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 201 message: Created headers: cache-control: - no-cache location: - http://app.recurly.local:3000/accounts/subscription-addons-create-1297746103 x-runtime: - "463" content-type: - application/xml; charset=utf-8 content-length: - "607" set-cookie: - _recurly_session=58902afc6619fd8136a86b4597845987; domain=.recurly.local; path=/; HttpOnly connection: - close server: - thin 1.2.7 codename No Hup body: | subscription-addons-create-1297746103 subscription-addons-create-1297746103 verena@test.com Verena Test Recurly Ruby Gem 0 false 37e8e0fc0e5840168d9a1aa69ee453bc 2011-03-18T18:47:38Z active http_version: "1.1" - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :get uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/company/plans/paid.xml body: headers: authorization: - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw== accept: - application/xml accept-encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 user-agent: - Ruby connection: - close response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 200 message: OK headers: x-runtime: - "272" content-type: - application/xml; charset=utf-8 etag: - "\"dc04fba13f15d49d04ca6692abb21ff9\"" cache-control: - private, max-age=0, must-revalidate content-length: - "1146" set-cookie: - _recurly_session=8f7acef6ec76ad8cf787d9ded8c8eb2c; domain=.recurly.local; path=/; HttpOnly connection: - close server: - thin 1.2.7 codename No Hup body: | paid Paid 2011-02-02T21:02:59Z 1000 0 1 days 0 months 1 1000 0 1 days 0 months 2011-02-21T01:06:56Z http_version: "1.1" - !ruby/struct:VCR::HTTPInteraction request: !ruby/struct:VCR::Request method: :post uri: http://api-test-123%40litle.com:82a98ee0c1c2495789775177babfadb7@app.recurly.local:3000/accounts/subscription-addons-create-1297746103/subscription.xml body: | paid 1 subscription-addons-create-1297746103 Verena Test verena@test.com Recurly Ruby Gem Verena Test 123 Test St San Francisco CA 94115 US 4111111111111111 2012 3 123 subscription-addons-create-1297746103 0 false 37e8e0fc0e5840168d9a1aa69ee453bc 2011-03-18T18:47:38Z active special 1 10 headers: authorization: - Basic YXBpLXRlc3QtMTIzQGxpdGxlLmNvbTo4MmE5OGVlMGMxYzI0OTU3ODk3NzUxNzdiYWJmYWRiNw== content-type: - application/xml accept: - "*/*" user-agent: - Ruby connection: - close response: !ruby/struct:VCR::Response status: !ruby/struct:VCR::ResponseStatus code: 500 message: Internal Server Error headers: cache-control: - no-cache content-type: - text/html; charset=utf-8 content-length: - "19295" set-cookie: - _recurly_session=e3bad4a0822d21903aca22110ffc02d0; domain=.recurly.local; path=/; HttpOnly connection: - close server: - thin 1.2.7 codename No Hup body: | Action Controller: Exception caught

NoMethodError in Accounts/subscriptionController#create

You have a nil object when you didn't expect it!
      You might have expected an instance of Array.
      The error occurred while evaluating nil.slice

RAILS_ROOT: /Users/isaac/Development/recurly/app

Application Trace | Framework Trace | Full Trace
/Users/isaac/Development/recurly/app/app/api/subscription_api.rb:23:in `block in sanitize_params'
      /Users/isaac/Development/recurly/app/app/api/subscription_api.rb:22:in `collect'
      /Users/isaac/Development/recurly/app/app/api/subscription_api.rb:22:in `sanitize_params'
      /Users/isaac/Development/recurly/app/app/controllers/accounts/subscription_controller.rb:250:in `init_account_and_billing_info'

Request

Parameters:

{"subscription"=>{"plan_code"=>"paid",
       "quantity"=>1,
       "account"=>{"account_code"=>"subscription-addons-create-1297746103",
       "first_name"=>"Verena",
       "last_name"=>"Test",
       "email"=>"verena@test.com",
       "company_name"=>"Recurly Ruby Gem",
       "billing_info"=>{"first_name"=>"Verena",
       "last_name"=>"Test",
       "address1"=>"123 Test St",
       "city"=>"San Francisco",
       "state"=>"CA",
       "zip"=>"94115",
       "country"=>"US",
       "credit_card"=>{"number"=>"4111111111111111",
       "year"=>2012,
       "month"=>3,
       "verification_value"=>"123"}},
       "accept_language"=>nil,
       "id"=>"subscription-addons-create-1297746103",
       "username"=>nil,
       "balance_in_cents"=>0,
       "closed"=>false,
       "hosted_login_token"=>"37e8e0fc0e5840168d9a1aa69ee453bc",
       "created_at"=>2011-03-18 18:47:38 UTC,
       "state"=>"active"},
       "add_ons"=>[{"add_on_code"=>"special",
       "quantity"=>1,
       "unit_amount"=>10}],
       "addons"=>[]},
       "account_id"=>"subscription-addons-create-1297746103",
       "format"=>"xml"}

Show session dump

Response

Headers:

{"Cache-Control"=>"no-cache",
       "Content-Type"=>""}

http_version: "1.1"