Code Monkey home page Code Monkey logo

spree-product-assembly's Introduction

Product Assembly

Build Status Code Climate

Create a product which is composed of other products.


Installation

  1. Add this extension to your Gemfile with this line:

    gem 'spree_product_assembly', github: 'spree-contrib/spree-product-assembly'
  2. Install the gem using Bundler:

    bundle install
  3. Copy & run migrations

    bundle exec rails g spree_product_assembly:install
  4. Restart your server

If your server was running, restart it so that it can find the assets properly.


Usage

To build a bundle (assembly product) you'd need to first check the Can be part flag on each product you want to be part of the bundle. Then create a product and add parts to it. By doing that you're making that product an assembly.

The store will treat assemblies a bit different than regular products on checkout. Spree will create and track inventory units for its parts rather than for the product itself. That means you essentially have a product composed of other products. From a customer perspective it's like they are paying a single amount for a collection of products.


Contributing

See corresponding guidelines.


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

spree-product-assembly's People

Contributors

adamfrey avatar bbonislawski avatar bdq avatar damianlegawiec avatar dfreerksen avatar futhr avatar huoxito avatar iloveitaly avatar jdutil avatar joshrpowell avatar jozw avatar jsqu99 avatar jumph4x avatar kianw avatar mauazua avatar nikos83 avatar nishant-cyro avatar pszyszkaspark avatar radar avatar rafalroslon avatar romul avatar rubenrails avatar schof avatar smartacus avatar sohara avatar vinniefranco avatar vygovskysergey avatar westonplatter avatar witekl avatar z4ppy 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

Watchers

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

spree-product-assembly's Issues

Individual sale not documented

Hi Guys,

Thank You for this great gem! Just a short question. There is an Individual sale checkbox in admin interface. What does it do exactly? Is it for choosing if Spree should track the inventory for the particular product or not?

Best Wishes,
Matt

Kit pricing from variant selection or explicitly defined.

Related to #75

We would require the ability to determine the price of the Kit either by being explicitly defined in the Kit OR from the price of the selected variants. If we wanted to adjust this price then we would then do this with a promotion.

Unable to define ability for the parts tab in admin

As described in the spree documentation:

If you need to create custom controllers for your own models under the Admin namespace, you will need to manually specify the model your controller manipulates by defining a model_class method in that controller.

module Spree
  module Admin
    class WidgetsController < BaseController
      def index
        # Relevant code in here
      end

    private
      def model_class
        Widget
      end
    end
  end
end

The parts_controller.rb is missing the model_class definition, hence it's impossible to define an ability to access the Parts tab in the admin of products.

2-0-stable branch

Now when view templates start to divert between ~> 2.0.0 and edge it would be nice with a 2-0-stable branch.

Extension routes interfere with spree core routes in particular product search

Hello,

While using this extension I noticed that the routes for admin/products don't seem to work properly in particular product search in admin/promotions/:id/edit.

I am using rails 3.2.13, spree 1.3.2, and product_assembly 1.0.0 (branch 1-3-stable).

After adding a promotion and selecting 'Add Rule of Type' > Product(s) a search box will appear. This triggers a search to: products/admin/search?q=something&_=123456 where 'search' will be interpreted as the product_id which will most likely return not found unless you have a product with the permalink 'search'

Changing the routes file in spree_product_assembly from:

Spree::Core::Engine.routes.prepend

to

Spree::Core::Engine.routes.append

Fixed the problem for me. Anyone else seeing this?

Packages shouldn't be split

@huoxito In our app it's important to make sure that bundles ship together. If one 'part' of the bundle is backordered then the entire shipment should remain together as one shipment. The behaviour we are seeing now is that they are being split into two packages, one with backordered variants and the other with on_hand variants. Can you think of any way to change this behaviour? I think that maybe we would have to override the Package class so that the content items know if they are part of an assembly or not?

undefined method on_hand for class Spree::Product

This is for the master branch.

undefined method on_hand for class Spree::Product

        /bundler/gems/spree-product-assembly-9910a841ae06/app/models/spree/product_decorator.rb:28:in `block in <top (required)>'
        /bundler/gems/spree-product-assembly-9910a841ae06/app/models/spree/product_decorator.rb:1:in `class_eval'
        /bundler/gems/spree-product-assembly-9910a841ae06/app/models/spree/product_decorator.rb:1:in `<top (required)>'

Packer class not compatible anymore with Spree 2.4

A call to product_assembly_package is completely incompatible with spree 2.4. The current Packer class still expects an order and loops through line items but the one in 2.4 no longer accepts an order instance and uses inventory_units to loop through

Also goes the same with the AssemblyPrioritizer where a call to Adjuster.new is not conforming to the revised Adjuster class on Spree 2.4.

I'm wondering if there's any plan to update this in the near future?

invalid sql generated

98e9e7b#L0R7 that take 1 product, 98e9e7b#L1R4 that sends them all, not sure which side is broken, but the end result is something like this

Mysql2::Error: Operand should contain 1 column(s): SELECT `spree_products`.* FROM `spree_products` INNER JOIN `spree_assemblies_parts` ON `spree_products`.`id` = `spree_assemblies_parts`.`assembly_id` WHERE `spree_assemblies_parts`.`part_id` = 151 AND (spree_assemblies_parts.assembly_id = 269,147)

Product parts are not exposed through API

Not sure if I'm doing something wrong, but I'm able to set things up with product parts yet I don't seem to be able to expose the product part information through API.

A quick run through the code in Spree master points to *product_attributes, which has no mention of product parts.

Am I missing something here, or is this really not yet covered by the plugin? Thanks! :)

Bug(s) affecting 1.3 and earlier

All the commented out code here needs to be renabled / verified for 1-3-stable and earlier.

https://github.com/spree/spree-product-assembly/blob/1-3-stable/app/models/spree/inventory_unit_decorator.rb#L24-L94

If you're using this extension as is, if you edit an order in the admin the inventory_units and count_on_hands will get fucked up.

2.0 and later won't be affected (once @huoxito's PR is merged).

Steps to reproduce:

  1. Create a bundle with two or more parts.
  2. Complete a checkout for the bundle.
  3. View the shipment in the admin and you will correctly see one inventory_unit for each part.
  4. Edit the order and increase the qty of the bundle.
  5. View the shipment and you'll now see no inventory_units for the parts, but a inventory_unit for the bundle itself.

Viewing shipment manifest in admin::orders#edit causes exception

When we view an order in the backend in orders#edit we get a detailed view of the shipment manifest for each shipment. In this line of the shipment partial the order object tries to find the corresponding order.line_item for a given item in than manfest. But in the case where the item on the manifest is a 'part' of a product assembly in can't find the correct order#line_item.

We would stil like to have a shipment manifest that lists for us the 'exploded' bundles (the parts that make them up) but perhaps it should say something like (part of bundle xyz).

Modifying an assembly's parts does not invalid the cache

If you have a view in your application that displays parts on the product page you will encounter this issue.

  • In an environment with caching create an assembly and give a part.
  • view the product show page
  • add or delete a part to the assembly
  • view product page

The product show page doesn't reflect the new parts. app_part should invalidate the products cache.

this needs to override shipment.item_cost

The default in core is line_items.map(&:amount).sum but since line_items show up with price 0 then the item_cost for a shipment that only has 1 bundled product is 0

example

>> Spree::Order.find_by_number('R050163548').line_items.size
=> 1
>> Spree::Order.find_by_number('R050163548').line_items.first.product.assembly?
=> true
>> Spree::Order.find_by_number('R050163548').shipments.size
=> 1
>> Spree::Order.find_by_number('R050163548').shipments.first.item_cost
=> 0
>> Spree::Order.find_by_number('R050163548').item_total.to_f
=> 85.99

Product assembly show template breakes w/spree 2.0.1 - ActionView::Template::Error (undefined method `in_stock?' for #<Spree::Variant:0x007f8a110f9180>)

