spree-contrib / spree_drop_ship

Spree Drop Shipping Extension
BSD 3-Clause "New" or "Revised" License
104 stars 120 forks source link

Question: getting "Syntax error" messages #51

Closed ostraperlera closed 9 years ago

ostraperlera commented 9 years ago

Hi,

When running rails g spree_drop_ship:install i get the following error:

route/to/rails/app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:241:in `load': vendor/bundle/ruby/1.9.1/bundler/gems/spree_drop_ship-6b91b5563e65/app/models/spree/shipment_decorator.rb:7: syntax error, unexpected tLPAREN_ARG, expecting keyword_do_LAMBDA or tLAMBEG
  scope :by_supplier, -> (supplier_id) { joins(:stock_l...
                          ^
route/to/rails/app/vendor/bundle/ruby/1.9.1/bundler/gems/spree_drop_ship-6b91b5563e65/app/models/spree/shipment_decorator.rb:7: syntax error, unexpected tLAMBEG, expecting keyword_end
...by_supplier, -> (supplier_id) { joins(:stock_location).where...
/route/to/rails/app/vendor/bundle/ruby/1.9.1/bundler/gems/spree_drop_ship-6b91b5563e65/app/models/spree/shipment_decorator.rb:7: syntax error, unexpected '}', expecting keyword_end (SyntaxError)

I've read it could be due to a problem with the versions of Rails (4.1.6) and Ruby (1.9.3) that I'm running, but I can't find the right combination on versions on my own. I've tried both the master and stable branch of spree_drop_ship, as well as several versions of Spree (2.3.4) and Rails, without success.

Any help would be greatly appreciated :)

JDutil commented 9 years ago

Try using Ruby 2.0+ it maybe I'm using syntax not supported by 1.9.3

JDutil commented 9 years ago

Not sure how you even bundled with less than ruby 2.0: https://github.com/JDutil/spree_drop_ship/blob/master/spree_drop_ship.gemspec#L8