I have a related but separate question. Again, please redirect me if I'm
in the wrong place.

I've been getting this error in production (on Heroku) only (it happens
when the application is loading):

2012-06-21T09:30:19+00:00 app[web.1]: /app/app/controllers/spree/
checkout_controller_decorator.rb:3:in `block in ': uninitialized constant
Spree::Calculator::CouldNotCalculateShipping (NameError)

Here's the gist of my decorator files: https://gist.github.com/2965034

I'm trying to rescue errors from my Spree calculators. I'm thinking it's an
issue with the load order, but am not familiar enough to know where to
tweak things.

I've tried:

require 'spree/calculator_decorator'

in the checkout_controller_decorator.rb.

and adding:

Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do
Rails.configuration.cache_classes ? require(c) : load(c)

per http://guides.spreecommerce.com/logic_customization.html

I'm thinking this isn't a Spree issue, but an engines issue that I'm
getting stuck on. It's probably not even an issue, but just me not knowing
how everything is tied together in Rails and engines.

Any help will be greatly appreciated. Even just to give me something else
to try or look.

Thanks for reading!

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/Bw4Sc6IhURcJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
postedJun 24, '12 at 9:02p
activeJun 24, '12 at 9:02p

1 user in discussion

A L: 1 post



site design / logo © 2021 Grokbase