Hi,

Just a quick report... looks like product assembly show template breakes with spree 2.0.1 -- see stacktrace below.

== for reference:
remote: https://github.com/spree/spree-product-assembly.git
revision: f3475b2

== stack trace:

Started GET "/products/box-test-1" for 127.0.0.1 at 2013-06-12 13:59:23 -0500
Processing by Spree::ProductsController#show as HTML
Parameters: {"id"=>"box-test-1"}

...
...

ActionView::Template::Error (undefined method `in_stock?' for #<Spree::Variant:0x007f8a110f9180>):
    42:         </div>
    43: <% end %>
    44: 
    45: <% if @product.parts.any?(&:in_stock?) %>
    46: 
    47:   <h6>Parts included</h6>
    48: 
  activemodel (3.2.13) lib/active_model/attribute_methods.rb:407:in `method_missing'
  activerecord (3.2.13) lib/active_record/attribute_methods.rb:149:in `method_missing'
  activerecord (3.2.13) lib/active_record/associations/collection_association.rb:285:in `block in any?'
  activerecord (3.2.13) lib/active_record/associations/collection_association.rb:285:in `each'
  activerecord (3.2.13) lib/active_record/associations/collection_association.rb:285:in `any?'
  activerecord (3.2.13) lib/active_record/associations/collection_association.rb:285:in `any?'
  activerecord (3.2.13) lib/active_record/associations/collection_proxy.rb:46:in `any?'
  spree_frontend (2.0.1) app/views/spree/products/show.html.erb:45:in `_74c34cb459027948536b5b534d98fe32'
  actionpack (3.2.13) lib/action_view/template.rb:145:in `block in render'
  activesupport (3.2.13) lib/active_support/notifications.rb:125:in `instrument'
  actionpack (3.2.13) lib/action_view/template.rb:143:in `render'
  deface (0.9.1) lib/deface/action_view_extensions.rb:37:in `render'
  actionpack (3.2.13) lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template'
  actionpack (3.2.13) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
  activesupport (3.2.13) lib/active_support/notifications.rb:123:in `block in instrument'
  activesupport (3.2.13) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.13) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.13) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
  actionpack (3.2.13) lib/action_view/renderer/template_renderer.rb:46:in `block in render_template'
  actionpack (3.2.13) lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout'
  actionpack (3.2.13) lib/action_view/renderer/template_renderer.rb:45:in `render_template'
  actionpack (3.2.13) lib/action_view/renderer/template_renderer.rb:18:in `render'
  actionpack (3.2.13) lib/action_view/renderer/renderer.rb:36:in `render_template'
  actionpack (3.2.13) lib/action_view/renderer/renderer.rb:17:in `render'
  actionpack (3.2.13) lib/abstract_controller/rendering.rb:110:in `_render_template'
  actionpack (3.2.13) lib/action_controller/metal/streaming.rb:225:in `_render_template'
  actionpack (3.2.13) lib/abstract_controller/rendering.rb:103:in `render_to_body'
  actionpack (3.2.13) lib/action_controller/metal/renderers.rb:28:in `render_to_body'
  actionpack (3.2.13) lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
  actionpack (3.2.13) lib/abstract_controller/rendering.rb:88:in `render'
  actionpack (3.2.13) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
  activesupport (3.2.13) lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
  /Users/seb/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
  activesupport (3.2.13) lib/active_support/core_ext/benchmark.rb:5:in `ms'
  actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:40:in `block in render'
  actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
  activerecord (3.2.13) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
  actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:39:in `render'
  actionpack (3.2.13) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
  actionpack (3.2.13) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
  actionpack (3.2.13) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.13) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.13) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (3.2.13) lib/active_support/callbacks.rb:491:in `_run__3523442018727694099__process_action__3337933110853036346__callbacks'
  activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.13) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  activesupport (3.2.13) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.13) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (3.2.13) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
  activesupport (3.2.13) lib/active_support/notifications.rb:123:in `block in instrument'
  activesupport (3.2.13) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.13) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  actionpack (3.2.13) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
  activerecord (3.2.13) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (3.2.13) lib/abstract_controller/base.rb:121:in `process'
  actionpack (3.2.13) lib/abstract_controller/rendering.rb:45:in `process'
  actionpack (3.2.13) lib/action_controller/metal.rb:203:in `dispatch'
  actionpack (3.2.13) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  actionpack (3.2.13) lib/action_controller/metal.rb:246:in `block in action'
  actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:73:in `call'
  actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
  actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:36:in `call'
  journey (1.0.4) lib/journey/router.rb:68:in `block in call'
  journey (1.0.4) lib/journey/router.rb:56:in `each'
  journey (1.0.4) lib/journey/router.rb:56:in `call'
  actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:612:in `call'
  railties (3.2.13) lib/rails/engine.rb:479:in `call'
  railties (3.2.13) lib/rails/railtie/configurable.rb:30:in `method_missing'
  journey (1.0.4) lib/journey/router.rb:68:in `block in call'
  journey (1.0.4) lib/journey/router.rb:56:in `each'
  journey (1.0.4) lib/journey/router.rb:56:in `call'
  actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:612:in `call'
  warden (1.2.1) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.1) lib/warden/manager.rb:34:in `catch'
  warden (1.2.1) lib/warden/manager.rb:34:in `call'
  actionpack (3.2.13) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.5) lib/rack/etag.rb:23:in `call'
  rack (1.4.5) lib/rack/conditionalget.rb:25:in `call'
  actionpack (3.2.13) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.2.13) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  actionpack (3.2.13) lib/action_dispatch/middleware/flash.rb:242:in `call'
  rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
  rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
  actionpack (3.2.13) lib/action_dispatch/middleware/cookies.rb:341:in `call'
  activerecord (3.2.13) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.13) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
  actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `_run__3712100674790033375__call__65520884291800248__callbacks'
  activesupport (3.2.13) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.13) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.13) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.13) lib/action_dispatch/middleware/reloader.rb:65:in `call'
  actionpack (3.2.13) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.13) lib/rails/rack/logger.rb:32:in `call_app'
  railties (3.2.13) lib/rails/rack/logger.rb:16:in `block in call'
  activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in `tagged'
  railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.13) 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.13) 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.13) lib/action_dispatch/middleware/static.rb:63:in `call'
  railties (3.2.13) lib/rails/engine.rb:479:in `call'
  railties (3.2.13) lib/rails/application.rb:223:in `call'
  rack (1.4.5) lib/rack/content_length.rb:14:in `call'
  railties (3.2.13) lib/rails/rack/log_tailer.rb:17:in `call'
  rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
  /Users/seb/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
  /Users/seb/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
  /Users/seb/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'

Unable to edit quantity of items in new order

The line_items.js.coffee is overriden in spree-products-assembly and it has not been updated along with the spree 2.3.x. Hence, some issues arise when trying to edit a new order.

When clicking the edit button in a line item row, it should show the input field for the quantity, which is not happening. Also, when pressing the Ok button after editing, it is triggering a reload of the order.

Steps to reproduce

1- Spree store version 2.3.4 (fresh installed).
2- Check that editing capabilities of new order quantities is working.
3- Add spree-product-assembly gem and install: rails g spree_product_assembly:install
4- Note how editing of new order quantities stopped working.

Screenshot

screen shot 2014-11-14 at 2 08 02 pm

Undefined method `should_track_inventory?' for xx:Fixnum

I'm having the following exception in 2-1-stable branch.

Undefined method `should_track_inventory?' for 7:Fixnum

Stacktrace:

NoMethodError - undefined method `should_track_inventory?' for 7:Fixnum:
   () Users/brunovalentino/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/spree-06e992459e95/core/app/models/spree/stock/quantifier.rb:12:in `total_on_hand'
   () Users/brunovalentino/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/spree-06e992459e95/core/app/models/spree/stock/quantifier.rb:24:in `can_supply?'
   () Users/brunovalentino/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/spree-product-assembly-e0b7b89b9497/app/models/spree/stock/availability_validator.rb:10:in `block in validate'
  activerecord (4.0.5) lib/active_record/relation/delegation.rb:13:in `all?'
   () Users/brunovalentino/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/spree-product-assembly-e0b7b89b9497/app/models/spree/stock/availability_validator.rb:9:in `validate'
  activesupport (4.0.5) lib/active_support/callbacks.rb:283:in `_callback_before_52'
  activesupport (4.0.5) lib/active_support/callbacks.rb:417:in `_run__288683390329509960__validate__callbacks'
  activesupport (4.0.5) lib/active_support/callbacks.rb:80:in `run_callbacks'
  activemodel (4.0.5) lib/active_model/validations.rb:373:in `run_validations!'
  activemodel (4.0.5) lib/active_model/validations/callbacks.rb:106:in `block in run_validations!'
  activesupport (4.0.5) lib/active_support/callbacks.rb:403:in `_run__288683390329509960__validation__callbacks'
  activesupport (4.0.5) lib/active_support/callbacks.rb:80:in `run_callbacks'
  activemodel (4.0.5) lib/active_model/validations/callbacks.rb:106:in `run_validations!'
  activemodel (4.0.5) lib/active_model/validations.rb:314:in `valid?'
  activerecord (4.0.5) lib/active_record/validations.rb:70:in `valid?'
  activerecord (4.0.5) lib/active_record/validations.rb:77:in `perform_validations'
  activerecord (4.0.5) lib/active_record/validations.rb:51:in `save'
  activerecord (4.0.5) lib/active_record/attribute_methods/dirty.rb:32:in `save'
  activerecord (4.0.5) lib/active_record/transactions.rb:270:in `block (2 levels) in save'
  activerecord (4.0.5) lib/active_record/transactions.rb:330:in `block in with_transaction_returning_status'
  activerecord (4.0.5) lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
  activerecord (4.0.5) lib/active_record/connection_adapters/abstract/database_statements.rb:221:in `within_new_transaction'
  activerecord (4.0.5) lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
  activerecord (4.0.5) lib/active_record/transactions.rb:209:in `transaction'
  activerecord (4.0.5) lib/active_record/transactions.rb:327:in `with_transaction_returning_status'
  activerecord (4.0.5) lib/active_record/transactions.rb:270:in `block in save'
  activerecord (4.0.5) lib/active_record/transactions.rb:285:in `rollback_active_record_state!'
  activerecord (4.0.5) lib/active_record/transactions.rb:269:in `save'
   () Users/brunovalentino/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/spree-06e992459e95/core/app/models/spree/order_contents.rb:46:in `add_to_line_item'
   () Users/brunovalentino/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/spree-06e992459e95/core/app/models/spree/order_contents.rb:13:in `add'
   () Users/brunovalentino/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/spree-06e992459e95/core/app/models/spree/order_populator.rb:49:in `attempt_cart_add'
   () Users/brunovalentino/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/spree-06e992459e95/core/app/models/spree/order_populator.rb:26:in `block in populate'
   () Users/brunovalentino/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/spree-06e992459e95/core/app/models/spree/order_populator.rb:25:in `populate'
   () Users/brunovalentino/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/spree-06e992459e95/frontend/app/controllers/spree/orders_controller.rb:53:in `populate'
  actionpack (4.0.5) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (4.0.5) lib/abstract_controller/base.rb:189:in `process_action'
  actionpack (4.0.5) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (4.0.5) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (4.0.5) lib/active_support/callbacks.rb:443:in `_run__2775018920736989006__process_action__callbacks'
  activesupport (4.0.5) lib/active_support/callbacks.rb:80:in `run_callbacks'
  actionpack (4.0.5) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (4.0.5) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (4.0.5) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
  activesupport (4.0.5) lib/active_support/notifications.rb:159:in `block in instrument'
  activesupport (4.0.5) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.0.5) lib/active_support/notifications.rb:159:in `instrument'
  actionpack (4.0.5) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  actionpack (4.0.5) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
  activerecord (4.0.5) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (4.0.5) lib/abstract_controller/base.rb:136:in `process'
  actionpack (4.0.5) lib/abstract_controller/rendering.rb:44:in `process'
  actionpack (4.0.5) lib/action_controller/metal.rb:195:in `dispatch'
  actionpack (4.0.5) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
  actionpack (4.0.5) lib/action_controller/metal.rb:231:in `block in action'
  actionpack (4.0.5) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
  actionpack (4.0.5) lib/action_dispatch/routing/route_set.rb:48:in `call'
  actionpack (4.0.5) lib/action_dispatch/journey/router.rb:71:in `block in call'
  actionpack (4.0.5) lib/action_dispatch/journey/router.rb:59:in `call'
  actionpack (4.0.5) lib/action_dispatch/routing/route_set.rb:674:in `call'
  railties (4.0.5) lib/rails/engine.rb:511:in `call'
  railties (4.0.5) lib/rails/railtie/configurable.rb:30:in `method_missing'
  actionpack (4.0.5) lib/action_dispatch/journey/router.rb:71:in `block in call'
  actionpack (4.0.5) lib/action_dispatch/journey/router.rb:59:in `call'
  actionpack (4.0.5) lib/action_dispatch/routing/route_set.rb:674:in `call'
  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.3) lib/warden/manager.rb:34:in `call'
  rack (1.5.2) lib/rack/etag.rb:23:in `call'
  rack (1.5.2) lib/rack/conditionalget.rb:35:in `call'
  rack (1.5.2) lib/rack/head.rb:11:in `call'
  actionpack (4.0.5) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  actionpack (4.0.5) lib/action_dispatch/middleware/flash.rb:241:in `call'
  rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
  rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
  actionpack (4.0.5) lib/action_dispatch/middleware/cookies.rb:486:in `call'
  activerecord (4.0.5) lib/active_record/query_cache.rb:36:in `call'
  activerecord (4.0.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
  actionpack (4.0.5) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  activesupport (4.0.5) lib/active_support/callbacks.rb:373:in `_run__561224325035462476__call__callbacks'
  activesupport (4.0.5) lib/active_support/callbacks.rb:80:in `run_callbacks'
  actionpack (4.0.5) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (4.0.5) lib/action_dispatch/middleware/reloader.rb:64:in `call'
  actionpack (4.0.5) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
  better_errors (1.1.0) lib/better_errors/middleware.rb:84:in `protected_app_call'
  better_errors (1.1.0) lib/better_errors/middleware.rb:79:in `better_errors_call'
  better_errors (1.1.0) lib/better_errors/middleware.rb:56:in `call'
  airbrake (4.0.0) lib/airbrake/rails/middleware.rb:13:in `call'
  actionpack (4.0.5) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  actionpack (4.0.5) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.0.5) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.0.5) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.0.5) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.0.5) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.0.5) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.0.5) lib/rails/rack/logger.rb:20:in `call'
  actionpack (4.0.5) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
  rack (1.5.2) lib/rack/runtime.rb:17:in `call'
  activesupport (4.0.5) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  actionpack (4.0.5) lib/action_dispatch/middleware/static.rb:64:in `call'
  rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
  airbrake (4.0.0) lib/airbrake/user_informer.rb:16:in `_call'
  airbrake (4.0.0) lib/airbrake/user_informer.rb:12:in `call'
  railties (4.0.5) lib/rails/engine.rb:511:in `call'
  railties (4.0.5) lib/rails/application.rb:97:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  rack (1.5.2) lib/rack/content_length.rb:14:in `call'
  rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
  /Users/brunovalentino/.rbenv/versions/2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
  /Users/brunovalentino/.rbenv/versions/2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
  /Users/brunovalentino/.rbenv/versions/2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'

It occurs when trying to add an assembly to the shopping cart.

Seems that Spree::Stock::Quantifier#total_on_hand is expecting a variant (line 12) and it actually is a fixnum.

I can see that has changed in branch '2-2-stable' (https://github.com/spree/spree-product-assembly/blob/2-2-stable/app/models/spree/stock/availability_validator.rb).

Product's 'assemblies' association is broken

I was refactoring the associations in order to get rid of the, now deprecated, HABTM relationships when I noticed that the assemblies declaration in product_decorator.rb is broken. Here's how the current code looks like:

# association
has_and_belongs_to_many  :assemblies, :class_name => "Spree::Product",
        :join_table => "spree_assemblies_parts",
        :foreign_key => "part_id", :association_foreign_key => "assembly_id"

# ....

# method that relies on assemblies
def part?
  assemblies.present?
end

Problem and steps to reproduce:

# rails console
product = Spree::Product.first # assuming this product has parts
part = product.parts.first # returns a Variant, not a Product, which is the expected beahavior
part.product.part? # Will always return False, expected to return True

So, the problem seems to be that, due to the way the association is being declared, the assemblies call will query the spree_assemblies_parts where part_id is the Product's :id โ€” remember we're storing the Variant :id instead.

Currently there's no spec that tests neither the assemblies or part? methods, I added one just to check and it passes, but only because the variants and products share the same :ids when testing. I quickly created a variant before the test just to increment the id on the variants table and I was able to see that test in red.

I'll try do a PR later on the week. Please confirm that this is happening and give me feedback.

cc: @huoxito

2.0 compatibility

Needs compatibility with 2.0/master. Seems hardcoded to 1.3 at present.

Bad link in cart for non-individual-sale parts

The line item description shows links for all 'part' products, regardless of their 'individual sale' status.

As a result, clicking the non-individual-sale links renders a 404. I suppose we should display w/ out a link?

I'll include this in my pull request

Testing of new master branch requires phantomjs

It is necessary to install phantomjs (via brew install on MacOS X) to successfully execute the tests for the new master branch because the feature testing has been moved from webdriver/selenium to poltergeist/phantomjs. Not installing phantomjs will result in errors from Cliver. This should probably be documented since it is a significant (albeit welcome) change. (The headless tests run much faster now.)

Please note that it is unnecessary to install the phantomjs gem and/or specify it in the gemspec.

Shipping methods determination ignore shipping category of assembly

Package#shipping_methods https://github.com/spree/spree/blob/3-0-stable/core/app/models/spree/stock/package.rb#L68 is based on parts shipping categories, but store owner can set separate shipping category for assembly itself.

I propose to override https://github.com/spree/spree/blob/3-0-stable/core/app/models/spree/stock/package.rb#L64..L66 with:

module Spree
  module Stock
    Package.class_eval do
      def shipping_categories
        contents.map { |item| item.line_item.variant.shipping_category }.compact.uniq
      end
    end
  end
end

What do you think about it?

OrderInventory#remove_from_shipment should receive line_item as arg?

The extension overrides OrderInventory#add_to_line_item from spree core here:
https://github.com/spree/spree-product-assembly/blob/master/app/models/spree/order_inventory_decorator.rb#L35, accepting a line_item arg that is passed to Shipment#set_up_inventory here:
https://github.com/spree/spree-product-assembly/blob/master/app/models/spree/shipment_decorator.rb#L10, which has also been overidden to accept the line_item argument. This way, when adding inventory to a shipment we keep good track of which line_item it is associated with (possibly one of several different assemblies, or just regular product).

Likewise, it would make sense when removing an item from a shipment (in OrderInventory#remove_from_shipment we should be able to target the inventory unit with correct corresponding line_item, so things in the manifest don't get messed up. What do you think?

Dont track inventory for a bundle

A bundle / assembly should not track inventory. Currently users an Out of stock flag even then all parts within the bundle have enough stock.

Spree 1.1 support

Hi All,

FYI, I'll probably fork and submit a pull request, but a heads up that using spree 1.1, I had to remove the:

:template => 

from

this

to add a part in the admin app. Here is the error message I was getting:

ActionView::MissingTemplate (Missing template spree/admin/parts/create with {:locale=>[:en], :formats=>[:js, "application/ecmascript", "application/x-ecmascript", :html, :text, :js, :css, :ics, :csv, :png, :jpeg, :gif, :bmp, :tiff, :mpeg, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip], :handlers=>[:erb, :builder, :coffee, :rabl]}. Searched in:

  • "/Users/jsquires/src/github/wantable/app/views"
  • "/Users/jsquires/.rvm/gems/ruby-1.9.3-p0-falcon/bundler/gems/spree-product-assembly-b2b95cf7262f/app/views"

Product Bundle considered as "out of stock"

Product bundle is created and has "on_hand and on_hand_with_assembly" set to right quantity, still its considered as "out of stock" product and an order is considered as backorder, with "count_on_hand=zero" in Variants table.

Ideally, after an order has been placed, it should manage the inventory of the bundled part products.

uninitialized constant Spree::Admin::LineItemsController

After installing the gem on Spree 2.4 and running rails s, I get:

/home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/spree-product-assembly-a2e6d2e93c27/app/controllers/spree/admin/line_items_controller_decorator.rb:3:in `<module:Admin>': uninitialized constant Spree::Admin::LineItemsController (NameError)
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/spree-product-assembly-a2e6d2e93c27/app/controllers/spree/admin/line_items_controller_decorator.rb:2:in `<module:Spree>'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/spree-product-assembly-a2e6d2e93c27/app/controllers/spree/admin/line_items_controller_decorator.rb:1:in `<top (required)>'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/spree-product-assembly-a2e6d2e93c27/lib/spree_product_assembly/engine.rb:9:in `block in activate'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/spree-product-assembly-a2e6d2e93c27/lib/spree_product_assembly/engine.rb:8:in `glob'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/spree-product-assembly-a2e6d2e93c27/lib/spree_product_assembly/engine.rb:8:in `activate'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:438:in `instance_exec'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:438:in `block in make_lambda'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:184:in `call'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:184:in `block in simple'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:185:in `call'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:185:in `block in simple'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:185:in `call'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:185:in `block in simple'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:185:in `call'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:185:in `block in simple'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:185:in `call'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:185:in `block in simple'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:185:in `call'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:185:in `block in simple'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:185:in `call'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:185:in `block in simple'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:185:in `call'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:185:in `block in simple'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:86:in `call'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:86:in `run_callbacks'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/reloader.rb:83:in `prepare!'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/reloader.rb:55:in `prepare!'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/application/finisher.rb:52:in `block in <module:Finisher>'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `instance_exec'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `run'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `each'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `call'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/initializable.rb:54:in `run_initializers'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/application.rb:300:in `initialize!'
    from /vagrant/dragondoor/config/environment.rb:5:in `<top (required)>'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
    from /vagrant/dragondoor/config.ru:3:in `block in <main>'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
    from /vagrant/dragondoor/config.ru:in `new'
    from /vagrant/dragondoor/config.ru:in `<main>'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/server.rb:50:in `app'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/server.rb:130:in `log_to_stdout'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/server.rb:67:in `start'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:81:in `block in server'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `tap'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `server'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands.rb:17:in `<top (required)>'
    from /vagrant/dragondoor/bin/rails:8:in `require'
    from /vagrant/dragondoor/bin/rails:8:in `<top (required)>'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/vagrant/.rbenv/versions/2.1.5/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /vagrant/dragondoor/bin/spring:16:in `<top (required)>'
    from bin/rails:3:in `load'
    from bin/rails:3:in `<main>'

I see here that 2.4 isn't fully compatible yet, but they seem to be getting farther than I am.

NoMethodError: undefined method `price_changed?' for #<Spree::Variant

I'm getting a

NoMethodError: undefined method `price_changed?' for #<Spree::Variant

When I run the latest 1-3-stable and attempt to make a new product. I commented on the relevant commit. Any ideas?

Here is the backtrace:

vendor/bundle/ruby/1.9.1/gems/activemodel-3.2.14/lib/active_model/attribute_methods.rb:407:in `method_missing'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/attribute_methods.rb:149:in `method_missing'
vendor/bundle/ruby/1.9.1/bundler/gems/spree-product-assembly-6d390fdd1a81/app/models/spree/variant_decorator.rb:12:in `recalc_assemblies_price'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:433:in `_run__4031313264730012075__update__499021083125508120__callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:405:in `__run_callback'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:385:in `_run_update_callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/callbacks.rb:272:in `update'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/persistence.rb:348:in `create_or_update'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/callbacks.rb:264:in `block in create_or_update'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:425:in `_run__4031313264730012075__save__499021083125508120__callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:405:in `__run_callback'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/callbacks.rb:264:in `create_or_update'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/persistence.rb:84:in `save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/validations.rb:50:in `save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/attribute_methods/dirty.rb:22:in `save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/transactions.rb:259:in `block (2 levels) in save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/transactions.rb:208:in `transaction'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/transactions.rb:259:in `block in save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/transactions.rb:270:in `rollback_active_record_state!'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/transactions.rb:258:in `save'
vendor/bundle/ruby/1.9.1/bundler/gems/spree-a4de83cd2376/core/app/models/spree/product.rb:293:in `save_master'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:460:in `_run__4141391883395827237__save__499021083125508120__callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:405:in `__run_callback'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/callbacks.rb:264:in `create_or_update'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/persistence.rb:84:in `save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/validations.rb:50:in `save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/attribute_methods/dirty.rb:22:in `save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/transactions.rb:259:in `block (2 levels) in save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/transactions.rb:208:in `transaction'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/transactions.rb:259:in `block in save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/transactions.rb:270:in `rollback_active_record_state!'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/transactions.rb:258:in `save'
vendor/bundle/ruby/1.9.1/bundler/gems/spree-a4de83cd2376/core/app/controllers/spree/admin/resource_controller.rb:44:in `create'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/abstract_controller/base.rb:167:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_controller/metal/rendering.rb:10:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:502:in `_run__2277468629936479034__process_action__754060449196062329__callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:405:in `__run_callback'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/abstract_controller/callbacks.rb:17:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_controller/metal/rescue.rb:29:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/notifications.rb:123:in `block in instrument'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/notifications.rb:123:in `instrument'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/abstract_controller/base.rb:121:in `process'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/abstract_controller/rendering.rb:45:in `process'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_controller/metal.rb:203:in `dispatch'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_controller/metal.rb:246:in `block in action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/routing/route_set.rb:73:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/routing/route_set.rb:36:in `call'
vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/routing/route_set.rb:608:in `call'
vendor/bundle/ruby/1.9.1/bundler/gems/spree-a4de83cd2376/core/lib/spree/core/middleware/redirect_legacy_product_url.rb:13:in `call'
vendor/bundle/ruby/1.9.1/bundler/gems/spree-a4de83cd2376/core/lib/spree/core/middleware/seo_assist.rb:27:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.2.14/lib/rails/engine.rb:484:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.2.14/lib/rails/railtie/configurable.rb:30:in `method_missing'
vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/routing/route_set.rb:608:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/deflater.rb:13:in `call'
vendor/bundle/ruby/1.9.1/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
vendor/bundle/ruby/1.9.1/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'
vendor/bundle/ruby/1.9.1/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/conditionalget.rb:35:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/head.rb:14:in `call'
vendor/bundle/ruby/1.9.1/gems/remotipart-1.0.5/lib/remotipart/middleware.rb:30:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/flash.rb:242:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/cookies.rb:341:in `call'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/query_cache.rb:64:in `call'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:405:in `_run__3208814715198858493__call__499021083125508120__callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:405:in `__run_callback'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.2.14/lib/rails/rack/logger.rb:32:in `call_app'
vendor/bundle/ruby/1.9.1/gems/railties-3.2.14/lib/rails/rack/logger.rb:16:in `block in call'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/tagged_logging.rb:22:in `tagged'
vendor/bundle/ruby/1.9.1/gems/railties-3.2.14/lib/rails/rack/logger.rb:16:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/request_id.rb:22:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-rewrite-1.3.3/lib/rack/rewrite.rb:20:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/static.rb:63:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass'
vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate'
vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!'
vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.2.14/lib/rails/engine.rb:484:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.2.14/lib/rails/application.rb:231:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.2.14/lib/rails/railtie/configurable.rb:30:in `method_missing'
vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:552:in `process_client'
vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:632:in `worker_loop'
vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:500:in `spawn_missing_workers'
vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:142:in `start'
vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.3/bin/unicorn:126:in `<top (required)>'
vendor/bundle/ruby/1.9.1/bin/unicorn:23:in `load'
vendor/bundle/ruby/1.9.1/bin/unicorn:23:in `<main>'

