Skip to content

Instantly share code, notes, and snippets.

@gugote
Created March 26, 2015 19:32
Show Gist options
  • Save gugote/4fbaa01f3d2d6254d358 to your computer and use it in GitHub Desktop.
Save gugote/4fbaa01f3d2d6254d358 to your computer and use it in GitHub Desktop.
2.1.3 :029 > cc.create_payment_profile
Spree::Gateway::StripeGateway Load (0.8ms) SELECT "spree_payment_methods".* FROM "spree_payment_methods" WHERE "spree_payment_methods"."type" IN
('Spree::Gateway::StripeGateway') AND "spree_payment_methods"."deleted_at" IS NULL ORDER BY "spree_payment_methods"."id" ASC LIMIT 1
User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."id" = 4 LIMIT 1
SiteUser Load (0.5ms) SELECT "site_users".* FROM "site_users" WHERE "site_users"."user_id" = $1 LIMIT 1 [["user_id", 4]]
Spree::Order Exists (0.9ms) SELECT 1 AS one FROM "spree_orders" WHERE "spree_orders"."user_id" = $1 LIMIT 1 [["user_id", 4]]
Spree::Order Load (4.2ms) SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."user_id" = $1 [["user_id", 4]]
Spree::Address Load (1.1ms) SELECT "spree_addresses".* FROM "spree_addresses" WHERE "spree_addresses"."id" = $1 LIMIT 1 [["id", 12]]
Spree::State Load (1.5ms) SELECT "spree_states".* FROM "spree_states" WHERE "spree_states"."abbr" = 'CA' LIMIT 1
(1.1ms) BEGIN
Spree::Country Load (1.3ms) SELECT "spree_countries".* FROM "spree_countries" WHERE "spree_countries"."id" = $1 LIMIT 1 [["id", 203]]
Spree::State Load (0.5ms) SELECT "spree_states".* FROM "spree_states" WHERE "spree_states"."id" = $1 LIMIT 1 [["id", 32]]
Spree::Country Load (0.6ms) SELECT "spree_countries".* FROM "spree_countries" WHERE "spree_countries"."id" = $1 LIMIT 1 [["id", 49]]
Spree::State Load (0.4ms) SELECT "spree_states".* FROM "spree_states" WHERE "spree_states"."country_id" = $1 ORDER BY name ASC [["country_id", 2
03]]
(0.2ms) ROLLBACK
ActiveRecord::RecordInvalid: Validation failed: Zip Code can't be blank
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activerecord-4.1.9/lib/active_record/validations.rb:57:in `save!'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activerecord-4.1.9/lib/active_record/attribute_methods/dirty.rb:29:in `save!'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activerecord-4.1.9/lib/active_record/transactions.rb:273:in `block in save!'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activerecord-4.1.9/lib/active_record/transactions.rb:329:in `block in with_transaction_retu
rning_status'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/database_statements.rb:20
1:in `block in transaction'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/database_statements.rb:20
9:in `within_new_transaction'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/database_statements.rb:20
1:in `transaction'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activerecord-4.1.9/lib/active_record/transactions.rb:208:in `transaction'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activerecord-4.1.9/lib/active_record/transactions.rb:326:in `with_transaction_returning_sta
tus'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activerecord-4.1.9/lib/active_record/transactions.rb:273:in `save!'
from /vagrant/ring-site/app/models/spree/gateway/stripe_gateway_decorator.rb:120:in `cc_address_for'
from /vagrant/ring-site/app/models/spree/gateway/stripe_gateway_decorator.rb:44:in `create_profile_without_payment'
from /vagrant/ring-site/app/models/spree/credit_card_decorator.rb:19:in `create_payment_profile'
from (irb):29
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/railties-4.1.9/lib/rails/commands/console.rb:90:in `start'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/railties-4.1.9/lib/rails/commands/console.rb:9:in `start'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:69:in `console'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/railties-4.1.9/lib/rails/commands.rb:17:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `block in require'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:232:in `load_dependency'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `require'
from /vagrant/ring-site/bin/rails:8:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241:in `load'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241:in `block in load'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:232:in `load_dependency'
from /usr/local/rvm/gems/ruby-2.1.3@ring-site/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241:in `load'
from /usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment