GithubHelp home page GithubHelp logo

spree-contrib / spree_wishlist Goto Github PK

View Code? Open in Web Editor NEW
108.0 22.0 216.0 372 KB

Wishlist extension for Spree Commerce.

Home Page: http://guides.spreecommerce.org

License: BSD 3-Clause "New" or "Revised" License

Ruby 89.80% JavaScript 1.34% CSS 0.07% HTML 8.63% SCSS 0.16%

spree_wishlist's Introduction

⚠️ Deprecation notice ⚠️

Since v4.4, Spree supports Wishlists out of the box - spree/spree#11308. Code is compatible with this extension and everyone can migrate easily.

Hence, this extension is flagged as deprecated and won't be developed and actively maintained anymore.

Spree Wishlist

Build Status Code Climate

The Spree Wishlist extension enables multiple wishlists per user, as well as managing those as public (sharable) and private. It also includes the ability to notify a friend via email of a recommended product.


Installation

Add the following to your Gemfile

gem 'spree_wishlist', github: 'spree-contrib/spree_wishlist', branch: 'master'

Run

bundle install
bundle exec rails g spree_wishlist:install

API endpoints

Please read Spree API v1 summary first.

Available endpoints:

Wishlists management

  • GET /api/v1/wishlists - returns a list of wishlists for signed in user

  • GET /api/v1/wishlists/:id - returns single wishlists with a list of Products (Variants)

  • POST /api/v1/wishlists - creates a new wishlist

    payload:

    wishlist: {
      "name": "fathers day"
    }
  • PATCH /api/v1/wishlists/:id

    payload:

    wishlist: {
      "name": "new name"
    }
  • DELETE /api/v1/wishlists/:id

Wishlists products management

  • POST /api/v1/wished_products - adds Product (Variant) to a Wishlist

    payload:

    wished_product: {
      "variant_id": 2,
      "wishlist_id": 1
    }
  • PATCH /api/v1/wished_products/:id

    payload:

    wished_product: {
      "variant_id": 3,
      "wishlist_id": 2
    }
  • DELETE /api/v1/wished_products/:id


Wishlists V2

Wishlists management

  • GET /api/v2/storefront/wishlists - returns a list of wishlists for signed in user

  • GET /api/v2/storefront/wishlists/:access_hash - returns single wishlists with a list of Products (Variants)

    payload:

    { "include": "wished_products.variant" }
  • PATCH /api/v2/storefront/wishlists/:access_hash

    payload:

    wishlist: {
        "name": "Wishlist name",
        "is_default": true,
        "is_private": true,
      }
  • POST /api/v2/storefront/wishlists - creates a new wishlist

    payload:

      wishlist: {
          "name": "Wishlist name",
          "is_default": true,
          "is_private": true,
        }
  • DELETE /api/v2/storefront/wishlists/:access_hash

Wishlists products management

  • POST /api/v2/storefront/wishlists/:access_hash/wished_products - adds Product (Variant) to a Wishlist

    payload:

    wished_product: {
      "variant_id": 2,
      "remark": "I want this",
      "quantity": 3
    }
  • PATCH /api/v2/storefront/wishlists/:access_hash/wished_products/:id

    payload:

    wished_product: {
      "variant_id": 2,
      "remark": "I want this",
      "quantity": 4
    }
  • DELETE /api/v2/storefront/wishlists/:access_hash/wished_products/:id


Contributing

See corresponding guidelines


Copyright (c) 2009-2020 Spree Commerce Inc. and contributors, released under the New BSD License

spree_wishlist's People

Contributors

andreabeggiato avatar bbonislawski avatar bdq avatar brchristian avatar chhlga avatar damianlegawiec avatar divineforest avatar fabien avatar futhr avatar geekoncoffee avatar gudata avatar hates avatar jdutil avatar jsqu99 avatar kascote avatar lbrapid avatar paulslaby avatar pszyszkaspark avatar radar avatar romul avatar rterbush avatar salemine avatar schof avatar ssk avatar stevenjenkins avatar sushanyadav avatar traels avatar vygovskysergey avatar xunker avatar yarikesh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spree_wishlist's Issues

spree_core dependency problem

As below

Could not find gem 'spree_core (~> 3.1.0.beta) ruby', which is required by gem
'spree_wishlist (>= 0) ruby', in any of the sources.

My Gemfile

...
gem 'spree', '3.0.0'
gem 'spree_gateway', github: 'spree/spree_gateway', branch: '3-0-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '3-0-stable'

gem 'spree_wishlist', github: 'spree-contrib/spree_wishlist', branch: 'master'
gem 'spree_email_to_friend', github: 'spree-contrib/spree_email_to_friend', branch: 'master'

Testing the gem with spree 4 failed

gem 'spree', github: 'spree/spree'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise'
gem 'spree_gateway', github: 'spree/spree_gateway'
gem 'spree_wishlist', github: 'spree-contrib/spree_wishlist', branch: 'master'
gem 'spree_email_to_friend', github: 'spree-contrib/spree_email_to_friend', branch: 'master'

Output of bundle update:

Bundler could not find compatible versions for gem "listen":
  In Gemfile:
    listen (< 3.2, >= 3.0.5)

    spring-watcher-listen (~> 2.0.0) was resolved to 2.0.1, which depends on
      listen (< 4.0, >= 2.7)

Bundler could not find compatible versions for gem "spree_core":
  In Gemfile:
    spree was resolved to 4.1.0.rc3, which depends on
      spree_core (= 4.1.0.rc3)

    spree_auth_devise was resolved to 4.1.0.rc1, which depends on
      spree_core (< 5.0, >= 4.1.0.alpha)

    spree_email_to_friend was resolved to 1.3.0, which depends on
      spree_core (< 4.0, >= 3.1.0)

    spree_gateway was resolved to 3.7.0, which depends on
      spree_core (< 5.0, >= 3.1.0)

wishlist destroying after removing wishied_product

When I remove product from wishlist via ajax request something like this:
$.ajax('/wished_products/14', {method: 'delete'})
in controller action we can see that after removing item redirects to the current withlist BUT it redirects with current method delete that cause to removing current wishlist.

deprecation warning for insert_after

Jones-Lees-MacBook-Air:spree-thurley mojo$ rails g spree_wishlist:install

[DEPRECATION] `insert_after` hook method is deprecated, replace hook call with: 
Deface::Override.new(:virtual_path => "admin/configurations/index",
                     :name => "converted_admin_configurations_menu_162961785",
                     :insert_after => "[data-hook='admin_configurations_menu'], #admin_configurations_menu[data-hook]",
                     :text => "<%= configurations_menu_item(I18n.t('captcha.captcha_settings'), admin_captcha_settings_path, I18n.t('captcha.manage_keys')) %>",
                     :disabled => false)

[DEPRECATION] `insert_after` hook method is deprecated, replace hook call with: 
Deface::Override.new(:virtual_path => "products/show",
                     :name => "converted_product_description_693093723",
                     :insert_after => "[data-hook='product_description'], #product_description[data-hook]",
                     :text => "

<%= link_to(t('email_to_friend.send_to_friend'), email_to_friend_url('product', @product)) %>

", :disabled => false)

Deleted products crash the wishlist view

My app uses wished_products.count to tell the user in the head of the page how many items are in their Wish List.

After upgrading Spree to 2-0-master, I saw "Wish List (1)" but upon clicking, my application crashed, citing:

undefined method `product' for nil:NilClass

at the line product = variant.product.

As you can see at the source, the default scoping of the Variant model (which itself comes from acts_as_paranoid) will create these types of nil variants, with the potential to crash spree_wishlist.

I'm not sure what the solution is in this case. Namely, I'm not sure whether we should have a way to purge wishlist items that refer to deleted objects as we find them, or whether we should have a subtler way of determining the logical size of the wishlist (scoped to not deleted products/variants), or what exactly is the conceptual approach to this.

I'd be happy to suggest a PR if someone from the spree team (@radar?) wants to comment on how best to address it.

Personally I think the cleanest would be to create a railties migration that deletes at migration time any WishedProducts with nil Variants, and then to prevent future problems by using an after_destroy hook to the Variant model.

Add to Wishlist is adding the items to my cart

Like the title says. On my product page there is a button with code:

<% if spree_current_user %>
  <div id="wishlist-form">
    <%= form_for Spree::WishedProduct.new do |f| %>
      <%= f.hidden_field :variant_id, :value => @product.master.id %>
      <button type="submit" class="btn btn-secondary">
        <%= Spree.t(:add_to_wishlist) %>
      </button>
    <% end %>
  </div>
<% end %>

When I am signed in and click the Add to Wishlist button it adds the item to my shopping cart.

Creating a separate /wishlist page for the wishlists

How can I create a separate /wishlist page containing all lists instead of having them appearing on the /account page. Also, how can I get the total number of items saved in wishlists, so I can display that in the main menu along with a link to the wishlist page ?

NoMethodError in Spree::Wishlists#show

When i click on whishlist option this will show me error

Showing /.rvm/gems/ruby-2.7.1/bundler/gems/spree_wishlist-7d6a899be771/app/views/spree/wishlists/show.html.erb where line #54 raised:

undefined method `url' for #ActiveStorage::Attached::One:0x00007ffad2e16f70

DEPRECATION WARNING: Passing a class to the `class_name` is deprecated and will raise an ArgumentError in Rails 5.2.

DEPRECATION WARNING: Passing a class to the `class_name` is deprecated and will raise an ArgumentError in Rails 5.2. 
It eagerloads more classes than necessary and potentially creates circular dependencies. Please pass the class name as a string: `belongs_to :user, class_name: 'Spree::User'` (called from <class:Wishlist> at /Users/Bartek/oss/spark/spree_wishlist/app/models/spree/wishlist.rb:2) DEPRECATION WARNING: Passing a class to the `class_name` is deprecated and will raise an ArgumentError in Rails 5.2. It eagerloads more classes than necessary and potentially creates circular dependencies. Please pass the class name as a string: `has_many :wishlists, class_name: 'Spree::Wishlist'` (called from block in <top (required)> at /Users/Bartek/oss/spark/spree_wishlist/app/models/spree/user_decorator.rb:2)

We should call to_s on Spree.user_class and change classes in belongs_to to strings in whole project

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
  In Gemfile:
    Ruby (~> 2.1.10.0)

    spree was resolved to 4.3.0.alpha, which depends on
      spree_core (= 4.3.0.alpha) was resolved to 4.3.0.alpha, which depends on
        rails (>= 6.0, < 6.2) was resolved to 6.1.3.2, which depends on
          Ruby (>= 2.5.0)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

2-0-stable version says 1.3

I'm assuming that spree_wishlist's version numbers parallel those of Spree, and noticed the following after a bundle update:

Using spree_wishlist (1.3) from git://github.com/spree/spree_wishlist.git (at 2-0-stable) 

Should the 2-0-stable version say 2.0.x?

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
  In Gemfile:
    Ruby (~> 2.1.10.0)

    spree was resolved to 4.3.0.alpha, which depends on
      spree_core (= 4.3.0.alpha) was resolved to 4.3.0.alpha, which depends on
        rails (>= 6.0, < 6.2) was resolved to 6.1.3.1, which depends on
          Ruby (>= 2.5.0)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

ArgumentError in Spree::UserSessions#new

I run into this error when I go to http://localhost:3000/admin. It seems loading login page error after installed some extensions including "spree_wishlist"

Showing C:/inetpub/vhosts/99chinesemedicine.com/httpdocs/App_Data/Ruby22-x64/lib/ruby/gems/2.2.0/bundler/gems/spree-148bcaf1e440/frontend/app/views/spree/shared/_head.html.erb where line #10 raised:
wrong number of arguments (3 for 1)
Trace of template inclusion: C:/inetpub/vhosts/99chinesemedicine.com/httpdocs/App_Data/Ruby22-x64/lib/ruby/gems/2.2.0/bundler/gems/spree-148bcaf1e440/frontend/app/views/spree/layouts/spree_application.html.erb
Rails.root: C:/inetpub/vhosts/99chinesemedicine.com/httpdocs/mystore
Application Trace | Framework Trace | Full Trace
vendor/assets/javascripts/spree/frontend/all.js:13

The line 13 is:
*= require spree/frontend/spree_wishlist

my gemfile.lock section:
GIT
remote: git://github.com/spree-contrib/spree_wishlist.git
revision: 831a210
branch: master
specs:
spree_wishlist (2.2.0)
spree_core (~> 3.1.0.beta)
my gemfile line is:
gem 'spree', github: 'spree/spree'
That should be master version, that is, 3.1.0.beta.
spree/frontend/app/views/spree/shared/_head.html.erb where line #10
this line is:
<%= javascript_include_tag 'spree/frontend/all' %>

It seems javascript is unable to insert wishlist into spree template spree_application.html.erb

Would you help?

product_price is now deprecated

A deprecation warning now comes from spree when attempting to use product_price as in:

app/views/spree/wishlists/show.html.erb

I converted this locally to number_to_current(variant.price), as the warning suggests, and it works, but I'm not sure if anything else needs to be done in light of the tax changes, so I did not make the change myself.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
  In Gemfile:
    Ruby (~> 2.1.10.0)

    spree was resolved to 4.3.0.alpha, which depends on
      spree_core (= 4.3.0.alpha) was resolved to 4.3.0.alpha, which depends on
        activerecord (>= 6.0, < 6.2) was resolved to 6.1.3.2, which depends on
          Ruby (>= 2.5.0)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Typing in incorrect wishlist hash produces 500 error

In a blank 2-0-stable store, if I type in an incorrect wishlist hash into the URL, I get not a 404 Not Found error but a 500 exception:

NoMethodError in Spree/wishlists#show

    Showing /Users/brchristian/spree_wishlist/app/views/spree/wishlists/show.html.erb where line #2 raised:

    undefined method `name' for nil:NilClass
    Extracted source (around line #2):

    1: <div id="wishlist_header" class="row">
    2:   <h1><%= @wishlist.name %></h1>
    3:   <% if @wishlist.user == spree_current_user %>
    4:     <div id="manage_wishlist_links">
    5:       <%= link_to Spree.t(:edit_wishlist), edit_wishlist_path(@wishlist), :class => 'button' %>

access_hash

I am changing the UI for add to wishlist in my custom application. Is there a way i can get the secret hash so that i can submit the form dynamically.

2-3-stable Branch

Now that Spree 2.3 is released, can we make a 2-3-stable branch and bump master to 2.4?

remove inline JS

Convert the inline JS onlick of wishlist/show.html.erb to unobstrusive JS

<%= form_for :order, :url => populate_orders_url do |f| %> <%= hidden_field_tag "variants[#{variant.id}]", 1, :size => 3 %> <%= link_to t(:add_to_cart), '#', :onclick => "$(this).parent().submit(); return false;" %>

Default wishlist is not implemented correctly

Route "/wishlist" (which is meant to be default wish list for current user) dispatches requests to wishlists#show where Wishlist object is search by hash instead of current_user.wishlist.

remove defunct translation string

Following strings seems defunct

  private_wishlist: "Private wishlist"
  public_wishlist: "Public wishlist"
  update_quantity: "Update quantity"
  item_added_to_wishlist: "Item added to wishlist"

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
  In Gemfile:
    Ruby (~> 2.1.10.0)

    spree was resolved to 4.3.0.alpha, which depends on
      spree_core (= 4.3.0.alpha) was resolved to 4.3.0.alpha, which depends on
        activerecord (>= 5.2) was resolved to 5.2.6, which depends on
          Ruby (>= 2.2.2)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Deface breaks current install

It seems the edits that are being made to get ready for the new Deface work has broken this extension. Do you have a gem version without the deface stuff into we can use until spree 0.70.0 is ready ?

FYI This is the only official extension I don't see a gem for

Wishlist doesn't support selected variant

The form name has changed from:

new_wished_product
to
new_spree_wished_product

so the submit action here:

./assets/javascripts/store/spree_wishlist.js:3:$("#new_wished_product").submit(function() {

Is not causing the variant id to be set.

Fix coming in a few minutes

Specs fail on spree master because of required belongs_to

Since Rails 5.1 we should explicitly define that belongs_to relation is optional. WishedProducts fails to save because it doesn't have variant created in specs. We should add optional param to belongs_to relations:

Here's the problem:

(byebug) @wished_product
#<Spree::WishedProduct id: nil, variant_id: nil, wishlist_id: 2, remark: "Some remark..", created_at: nil, updated_at: nil, quantity: 1>
(byebug) @wished_product.valid?
false
(byebug) @wished_product.errors
#<ActiveModel::Errors:0x007fb92c3eb830 @base=#<Spree::WishedProduct id: nil, variant_id: nil, wishlist_id: 2, remark: "Some remark..", created_at: nil, updated_at: nil, quantity: 1>, @messages={:variant=>["must exist"]}, @details={:variant=>[{:error=>:blank}]}>

Session unmarshalling issue with Rails 4.1

Upon upgrading to Rails 4.1, we are seeing a new session unmarshall problem that looks like it is related to some unmarshalling stuff caused by this Gem

NameError: uninitialized constant ActiveRecord::Relation::ActiveRecord_Relation_Spree_WishedProduct
Backtrace
More    
application_controller.rb  50  set_utm_fields(...)
[PROJECT_ROOT]/app/controllers/application_controller.rb:50:in `set_utm_fields'
URL GET https://www.mackweldon.com/t/categories/underwear
Location    production on 438fce03-2ebd-412a-bcd5-375237bd444e
Referrer    https://www.google.com/
Browser 32 chromeWindowsUs Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36
Timeline    
Apr 17 - 12:00 amApr 17 - 2:00 amApr 17 - 4:00 amApr 17 - 6:00 amApr 17 - 8:00 amApr 17 - 10:00 amApr 17 - 12:00 pmApr 17 - 2:00 pmApr 17 - 4:00 pmApr 17 - 6:00 pmApr 17 - 8:00 pm
01234
Tags (edit) 
 Delete   Ignore     Share URL   Search Stack Overflow

Switch Style 
Application Backtrace

[PROJECT_ROOT]/app/controllers/application_controller.rb:50 :in `set_utm_fields`
48 
49   def set_utm_fields
50     session[:utm_keys] = {} if session[:utm_keys].blank?
51     utm_hash = {}
52     UTM_KEYS.each do |key|
Full Backtrace

[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/inflector/methods.rb:240 :in `const_get`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/inflector/methods.rb:240 :in `block in constantize`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/inflector/methods.rb:236 :in `each`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/inflector/methods.rb:236 :in `inject`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/inflector/methods.rb:236 :in `constantize`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/core_ext/string/inflections.rb:66 :in `constantize`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/core_ext/marshal.rb:10 :in `rescue in load_with_autoloading`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/core_ext/marshal.rb:6 :in `load_with_autoloading`
[GEM_ROOT]/gems/activerecord-session_store-0.1.1/lib/active_record/session_store.rb:12 :in `unmarshal`
[GEM_ROOT]/gems/activerecord-session_store-0.1.1/lib/active_record/session_store/session.rb:69 :in `data`
[GEM_ROOT]/gems/activerecord-session_store-0.1.1/lib/action_dispatch/session/active_record_store.rb:73 :in `block in get_session`
[GEM_ROOT]/gems/activerecord-session_store-0.1.1/lib/active_record/session_store/extension/logger_silencer.rb:42 :in `silence`
[GEM_ROOT]/gems/activerecord-session_store-0.1.1/lib/action_dispatch/session/active_record_store.rb:65 :in `get_session`
[GEM_ROOT]/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:266 :in `load_session`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/middleware/session/abstract_store.rb:43 :in `block in load_session`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/middleware/session/abstract_store.rb:51 :in `stale_session_check!`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/middleware/session/abstract_store.rb:43 :in `load_session`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/request/session.rb:180 :in `load!`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/request/session.rb:172 :in `load_for_read!`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/request/session.rb:89 :in `[]`
[PROJECT_ROOT]/app/controllers/application_controller.rb:50 :in `set_utm_fields`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:424 :in `block in make_lambda`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:160 :in `call`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:160 :in `block in halting`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:229 :in `call`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:229 :in `block in halting`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166 :in `call`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166 :in `block in halting`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166 :in `call`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166 :in `block in halting`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166 :in `call`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166 :in `block in halting`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166 :in `call`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166 :in `block in halting`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:86 :in `call`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:86 :in `run_callbacks`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/abstract_controller/callbacks.rb:19 :in `process_action`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_controller/metal/rescue.rb:29 :in `process_action`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_controller/metal/instrumentation.rb:31 :in `block in process_action`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/notifications.rb:159 :in `block in instrument`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/notifications/instrumenter.rb:20 :in `instrument`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/notifications.rb:159 :in `instrument`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_controller/metal/instrumentation.rb:30 :in `process_action`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_controller/metal/params_wrapper.rb:250 :in `process_action`
[GEM_ROOT]/gems/activerecord-4.1.9/lib/active_record/railties/controller_runtime.rb:18 :in `process_action`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/abstract_controller/base.rb:136 :in `process`
[GEM_ROOT]/gems/actionview-4.1.9/lib/action_view/rendering.rb:30 :in `process`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_controller/metal.rb:196 :in `dispatch`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_controller/metal/rack_delegation.rb:13 :in `dispatch`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_controller/metal.rb:232 :in `block in action`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/routing/route_set.rb:82 :in `call`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/routing/route_set.rb:82 :in `dispatch`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/routing/route_set.rb:50 :in `call`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/journey/router.rb:73 :in `block in call`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/journey/router.rb:59 :in `each`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/journey/router.rb:59 :in `call`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/routing/route_set.rb:685 :in `call`
[GEM_ROOT]/gems/railties-4.1.9/lib/rails/engine.rb:514 :in `call`
[GEM_ROOT]/gems/railties-4.1.9/lib/rails/railtie.rb:194 :in `public_send`
[GEM_ROOT]/gems/railties-4.1.9/lib/rails/railtie.rb:194 :in `method_missing`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/journey/router.rb:73 :in `block in call`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/journey/router.rb:59 :in `each`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/journey/router.rb:59 :in `call`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/routing/route_set.rb:685 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/rack/agent_hooks.rb:30 :in `traced_call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:55 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/rack/browser_monitoring.rb:23 :in `traced_call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:55 :in `call`
[GEM_ROOT]/gems/warden-1.2.3/lib/warden/manager.rb:35 :in `block in call`
[GEM_ROOT]/gems/warden-1.2.3/lib/warden/manager.rb:34 :in `catch`
[GEM_ROOT]/gems/warden-1.2.3/lib/warden/manager.rb:34 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/rack-1.5.2/lib/rack/etag.rb:23 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/rack-1.5.2/lib/rack/conditionalget.rb:25 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/rack-1.5.2/lib/rack/head.rb:11 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/middleware/params_parser.rb:27 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/middleware/flash.rb:254 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225 :in `context`
[GEM_ROOT]/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/middleware/cookies.rb:562 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/activerecord-4.1.9/lib/active_record/query_cache.rb:36 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:621 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/middleware/callbacks.rb:29 :in `block in call`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:82 :in `run_callbacks`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/middleware/callbacks.rb:27 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/middleware/remote_ip.rb:76 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/middleware/debug_exceptions.rb:17 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/middleware/show_exceptions.rb:30 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/railties-4.1.9/lib/rails/rack/logger.rb:38 :in `call_app`
[GEM_ROOT]/gems/railties-4.1.9/lib/rails/rack/logger.rb:20 :in `block in call`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/tagged_logging.rb:68 :in `block in tagged`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/tagged_logging.rb:26 :in `tagged`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/tagged_logging.rb:68 :in `tagged`
[GEM_ROOT]/gems/railties-4.1.9/lib/rails/rack/logger.rb:20 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/middleware/request_id.rb:21 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/rack-1.5.2/lib/rack/methodoverride.rb:21 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/rack-1.5.2/lib/rack/runtime.rb:17 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/activesupport-4.1.9/lib/active_support/cache/strategy/local_cache_middleware.rb:26 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/actionpack-4.1.9/lib/action_dispatch/middleware/static.rb:84 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/rack-1.5.2/lib/rack/sendfile.rb:112 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/rack-timeout-0.2.0/lib/rack/timeout.rb:108 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/railties-4.1.9/lib/rails/engine.rb:514 :in `call`
[GEM_ROOT]/gems/railties-4.1.9/lib/rails/application.rb:144 :in `call`
[GEM_ROOT]/gems/railties-4.1.9/lib/rails/railtie.rb:194 :in `public_send`
[GEM_ROOT]/gems/railties-4.1.9/lib/rails/railtie.rb:194 :in `method_missing`
[GEM_ROOT]/gems/newrelic_rpm-3.9.9.275/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57 :in `call`
[GEM_ROOT]/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:576 :in `process_client`
[GEM_ROOT]/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:670 :in `worker_loop`
[GEM_ROOT]/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:525 :in `spawn_missing_workers`
[GEM_ROOT]/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:140 :in `start`
[GEM_ROOT]/gems/unicorn-4.8.3/bin/unicorn:126 :in `<top (required)>`
[GEM_ROOT]/bin/unicorn:23 :in `load`
[GEM_ROOT]/bin/unicorn:23 :in `<main>`

Template error : "undefined local variable or method 'wishlist' "

When I try to share my wishlist, I get the following error:

ActionView::Template::Error (undefined local variable or method `wishlist' for #<#<Class:0xb448b48>:0xc65ba88>)

What I did was change the name of the object "wishlist" to "object" in the user template

 _mail_to_friend.text.erb

*The version of Spree and the version of Rails.
version spree(2.0.8.beta) and spree_wishlist(2.0).

*Your application's complete Gemfile, as text (not as an image)

source 'https://rubygems.org'

 gem 'rails', '~> 3.2.13' 
# Bundle edge Rails instead:
 #gem 'rails', :git => 'git://github.com/rails/rails.git'

 gem 'pg'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
 gem 'sass-rails',   '~> 3.2.3'
 gem 'coffee-rails', '~> 3.2.1'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
#gem 'therubyracer', :platforms => :ruby

 gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

#To use debugger
#gem 'debugger'

gem 'spree', github: 'spree/spree', branch: '2-0-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-0-stable'
gem 'spree_wishlist', :git => 'git://github.com/spree/spree_wishlist.git', branch: '2-0-stable'
gem 'spree_email_to_friend', :git => 'git://github.com/spree/spree_email_to_friend.git' , branch: '2-0-stable'

NoMethodError (undefined method `delete' for nil:NilClass; session problem using spree_wishlist 2.0 with spreee 2.0.13.beta

I'm getting a strange session problem related to wishlist objects

spree_wishlist 2.0
spreee 2.0.13.beta
Rails 3.2.21

stacktrace is below

I was able to to isolate this gem as the problem because I was able to debug inside of active_record/attribute_methods.rb. There's a spree wishlist object in memory that I get (1) nondeterministic results (1st time I inspect it, it crashes, works on all subsequent requests to inspect)

I think what is happening here is that the session contains some callback data that is somehow not on the wishlist object

Started GET "/" for 127.0.0.1 at 2015-01-17 16:49:07 -0500
Processing by Spree::HomeController#index as HTML
  Spree::User Load (0.2ms)  SELECT `spree_users`.* FROM `spree_users` WHERE `spree_users`.`id` = 64762 LIMIT 1
  Spree::Preference Load (0.2ms)  SELECT `spree_preferences`.* FROM `spree_preferences` WHERE `spree_preferences`.`key` = 'spree/frontend_configuration/locale' LIMIT 1
  Spree::Order Load (0.4ms)  SELECT `spree_orders`.* FROM `spree_orders` WHERE `spree_orders`.`user_id` = 64762 AND `spree_orders`.`completed_at` IS NULL AND `spree_orders`.`created_by_id` = 64762 ORDER BY created_at DESC LIMIT 1
  Spree::Bucket Load (0.3ms)  SELECT `spree_buckets`.* FROM `spree_buckets` WHERE `spree_buckets`.`slug` = 'gallery' LIMIT 1
  Spree::Bucket Load (0.2ms)  SELECT `spree_buckets`.* FROM `spree_buckets` WHERE `spree_buckets`.`slug` = 'promo' LIMIT 1
Deface: 2 overrides found for 'spree/home/index'
Deface: 'add_contents' matched 1 times with 'div[data-hook='homepage_products']'
Deface: [WARNING] No :original defined for 'add_contents', you should change its definition to include:
 :original => '86444b1c837ee9f714c463aee0ef6cd42216c9c0' 
Deface: 'remove_sidebar' matched 1 times with 'div[data-hook='homepage_sidebar_navigation']'
Deface: [WARNING] No :original defined for 'remove_sidebar', you should change its definition to include:
 :original => 'a251b1599dea0caf07a8e2ef145b848e4e6a66ab' 
Deface: 1 overrides found for 'spree/layouts/spree_application'
Deface: 'append_loading_message' matched 1 times with '#wrapper'
Deface: [WARNING] No :original defined for 'append_loading_message', you should change its definition to include:
 :original => '268637981a8730fe256c82820329adf3cdaabedb' 
  Spree::Bucket Load (0.3ms)  SELECT `spree_buckets`.* FROM `spree_buckets` WHERE `spree_buckets`.`slug` = 'site-wide-promo' LIMIT 1
  Spree::BucketContent Load (0.3ms)  SELECT `spree_bucket_contents`.* FROM `spree_bucket_contents` WHERE `spree_bucket_contents`.`bucket_id` = 9 AND (LOWER(title) LIKE '%homepage%') ORDER BY position LIMIT 1
  Rendered spree/shared/_promo_banner.html.slim (0.1ms)
  Spree::BucketContent Load (0.3ms)  SELECT `spree_bucket_contents`.* FROM `spree_bucket_contents` WHERE `spree_bucket_contents`.`bucket_id` = 7 ORDER BY position
  Spree::BucketContent Load (0.4ms)  SELECT `spree_bucket_contents`.* FROM `spree_bucket_contents` WHERE `spree_bucket_contents`.`bucket_id` = 8 ORDER BY position
  Rendered /Users/jason/.rvm/gems/ruby-2.0.0-p598/bundler/gems/spree-04fdf4de0ff1/frontend/app/views/spree/home/index.html.erb within spree/layouts/spree_application (18.1ms)
  Rendered /Users/jason/.rvm/gems/ruby-2.0.0-p598/bundler/gems/spree-04fdf4de0ff1/core/app/views/spree/shared/_routes.html.erb (0.3ms)
  Rendered /Users/jason/.rvm/gems/ruby-2.0.0-p598/bundler/gems/spree-04fdf4de0ff1/frontend/app/views/spree/shared/_head.html.erb (25.6ms)
  Spree::Order Load (0.3ms)  SELECT `spree_orders`.* FROM `spree_orders` WHERE `spree_orders`.`id` = 328314 AND `spree_orders`.`currency` = 'USD' LIMIT 1
  Spree::Adjustment Load (0.3ms)  SELECT `spree_adjustments`.* FROM `spree_adjustments` WHERE `spree_adjustments`.`adjustable_type` = 'Spree::Order' AND `spree_adjustments`.`adjustable_id` IN (328314) ORDER BY `spree_adjustments`.created_at ASC
   (0.2ms)  SELECT COUNT(*) FROM `spree_line_items` WHERE `spree_line_items`.`order_id` = 328314
  Spree::Promotion Load (1.3ms)  SELECT `spree_activators`.* FROM `spree_activators` WHERE `spree_activators`.`type` IN ('Spree::Promotion') AND `spree_activators`.`savings_meter` = 1
  Spree::PromotionRule Load (0.3ms)  SELECT `spree_promotion_rules`.* FROM `spree_promotion_rules` WHERE `spree_promotion_rules`.`activator_id` IN (5, 6, 7, 8, 1171)
  Spree::PromotionAction Load (0.2ms)  SELECT `spree_promotion_actions`.* FROM `spree_promotion_actions` WHERE `spree_promotion_actions`.`activator_id` = 5 LIMIT 1
  CACHE (0.0ms)  SELECT `spree_promotion_actions`.* FROM `spree_promotion_actions` WHERE `spree_promotion_actions`.`activator_id` = 5 LIMIT 1
  Spree::Calculator Load (0.3ms)  SELECT `spree_calculators`.* FROM `spree_calculators` WHERE `spree_calculators`.`calculable_id` = 5 AND `spree_calculators`.`calculable_type` = 'Spree::PromotionAction' LIMIT 1
  CACHE (0.0ms)  SELECT `spree_promotion_actions`.* FROM `spree_promotion_actions` WHERE `spree_promotion_actions`.`activator_id` = 5 LIMIT 1
  CACHE (0.0ms)  SELECT `spree_calculators`.* FROM `spree_calculators` WHERE `spree_calculators`.`calculable_id` = 5 AND `spree_calculators`.`calculable_type` = 'Spree::PromotionAction' LIMIT 1
  CACHE (0.0ms)  SELECT `spree_promotion_actions`.* FROM `spree_promotion_actions` WHERE `spree_promotion_actions`.`activator_id` = 5 LIMIT 1
  CACHE (0.0ms)  SELECT `spree_calculators`.* FROM `spree_calculators` WHERE `spree_calculators`.`calculable_id` = 5 AND `spree_calculators`.`calculable_type` = 'Spree::PromotionAction' LIMIT 1
  Spree::PromotionRule Load (0.3ms)  SELECT `spree_promotion_rules`.* FROM `spree_promotion_rules` WHERE `spree_promotion_rules`.`activator_id` = 5 AND `spree_promotion_rules`.`type` = 'Spree::Promotion::Rules::IneligibleProduct' LIMIT 1
  Spree::Product Load (0.3ms)  SELECT `spree_products`.* FROM `spree_products` INNER JOIN `spree_products_promotion_rules` ON `spree_products`.`id` = `spree_products_promotion_rules`.`product_id` WHERE `spree_products_promotion_rules`.`promotion_rule_id` = 9 AND (`spree_products`.deleted_at IS NULL)
  Spree::Product Load (0.5ms)  SELECT `spree_products`.* FROM `spree_products` WHERE (`spree_products`.deleted_at IS NULL) AND (id not in (14,33,34,49,54,72,73,74,75,76,77,78,79,81,83,86))
  Spree::Adjustment Load (0.3ms)  SELECT `spree_adjustments`.* FROM `spree_adjustments` WHERE `spree_adjustments`.`adjustable_id` = 328314 AND `spree_adjustments`.`adjustable_type` = 'Spree::Order' AND `spree_adjustments`.`originator_type` = 'Spree::PromotionAction' AND `spree_adjustments`.`savings_meter` = 0 AND `spree_adjustments`.`gated_reward` = 1 AND `spree_adjustments`.`free_shipping` = 0 AND `spree_adjustments`.`eligible` = 1 ORDER BY `spree_adjustments`.created_at ASC
  Spree::Adjustment Load (0.5ms)  SELECT `spree_adjustments`.* FROM `spree_adjustments` WHERE `spree_adjustments`.`adjustable_id` = 328314 AND `spree_adjustments`.`adjustable_type` = 'Spree::Order' AND `spree_adjustments`.`originator_type` = 'Spree::PromotionAction' AND `spree_adjustments`.`savings_meter` = 0 AND `spree_adjustments`.`gated_reward` = 0 AND `spree_adjustments`.`free_shipping` = 0 AND `spree_adjustments`.`eligible` = 1 ORDER BY `spree_adjustments`.created_at ASC
  Spree::PromotionAction Load (0.2ms)  SELECT `spree_promotion_actions`.* FROM `spree_promotion_actions` WHERE `spree_promotion_actions`.`activator_id` = 6 LIMIT 1
  CACHE (0.0ms)  SELECT `spree_promotion_actions`.* FROM `spree_promotion_actions` WHERE `spree_promotion_actions`.`activator_id` = 6 LIMIT 1
  Spree::Calculator Load (0.2ms)  SELECT `spree_calculators`.* FROM `spree_calculators` WHERE `spree_calculators`.`calculable_id` = 6 AND `spree_calculators`.`calculable_type` = 'Spree::PromotionAction' LIMIT 1
  CACHE (0.0ms)  SELECT `spree_promotion_actions`.* FROM `spree_promotion_actions` WHERE `spree_promotion_actions`.`activator_id` = 6 LIMIT 1
  CACHE (0.0ms)  SELECT `spree_calculators`.* FROM `spree_calculators` WHERE `spree_calculators`.`calculable_id` = 6 AND `spree_calculators`.`calculable_type` = 'Spree::PromotionAction' LIMIT 1
  CACHE (0.0ms)  SELECT `spree_promotion_actions`.* FROM `spree_promotion_actions` WHERE `spree_promotion_actions`.`activator_id` = 6 LIMIT 1
  CACHE (0.0ms)  SELECT `spree_calculators`.* FROM `spree_calculators` WHERE `spree_calculators`.`calculable_id` = 6 AND `spree_calculators`.`calculable_type` = 'Spree::PromotionAction' LIMIT 1
  Spree::PromotionRule Load (0.4ms)  SELECT `spree_promotion_rules`.* FROM `spree_promotion_rules` WHERE `spree_promotion_rules`.`activator_id` = 6 AND `spree_promotion_rules`.`type` = 'Spree::Promotion::Rules::IneligibleProduct' LIMIT 1
  Spree::Product Load (0.3ms)  SELECT `spree_products`.* FROM `spree_products` INNER JOIN `spree_products_promotion_rules` ON `spree_products`.`id` = `spree_products_promotion_rules`.`product_id` WHERE `spree_products_promotion_rules`.`promotion_rule_id` = 10 AND (`spree_products`.deleted_at IS NULL)
  CACHE (0.0ms)  SELECT `spree_products`.* FROM `spree_products` WHERE (`spree_products`.deleted_at IS NULL) AND (id not in (14,33,34,49,54,72,73,74,75,76,77,78,79,81,83,86))
  CACHE (0.0ms)  SELECT `spree_adjustments`.* FROM `spree_adjustments` WHERE `spree_adjustments`.`adjustable_id` = 328314 AND `spree_adjustments`.`adjustable_type` = 'Spree::Order' AND `spree_adjustments`.`originator_type` = 'Spree::PromotionAction' AND `spree_adjustments`.`savings_meter` = 0 AND `spree_adjustments`.`gated_reward` = 1 AND `spree_adjustments`.`free_shipping` = 0 AND `spree_adjustments`.`eligible` = 1 ORDER BY `spree_adjustments`.created_at ASC
  CACHE (0.0ms)  SELECT `spree_adjustments`.* FROM `spree_adjustments` WHERE `spree_adjustments`.`adjustable_id` = 328314 AND `spree_adjustments`.`adjustable_type` = 'Spree::Order' AND `spree_adjustments`.`originator_type` = 'Spree::PromotionAction' AND `spree_adjustments`.`savings_meter` = 0 AND `spree_adjustments`.`gated_reward` = 0 AND `spree_adjustments`.`free_shipping` = 0 AND `spree_adjustments`.`eligible` = 1 ORDER BY `spree_adjustments`.created_at ASC
  Spree::PromotionAction Load (0.3ms)  SELECT `spree_promotion_actions`.* FROM `spree_promotion_actions` WHERE `spree_promotion_actions`.`activator_id` = 7 LIMIT 1
  CACHE (0.0ms)  SELECT `spree_promotion_actions`.* FROM `spree_promotion_actions` WHERE `spree_promotion_actions`.`activator_id` = 7 LIMIT 1
  Spree::Calculator Load (0.2ms)  SELECT `spree_calculators`.* FROM `spree_calculators` WHERE `spree_calculators`.`calculable_id` = 7 AND `spree_calculators`.`calculable_type` = 'Spree::PromotionAction' LIMIT 1
  CACHE (0.0ms)  SELECT `spree_promotion_actions`.* FROM `spree_promotion_actions` WHERE `spree_promotion_actions`.`activator_id` = 7 LIMIT 1
  CACHE (0.0ms)  SELECT `spree_calculators`.* FROM `spree_calculators` WHERE `spree_calculators`.`calculable_id` = 7 AND `spree_calculators`.`calculable_type` = 'Spree::PromotionAction' LIMIT 1
  CACHE (0.0ms)  SELECT `spree_promotion_actions`.* FROM `spree_promotion_actions` WHERE `spree_promotion_actions`.`activator_id` = 7 LIMIT 1
  CACHE (0.0ms)  SELECT `spree_calculators`.* FROM `spree_calculators` WHERE `spree_calculators`.`calculable_id` = 7 AND `spree_calculators`.`calculable_type` = 'Spree::PromotionAction' LIMIT 1
  Spree::PromotionRule Load (0.2ms)  SELECT `spree_promotion_rules`.* FROM `spree_promotion_rules` WHERE `spree_promotion_rules`.`activator_id` = 7 AND `spree_promotion_rules`.`type` = 'Spree::Promotion::Rules::IneligibleProduct' LIMIT 1
  Spree::Product Load (0.3ms)  SELECT `spree_products`.* FROM `spree_products` INNER JOIN `spree_products_promotion_rules` ON `spree_products`.`id` = `spree_products_promotion_rules`.`product_id` WHERE `spree_products_promotion_rules`.`promotion_rule_id` = 12 AND (`spree_products`.deleted_at IS NULL)
  CACHE (0.0ms)  SELECT `spree_products`.* FROM `spree_products` WHERE (`spree_products`.deleted_at IS NULL) AND (id not in (14,33,34,49,54,72,73,74,75,76,77,78,79,81,83,86))
  CACHE (0.0ms)  SELECT `spree_adjustments`.* FROM `spree_adjustments` WHERE `spree_adjustments`.`adjustable_id` = 328314 AND `spree_adjustments`.`adjustable_type` = 'Spree::Order' AND `spree_adjustments`.`originator_type` = 'Spree::PromotionAction' AND `spree_adjustments`.`savings_meter` = 0 AND `spree_adjustments`.`gated_reward` = 1 AND `spree_adjustments`.`free_shipping` = 0 AND `spree_adjustments`.`eligible` = 1 ORDER BY `spree_adjustments`.created_at ASC
  CACHE (0.0ms)  SELECT `spree_adjustments`.* FROM `spree_adjustments` WHERE `spree_adjustments`.`adjustable_id` = 328314 AND `spree_adjustments`.`adjustable_type` = 'Spree::Order' AND `spree_adjustments`.`originator_type` = 'Spree::PromotionAction' AND `spree_adjustments`.`savings_meter` = 0 AND `spree_adjustments`.`gated_reward` = 0 AND `spree_adjustments`.`free_shipping` = 0 AND `spree_adjustments`.`eligible` = 1 ORDER BY `spree_adjustments`.created_at ASC
  Spree::PromotionAction Load (0.3ms)  SELECT `spree_promotion_actions`.* FROM `spree_promotion_actions` WHERE `spree_promotion_actions`.`activator_id` = 8 LIMIT 1
  CACHE (0.0ms)  SELECT `spree_promotion_actions`.* FROM `spree_promotion_actions` WHERE `spree_promotion_actions`.`activator_id` = 8 LIMIT 1
  Spree::Calculator Load (0.3ms)  SELECT `spree_calculators`.* FROM `spree_calculators` WHERE `spree_calculators`.`calculable_id` = 8 AND `spree_calculators`.`calculable_type` = 'Spree::PromotionAction' LIMIT 1
  Spree::PromotionAction Load (0.2ms)  SELECT `spree_promotion_actions`.* FROM `spree_promotion_actions` WHERE `spree_promotion_actions`.`activator_id` = 1171 LIMIT 1
  CACHE (0.0ms)  SELECT `spree_promotion_actions`.* FROM `spree_promotion_actions` WHERE `spree_promotion_actions`.`activator_id` = 1171 LIMIT 1
  Spree::Calculator Load (0.2ms)  SELECT `spree_calculators`.* FROM `spree_calculators` WHERE `spree_calculators`.`calculable_id` = 1238 AND `spree_calculators`.`calculable_type` = 'Spree::PromotionAction' LIMIT 1
  Rendered cart/_savings_meter.html.erb (63.1ms)
  Rendered spree/shared/_minicart.html.erb (0.9ms)
  Spree::Taxonomy Load (0.2ms)  SELECT `spree_taxonomies`.* FROM `spree_taxonomies` ORDER BY `spree_taxonomies`.position LIMIT 1
  Spree::Taxon Load (0.4ms)  SELECT `spree_taxons`.* FROM `spree_taxons` WHERE `spree_taxons`.`taxonomy_id` = 1 AND (parent_id is not NULL) ORDER BY position
  Rendered spree/shared/_header.html.erb (92.2ms)
  Rendered spree/shared/_footer.html.erb (1.5ms)
  Rendered spree/users/_forgot_pw.html.erb (0.5ms)
  Rendered spree/users/_thank_you.html.erb (0.1ms)
  Spree::Tracker Load (0.3ms)  SELECT `spree_trackers`.* FROM `spree_trackers` WHERE `spree_trackers`.`active` = 1 AND `spree_trackers`.`environment` = 'development' LIMIT 1
  Rendered /Users/jason/.rvm/gems/ruby-2.0.0-p598/bundler/gems/spree-04fdf4de0ff1/frontend/app/views/spree/shared/_google_analytics.html.erb (5.0ms)
  Rendered spree/shared/_google_marketing_tag.html.erb (0.1ms)
  Rendered spree/shared/_tapad_homepage.html.erb (0.1ms)
  Rendered spree/shared/_tapad_user_signup.html.erb (0.1ms)
  Rendered spree/shared/_adroll_pixel.html.erb (0.1ms)
  Rendered spree/shared/_rocketfuel_pixel.html.erb (0.1ms)
  Rendered spree/shared/_quantcast_pixel.html.slim (0.1ms)
  Rendered spree/shared/_google_tag_manager.html.erb (0.1ms)
  Rendered spree/shared/_marketing_pixel_home.html.erb (0.1ms)
  Rendered spree/shared/_fb_ad_tracking.html.erb (0.1ms)
Completed 200 OK in 341.4ms (Views: 287.0ms | ActiveRecord: 44.1ms)

NoMethodError (undefined method `delete' for nil:NilClass):
  activerecord (3.2.21) lib/active_record/attribute_methods/write.rb:28:in `write_attribute'
  activerecord (3.2.21) lib/active_record/attribute_methods/dirty.rb:67:in `write_attribute'
  activerecord (3.2.21) lib/active_record/attribute_methods.rb:31:in `[]='
  activerecord (3.2.21) lib/active_record/associations/collection_association.rb:413:in `block (2 levels) in merge_target_lists'
  activerecord (3.2.21) lib/active_record/associations/collection_association.rb:412:in `each'
  activerecord (3.2.21) lib/active_record/associations/collection_association.rb:412:in `block in merge_target_lists'
  activerecord (3.2.21) lib/active_record/associations/collection_association.rb:404:in `map!'
  activerecord (3.2.21) lib/active_record/associations/collection_association.rb:404:in `merge_target_lists'
  activerecord (3.2.21) lib/active_record/associations/collection_association.rb:335:in `load_target'
  activerecord (3.2.21) lib/active_record/associations/collection_proxy.rb:44:in `load_target'
  activerecord (3.2.21) lib/active_record/associations/collection_proxy.rb:73:in `respond_to?'
  activerecord (3.2.21) lib/active_record/session_store.rb:56:in `dump'
  activerecord (3.2.21) lib/active_record/session_store.rb:56:in `marshal'
  activerecord (3.2.21) lib/active_record/session_store.rb:150:in `marshal_data!'
  activesupport (3.2.21) lib/active_support/callbacks.rb:407:in `_run__1481651719483123352__save__326346571700430406__callbacks'
  activesupport (3.2.21) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.21) lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
  activesupport (3.2.21) lib/active_support/callbacks.rb:81:in `run_callbacks'
  activerecord (3.2.21) lib/active_record/callbacks.rb:264:in `create_or_update'
  activerecord (3.2.21) lib/active_record/persistence.rb:84:in `save'
  activerecord (3.2.21) lib/active_record/validations.rb:50:in `save'
  activerecord (3.2.21) lib/active_record/attribute_methods/dirty.rb:22:in `save'
  activerecord (3.2.21) lib/active_record/transactions.rb:259:in `block (2 levels) in save'
  activerecord (3.2.21) lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
  activerecord (3.2.21) lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
  activerecord (3.2.21) lib/active_record/transactions.rb:208:in `transaction'
  activerecord (3.2.21) lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
  activerecord (3.2.21) lib/active_record/transactions.rb:259:in `block in save'
  activerecord (3.2.21) lib/active_record/transactions.rb:270:in `rollback_active_record_state!'
  activerecord (3.2.21) lib/active_record/transactions.rb:258:in `save'
  activerecord (3.2.21) lib/active_record/session_store.rb:323:in `block in set_session'
  activesupport (3.2.21) lib/active_support/benchmarkable.rb:50:in `silence'
  activerecord (3.2.21) lib/active_record/session_store.rb:320:in `set_session'
  rack (1.4.5) lib/rack/session/abstract/id.rb:327:in `commit_session'
  rack (1.4.5) lib/rack/session/abstract/id.rb:211:in `context'
  rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/cookies.rb:341:in `call'
  activerecord (3.2.21) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.21) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  activesupport (3.2.21) lib/active_support/callbacks.rb:405:in `_run__1547698420819536313__call__326346571700430406__callbacks'
  activesupport (3.2.21) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.21) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.21) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.21) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/reloader.rb:65:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.21) lib/rails/rack/logger.rb:32:in `call_app'
  railties (3.2.21) lib/rails/rack/logger.rb:16:in `block in call'
  activesupport (3.2.21) lib/active_support/tagged_logging.rb:22:in `tagged'
  railties (3.2.21) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.5) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.21) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.5) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/static.rb:83:in `call'
  railties (3.2.21) lib/rails/engine.rb:484:in `call'
  railties (3.2.21) lib/rails/application.rb:231:in `call'
  rack (1.4.5) lib/rack/content_length.rb:14:in `call'
  railties (3.2.21) lib/rails/rack/log_tailer.rb:17:in `call'
  rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
  /Users/jason/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
  /Users/jason/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
  /Users/jason/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'


  Rendered /Users/jason/.rvm/gems/ruby-2.0.0-p598/gems/actionpack-3.2.21/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.1ms)
  Spree::Wishlist Load (0.5ms)  SELECT `spree_wishlists`.* FROM `spree_wishlists` WHERE `spree_wishlists`.`user_id` = 64762
  Rendered /Users/jason/.rvm/gems/ruby-2.0.0-p598/gems/actionpack-3.2.21/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (3.5ms)
  Rendered /Users/jason/.rvm/gems/ruby-2.0.0-p598/gems/actionpack-3.2.21/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (17.6ms)

'Add to cart' button doesn't work

In branch '2-2-stable', the Add to Cart button redirects to a page which doesn't exist, without adding the product to the cart.

Started POST "/orders/populate" for 127.0.0.1 at 2014-06-27 11:23:34 -0300
Processing by Spree::OrdersController#populate as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"YhS0Ok/FX8gVY9w1/H42Cp/KmsE401/nDHvfCZxUonw=", "variants"=>{"3"=>"1"}}
  Spree::Preference Load (0.7ms)  SELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = 'spree/frontend_configuration/locale' LIMIT 1
  Spree::User Load (0.8ms)  SELECT "spree_users".* FROM "spree_users" WHERE "spree_users"."id" = 3 ORDER BY "spree_users"."id" ASC LIMIT 1
  Spree::Order Load (1.0ms)  SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."user_id" = $1 AND "spree_orders"."completed_at" IS NULL AND "spree_orders"."created_by_id" = 3 ORDER BY created_at DESC LIMIT 1  [["user_id", 3]]
  Spree::Order Load (2.2ms)  SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."id" = 3 AND "spree_orders"."currency" = 'USD' LIMIT 1
  Spree::Adjustment Load (0.8ms)  SELECT "spree_adjustments".* FROM "spree_adjustments" WHERE "spree_adjustments"."adjustable_type" = 'Spree::Order' AND "spree_adjustments"."adjustable_id" IN (3) ORDER BY spree_adjustments.created_at ASC
  Spree::Order Load (0.7ms)  SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."number" IS NULL LIMIT 1
   (0.4ms)  SELECT COUNT(*) FROM "spree_roles" INNER JOIN "spree_roles_users" ON "spree_roles"."id" = "spree_roles_users"."role_id" WHERE "spree_roles_users"."user_id" = $1 AND "spree_roles"."name" = 'admin'  [["user_id", 3]]
  Spree::User Load (0.5ms)  SELECT "spree_users".* FROM "spree_users" WHERE "spree_users"."id" = $1 LIMIT 1  [["id", 3]]
  Rendered public/404.html (0.3ms)
Completed 404 Not Found in 66ms (Views: 18.1ms | ActiveRecord: 7.0ms)

screen shot 2014-06-27 at 11 23 52 am

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.