AssemblyShipmentSerializer super class mismatch issue

Running into a slightly annoying issue (2-3-stable) whereby the Spree::Wombat::AssemblyShipmentSerializer is regularly throwing a superclass mismatch error after changes are made in our app in development mode - issue comes from this line of code:

https://github.com/spree/spree-product-assembly/blob/2-3-stable/lib/spree_product_assembly/engine.rb#L14

Changing it to simply require it fixes the problem - I assume there was a reason to be load-ing it though in the first place, testing or some-such?

I also note that in the current master version of this Gem you've removed it entirely (not an option for us at the moment unfortunately as we can't move up to master spree without doing some serious hackery).

Long story short - can I open a PR removing that load jazz from 2-3-stable or will it cause devastation in ways I've not considered? Or other options/ideas?

Cheers!

Rhys

uninitialized constant InventoryUnit (NameError)

Did i miss something? Added to Gemfile and ran bundle install

$ rails -v
Rails 3.2.3

$ spree version
1.1.1

I'm getting the following

rails g spree_product_assembly:install
[WARNING] You no longer need to manually require overrides, remove require for 'product_assembly_admin_product_tabs'.
[WARNING] You no longer need to manually require overrides, remove require for 'product_assembly_cart_item_description'.
[WARNING] You no longer need to manually require overrides, remove require for 'product_assembly_admin_product_form_right'.
/opt/local/lib/ruby/gems/1.8/gems/spree_product_assembly-0.60.0/lib/../app/models/inventory_unit_decorator.rb:1: uninitialized constant InventoryUnit (NameError)
from /opt/local/lib/ruby/gems/1.8/gems/spree_product_assembly-0.60.0/lib/spree_product_assembly.rb:8:in `activate'
from /opt/local/lib/ruby/gems/1.8/gems/spree_product_assembly-0.60.0/lib/spree_product_assembly.rb:7:in `glob'
from /opt/local/lib/ruby/gems/1.8/gems/spree_product_assembly-0.60.0/lib/spree_product_assembly.rb:7:in `activate'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:506:in `_run__1662912984__prepare__4__callbacks'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405:in `send'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405:in `__run_callback'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:385:in `_run_prepare_callbacks'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:81:in `send'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:81:in `run_callbacks'
from /opt/local/lib/ruby/gems/1.8/gems/actionpack-3.2.3/lib/action_dispatch/middleware/reloader.rb:74:in `prepare!'
from /opt/local/lib/ruby/gems/1.8/gems/actionpack-3.2.3/lib/action_dispatch/middleware/reloader.rb:48:in `prepare!'
from /opt/local/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/application/finisher.rb:47
from /opt/local/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `instance_exec'
from /opt/local/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `run'
from /opt/local/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:55:in `run_initializers'
from /opt/local/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `each'
from /opt/local/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `run_initializers'
from /opt/local/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/application.rb:136:in `initialize!'
from /opt/local/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `send'
from /opt/local/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/geermc4/Sites/store/config/environment.rb:5
from /opt/local/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/application.rb:103:in `require_environment!'
from /opt/local/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/commands.rb:25
from script/rails:6:in `require'
from script/rails:6

