How to access an engine's method from main application?

Hi,

I’m not sure if this is the right place to post this, but please
redirect
me if I’m posting this in the wrong place.

I’m trying to use a method defined in an engine’s library, specifically
it
is the current_order method from the Spree::Core
engine:
https://github.com/spree/spree/blob/master/core/lib/spree/core/current_order.rb

In my view, I’ve tried

Spree::Core::CurrentOrder.
current_order

Using just “current_order” in development works fine though, but not
in production.

So then I’ve tried to require it in my views file like this:

require ‘spree/core/current_order’

I’ve also tried permutations of these other solutions:

But I’ve lost track of what I actually did.

Can someone please point me in the right direction? Maybe I
implemented the solutions in the above links incorrectly?

This is the error I’m getting in production:

2012-06-21T09:59:08+00:00 app[web.1]: ActionView::Template::Error
(undefined method `current_order’ for
Spree::Core::CurrentOrder:Module):

If I comment out the lines of code with current_order, everything
works in production.

I’m thinking it’s the way things are loaded in production? But this is
the first time I’m trying to deploy so I don’t quite understand the
differences between development and production. I’m not sure if it
matters, but I’m deploying on Heroku.

Thanks in advance!