Availability validated for wrong quantity

The AvailabilityValidator seems to be validating for the entire quantity of the line_item instead of the quantity being added to the line_item (as spree's does). The AvailabilityValidator needs to be changed to validate only the availability of additional parts needed to fulfill changes to the line_item's quantity.

Users unable to select saved payment sources

The override of CheckoutController#before_payment disables the loading of @payment_sources.

When used with Authorize.Net CIM, this causes users with saved credit cards to never see the option to reuse them. Only known workaround is to copy the relevant code from Spree::Frontend into a project's own override.

Spree::CheckoutController.class_eval do
  private

    # Override the override from spree_product_assembly, to re-enable payment_sources
    def before_payment
      if try_spree_current_user && try_spree_current_user.respond_to?(:payment_sources)
        @payment_sources = try_spree_current_user.payment_sources
      end
    end

end

Failing TravisCI tests

With the most recent commit, Travis CI is failing for all versions of Ruby. It is getting an error similar to the one at the bottom of this issue.

This issue is coming from this line https://github.com/spree-contrib/spree-product-assembly/blob/master/app/serializers/spree/wombat/assembly_shipment_serializer.rb#L35 If you remove the if everything runs as expected. Is the if even needed? lib/spree_product_assembly/engine.rb is already checking if Spree::Wombat::Engine is loaded before it loads the serializers.

Maybe it would be better to only load spree_wombat in development or test environments only?

I'm not using Wombat so I'm not sure what I am saying is valid or correct. That is why this is an issue instead of a PR. Any insight on this would help.

Coverage report generated for RSpec to /Users/dfreerksen/ruby/projects/spree-product-assembly/coverage. 82 / 172 LOC (47.67%) covered.
/Users/dfreerksen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:481:in `load_missing_constant': Unable to autoload constant Spree::Wombat::AssemblyShipmentSerializer, expected /Users/dfreerksen/ruby/projects/spree-product-assembly/app/serializers/spree/wombat/assembly_shipment_serializer.rb to define it (LoadError)
    from /Users/dfreerksen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:180:in `const_missing'
    from /Users/dfreerksen/ruby/projects/spree-product-assembly/spec/serializers/spree/wombat/assembly_shipment_serializer_spec.rb:5:in `<module:Wombat>'
    from /Users/dfreerksen/ruby/projects/spree-product-assembly/spec/serializers/spree/wombat/assembly_shipment_serializer_spec.rb:4:in `<module:Spree>'
    from /Users/dfreerksen/ruby/projects/spree-product-assembly/spec/serializers/spree/wombat/assembly_shipment_serializer_spec.rb:3:in `<top (required)>'
    from /Users/dfreerksen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241:in `load'
    from /Users/dfreerksen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241:in `block in load'
    from /Users/dfreerksen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:232:in `load_dependency'
    from /Users/dfreerksen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241:in `load'
    from /Users/dfreerksen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1105:in `block in load_spec_files'
    from /Users/dfreerksen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1105:in `each'
    from /Users/dfreerksen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1105:in `load_spec_files'
    from /Users/dfreerksen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:96:in `setup'
    from /Users/dfreerksen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:84:in `run'
    from /Users/dfreerksen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:69:in `run'
    from /Users/dfreerksen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:37:in `invoke'
    from /Users/dfreerksen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/exe/rspec:4:in `<top (required)>'
    from /Users/dfreerksen/.rbenv/versions/2.1.2/bin/rspec:23:in `load'
    from /Users/dfreerksen/.rbenv/versions/2.1.2/bin/rspec:23:in `<main>'

Encoding::UndefinedConversionError ("\xD7" from ASCII-8BIT to UTF-8):

hello,

after adding "spree-product-assembly" gem to the gemfile when i get to a one of the pages i get this error: "Encoding::UndefinedConversionError ("\xD7" from ASCII-8BIT to UTF-8)"

just to let you know , i'm using Hebrew characters in the website.

here is the stack trace:

Started GET "/products/ytsvb-myvkhd-llqtrh-br" for 10.0.2.2 at 2013-12-09 19:23:27 +0200
Processing by Spree::ProductsController#show as HTML
  Parameters: {"id"=>"ytsvb-myvkhd-llqtrh-br"}
  Spree::Preference Load (0.5ms)  SELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = 'spree/frontend_configuration/locale' ORDER BY "spree_preferences"."id" ASC LIMIT 1
   (0.2ms)  BEGIN
  SQL (0.7ms)  UPDATE "spree_preferences" SET "value_type" = $1, "updated_at" = $2, "value" = $3 WHERE "spree_preferences"."id" = 7  [["value_type", :string], ["updated_at", Mon, 09 Dec 2013 17:23:27 UTC +00:00], ["value", "--- he\n...\n"]]
   (1.5ms)  COMMIT
  Spree::Preference Load (1.1ms)  SELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = 'spree/backend_configuration/locale' ORDER BY "spree_preferences"."id" ASC LIMIT 1
   (0.3ms)  BEGIN
  SQL (0.4ms)  UPDATE "spree_preferences" SET "value_type" = $1, "updated_at" = $2, "value" = $3 WHERE "spree_preferences"."id" = 8  [["value_type", :string], ["updated_at", Mon, 09 Dec 2013 17:23:27 UTC +00:00], ["value", "--- en\n...\n"]]
   (0.9ms)  COMMIT
  Spree::Order Load (0.3ms)  SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."id" = $1 LIMIT 1  [["id", 9]]
  Spree::Taxonomy Load (0.4ms)  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 "spree_taxons"."parent_id" IS NULL ORDER BY "lft" LIMIT 1  [["taxonomy_id", 18]]
  Spree::Taxon Load (0.3ms)  SELECT "spree_taxons".* FROM "spree_taxons" WHERE "spree_taxons"."parent_id" = $1 ORDER BY "lft"  [["parent_id", 62]]
  Spree::User Load (0.5ms)  SELECT "spree_users".* FROM "spree_users" WHERE "spree_users"."id" = 1 ORDER BY "spree_users"."id" ASC LIMIT 1
  Spree::Order Load (0.4ms)  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" = 1 ORDER BY created_at DESC LIMIT 1  [["user_id", 1]]
  Spree::Order Load (0.4ms)  SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."id" = 9 AND "spree_orders"."currency" = 'ILS' LIMIT 1
  Spree::Adjustment Load (0.4ms)  SELECT "spree_adjustments".* FROM "spree_adjustments" WHERE "spree_adjustments"."adjustable_type" = 'Spree::Order' AND "spree_adjustments"."adjustable_id" IN (9) ORDER BY spree_adjustments.created_at ASC
   (0.5ms)  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", 1]]
  Spree::Product Load (0.4ms)  SELECT "spree_products".* FROM "spree_products" WHERE ("spree_products".deleted_at IS NULL) AND "spree_products"."permalink" = 'ytsvb-myvkhd-llqtrh-br' LIMIT 1
  Spree::ProductProperty Load (0.2ms)  SELECT "spree_product_properties".* FROM "spree_product_properties" WHERE "spree_product_properties"."product_id" = $1 ORDER BY spree_product_properties.position  [["product_id", 57]]
  Spree::Property Load (0.3ms)  SELECT "spree_properties".* FROM "spree_properties" WHERE "spree_properties"."id" = $1 ORDER BY "spree_properties"."id" ASC LIMIT 1  [["id", 1]]
  Spree::PropertyGroup Load (0.2ms)  SELECT "spree_property_groups".* FROM "spree_property_groups" WHERE "spree_property_groups"."id" = $1 ORDER BY "spree_property_groups"."id" ASC LIMIT 1  [["id", 1]]
  Spree::Property Load (0.3ms)  SELECT "spree_properties".* FROM "spree_properties" WHERE "spree_properties"."id" = $1 ORDER BY "spree_properties"."id" ASC LIMIT 1  [["id", 3]]
  Spree::PropertyGroup Load (0.4ms)  SELECT "spree_property_groups".* FROM "spree_property_groups" WHERE "spree_property_groups"."id" = $1 ORDER BY "spree_property_groups"."id" ASC LIMIT 1  [["id", 3]]
  Spree::Property Load (0.4ms)  SELECT "spree_properties".* FROM "spree_properties" WHERE "spree_properties"."id" = $1 ORDER BY "spree_properties"."id" ASC LIMIT 1  [["id", 4]]
  Spree::PropertyGroup Load (0.3ms)  SELECT "spree_property_groups".* FROM "spree_property_groups" WHERE "spree_property_groups"."id" = $1 ORDER BY "spree_property_groups"."id" ASC LIMIT 1  [["id", 2]]
  Spree::Property Load (0.3ms)  SELECT "spree_properties".* FROM "spree_properties" WHERE "spree_properties"."id" = $1 ORDER BY "spree_properties"."id" ASC LIMIT 1  [["id", 2]]
  CACHE (0.0ms)  SELECT "spree_property_groups".* FROM "spree_property_groups" WHERE "spree_property_groups"."id" = $1 ORDER BY "spree_property_groups"."id" ASC LIMIT 1  [["id", 1]]
Deface: 2 overrides found for 'spree/products/show'
Completed 500 Internal Server Error in 54ms

Encoding::UndefinedConversionError ("\xD7" from ASCII-8BIT to UTF-8):
  haml (4.0.4) lib/haml/compiler.rb:42:in `encode'
  haml (4.0.4) lib/haml/compiler.rb:42:in `precompiled'
  haml (4.0.4) lib/haml/compiler.rb:47:in `precompiled_with_return_value'
  haml (4.0.4) lib/haml/engine.rb:129:in `render'
  deface (1.0.0) lib/deface/haml_converter.rb:102:in `result'
  deface (1.0.0) lib/deface/applicator.rb:17:in `apply'
  deface (1.0.0) lib/deface/action_view_extensions.rb:9:in `initialize'
  actionpack (4.0.2) lib/action_view/template/resolver.rb:195:in `new'
  actionpack (4.0.2) lib/action_view/template/resolver.rb:195:in `block in query'
  actionpack (4.0.2) lib/action_view/template/resolver.rb:191:in `map'
  actionpack (4.0.2) lib/action_view/template/resolver.rb:191:in `query'
  actionpack (4.0.2) lib/action_view/template/resolver.rb:177:in `find_templates'
  actionpack (4.0.2) lib/action_view/template/resolver.rb:115:in `block in find_all'
  actionpack (4.0.2) lib/action_view/template/resolver.rb:145:in `block in cached'
  actionpack (4.0.2) lib/action_view/template/resolver.rb:62:in `cache'
  actionpack (4.0.2) lib/action_view/template/resolver.rb:144:in `cached'
  actionpack (4.0.2) lib/action_view/template/resolver.rb:114:in `find_all'
  actionpack (4.0.2) lib/action_view/path_set.rb:53:in `block (2 levels) in find_all'
  actionpack (4.0.2) lib/action_view/path_set.rb:52:in `each'
  actionpack (4.0.2) lib/action_view/path_set.rb:52:in `block in find_all'
  actionpack (4.0.2) lib/action_view/path_set.rb:51:in `each'
  actionpack (4.0.2) lib/action_view/path_set.rb:51:in `find_all'
  actionpack (4.0.2) lib/action_view/path_set.rb:46:in `find'
  actionpack (4.0.2) lib/action_view/lookup_context.rb:122:in `find'
  actionpack (4.0.2) lib/action_view/renderer/abstract_renderer.rb:18:in `find_template'
  actionpack (4.0.2) lib/action_view/renderer/template_renderer.rb:35:in `determine_template'
  actionpack (4.0.2) lib/action_view/renderer/template_renderer.rb:8:in `render'
  actionpack (4.0.2) lib/action_view/renderer/renderer.rb:42:in `render_template'
  actionpack (4.0.2) lib/action_view/renderer/renderer.rb:23:in `render'
  actionpack (4.0.2) lib/abstract_controller/rendering.rb:127:in `_render_template'
  actionpack (4.0.2) lib/action_controller/metal/streaming.rb:219:in `_render_template'
  actionpack (4.0.2) lib/abstract_controller/rendering.rb:120:in `render_to_body'
  actionpack (4.0.2) lib/action_controller/metal/rendering.rb:33:in `render_to_body'
  actionpack (4.0.2) lib/action_controller/metal/renderers.rb:26:in `render_to_body'
  actionpack (4.0.2) lib/abstract_controller/rendering.rb:97:in `render'
  actionpack (4.0.2) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render'
  activesupport (4.0.2) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
  /home/yaron/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
  activesupport (4.0.2) lib/active_support/core_ext/benchmark.rb:12:in `ms'
  actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:41:in `block in render'
  actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
  activerecord (4.0.2) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
  actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:40:in `render'
  remotipart (1.2.1) lib/remotipart/render_overrides.rb:14:in `render_with_remotipart'
  actionpack (4.0.2) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
  actionpack (4.0.2) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
  actionpack (4.0.2) lib/abstract_controller/base.rb:189:in `process_action'
  actionpack (4.0.2) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (4.0.2) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (4.0.2) lib/active_support/callbacks.rb:483:in `_run__593263328__process_action__callbacks'
  activesupport (4.0.2) lib/active_support/callbacks.rb:80:in `run_callbacks'
  actionpack (4.0.2) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (4.0.2) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
  activesupport (4.0.2) lib/active_support/notifications.rb:159:in `block in instrument'
  activesupport (4.0.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.0.2) lib/active_support/notifications.rb:159:in `instrument'
  actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  actionpack (4.0.2) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
  activerecord (4.0.2) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (4.0.2) lib/abstract_controller/base.rb:136:in `process'
  actionpack (4.0.2) lib/abstract_controller/rendering.rb:44:in `process'
  actionpack (4.0.2) lib/action_controller/metal.rb:195:in `dispatch'
  actionpack (4.0.2) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
  actionpack (4.0.2) lib/action_controller/metal.rb:231:in `block in action'
  actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:80:in `call'
  actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
  actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:48:in `call'
  actionpack (4.0.2) lib/action_dispatch/journey/router.rb:71:in `block in call'
  actionpack (4.0.2) lib/action_dispatch/journey/router.rb:59:in `each'
  actionpack (4.0.2) lib/action_dispatch/journey/router.rb:59:in `call'
  actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:680:in `call'
  railties (4.0.2) lib/rails/engine.rb:511:in `call'
  railties (4.0.2) lib/rails/railtie/configurable.rb:30:in `method_missing'
  actionpack (4.0.2) lib/action_dispatch/journey/router.rb:71:in `block in call'
  actionpack (4.0.2) lib/action_dispatch/journey/router.rb:59:in `each'
  actionpack (4.0.2) lib/action_dispatch/journey/router.rb:59:in `call'
  actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:680:in `call'
  xray-rails (0.1.9) lib/xray/middleware.rb:37:in `call'
  rack-pjax (0.7.0) lib/rack/pjax.rb:12:in `call'
  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.3) lib/warden/manager.rb:34:in `catch'
  warden (1.2.3) lib/warden/manager.rb:34:in `call'
  rack (1.5.2) lib/rack/etag.rb:23:in `call'
  rack (1.5.2) lib/rack/conditionalget.rb:25:in `call'
  rack (1.5.2) lib/rack/head.rb:11:in `call'
  remotipart (1.2.1) lib/remotipart/middleware.rb:27:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/flash.rb:241:in `call'
  rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
  rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/cookies.rb:486:in `call'
  activerecord (4.0.2) lib/active_record/query_cache.rb:36:in `call'
  activerecord (4.0.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  activesupport (4.0.2) lib/active_support/callbacks.rb:373:in `_run__983020954__call__callbacks'
  activesupport (4.0.2) lib/active_support/callbacks.rb:80:in `run_callbacks'
  actionpack (4.0.2) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/reloader.rb:64:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.0.2) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.0.2) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in `block in tagged'
  activesupport (4.0.2) lib/active_support/tagged_logging.rb:25:in `tagged'
  activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in `tagged'
  railties (4.0.2) lib/rails/rack/logger.rb:20:in `call'
  quiet_assets (1.0.2) lib/quiet_assets.rb:18:in `call_with_quiet_assets'
  actionpack (4.0.2) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
  rack (1.5.2) lib/rack/runtime.rb:17:in `call'
  activesupport (4.0.2) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/static.rb:64:in `call'
  rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
  railties (4.0.2) lib/rails/engine.rb:511:in `call'
  railties (4.0.2) lib/rails/application.rb:97:in `call'
  rack (1.5.2) lib/rack/content_length.rb:14:in `call'
  thin (1.6.1) lib/thin/connection.rb:82:in `block in pre_process'
  thin (1.6.1) lib/thin/connection.rb:80:in `catch'
  thin (1.6.1) lib/thin/connection.rb:80:in `pre_process'
  thin (1.6.1) lib/thin/connection.rb:55:in `process'
  thin (1.6.1) lib/thin/connection.rb:41:in `receive_data'
  eventmachine (1.0.3) lib/eventmachine.rb:187:in `run_machine'
  eventmachine (1.0.3) lib/eventmachine.rb:187:in `run'
  thin (1.6.1) lib/thin/backends/base.rb:73:in `start'
  thin (1.6.1) lib/thin/server.rb:162:in `start'
  rack (1.5.2) lib/rack/handler/thin.rb:16:in `run'
  rack (1.5.2) lib/rack/server.rb:264:in `start'
  railties (4.0.2) lib/rails/commands/server.rb:84:in `start'
  railties (4.0.2) lib/rails/commands.rb:76:in `block in <top (required)>'
  railties (4.0.2) lib/rails/commands.rb:71:in `tap'
  railties (4.0.2) lib/rails/commands.rb:71:in `<top (required)>'
  bin/rails:4:in `require'
  bin/rails:4:in `<main>'

and the gemfile :

source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '~> 4.0.0'

gem 'thin'
gem 'pg'
gem 'rails_12factor', group: :production
gem 'jquery-rails'
gem "seedbank", github: 'james2m/seedbank'
gem 'annotate'
gem 'haml-rails'
gem 'wasabi', :github => "gaaady/wasabi"
gem 'nori', :github => "gaaady/nori"
gem 'savon', :github => "gaaady/savon", :branch => 'version2'
gem 'spree', :github => 'spree/spree', branch: '2-1-stable'
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', branch: '2-1-stable'
gem 'spree_related_products', :git => 'git://github.com/spree/spree_related_products.git', branch: '2-1-stable'
gem 'spree_banner', github: "justame/spree_banner"
gem 'spree_product_assembly', :git => 'git://github.com/spree/spree-product-assembly.git', branch: '2-1-stable'
gem 'sass-rails',   '~> 4.0.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'bootstrap-sass-rails-rtl'
gem 'compass-rails', "~> 2.0.alpha.0"
gem 'lodash-rails'
gem 'uglifier', '>= 1.0.3'
gem 'jquery-validation-rails'


gem 'rails_admin'
gem 'bootstrap-wysihtml5-rails'
gem 'redcarpet', '2.3.0'
gem 'fancybox2-rails', '~> 0.2.4'
gem 'gon'

group :development do
   gem 'jshint_on_rails'
   # gem 'jazz_hands'
   gem 'pry'
   gem 'pry-rails'
   gem 'pry-nav'
  gem "better_errors"
  gem "binding_of_caller"
  gem 'xray-rails'
  gem "quiet_assets", ">= 1.0.1"
  gem "letter_opener"
  # gem 'pry-doc'
  # gem 'pry-stack_explorer'
  # gem 'pry-exception_explorer'
end

group :production do
  gem 'rails_12factor'
end

i'm using Haml in the project overriding the frontpage files.
i found that after removing the deface files from the gem the problem solved.
the 2 deface files location is in "app/overrides/spree/products/show"

is there another way to fix that issue?

uninitialized constant Spree::Wombat::ShipmentSerializer

Hi. I'm trying to incorporate this extension into fresh Spree 2.4.5 store. It seems to be working fine on my development machine using the master branch.

However, during the build on the staging server I get this error:

/home/slimonline/.rvm/gems/ruby-2.0.0-p0@slimonline/bundler/gems/spree-product-assembly-6debe07896d1/app/serializers/spree/wombat/assembly_shipment_serializer.rb:3:in `<module:Wombat>': uninitialized constant Spree::Wombat::ShipmentSerializer (NameError)
    from /home/slimonline/.rvm/gems/ruby-2.0.0-p0@slimonline/bundler/gems/spree-product-assembly-6debe07896d1/app/serializers/spree/wombat/assembly_shipment_serializer.rb:2:in `<module:Spree>'
    from /home/slimonline/.rvm/gems/ruby-2.0.0-p0@slimonline/bundler/gems/spree-product-assembly-6debe07896d1/app/serializers/spree/wombat/assembly_shipment_serializer.rb:1:in `<top (required)>'

There's a notice in the documentation about using this with Wombat, but I'm not using it (at least I think I don't). Do I need to add wombat to my gemfile? If so, why is this working in dev?

Installation problem

when I ran the following command, it said the table is already there. How can I solve the problem? I have attached the error message of SQLite3 and the gemfile


bundle exec rails g spree_product_assembly:install


...
== AddManyToManyRelationToProducts: migrating ================================
-- create_table(:assemblies_parts, {:id=>false})
rake aborted!
An error has occurred, this and all later migrations canceled:

SQLite3::SQLException: table "assemblies_parts" already exists: CREATE TABLE "assemblies_parts" ("assembly_id" integer NOT NULL, "part_id" integer NOT NULL, "count" integer DEFAULT '1' NOT NULL)
...


source 'http://rubygems.org'

gem 'rails', '3.1.11'
gem 'sqlite3'
gem 'jquery-rails'

group :assets do
gem 'sass-rails', '> 3.1.5'
gem 'coffee-rails', '
> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end

group :test do
gem 'turn', '~> 0.8.3', :require => false
end

gem "spree_product_assembly", :git => "git://github.com/spree/spree-product-assembly.git"

gem 'spree'

Taxons being Queried on /cart

Seeing a query to find the taxon for each item in a bundle on /cart. This should be eager loaded or eliminated, as it's running slow in at least some cases.

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.