2010-11-27 8 views
0

このエラーはローカルで、プロダクションではクリーンインストールです。シードデータがロードされました。 Rails 3.0.3、ruby 1.87(開発)、ruby 1.8.7 REE in prod。ひどいエラー - 電卓を登録中にエラーが発生しました。Calculator :: PriceBucket

酒宴宝石 酒宴(0.30.1) spree_api(0.30.1) spree_auth(0.30.1) spree_core(0.30.1) spree_dash(0.30.1) spree_promo(0.30.1) spree_sample (0.30.1)

開発エラー:

=> Booting WEBrick => Rails 3.0.3 application starting in development on http://0.0.0.0:3000 
=> Call with -d to detach => Ctrl-C to shutdown server 
Error registering calculator Calculator::PriceBucket 
[2010-11-27 12:57:49] INFO WEBrick 1.3.1 
[2010-11-27 12:57:49] INFO ruby 1.8.7 (2010-08-16) [i686-darwin10.4.3] 
[2010-11-27 12:57:49] INFO WEBrick::HTTPServer#start: pid=18146 port=3000 

のProdエラー:

Error message: 
superclass mismatch for class PriceBucket 
Exception class: 
TypeError 
Application root: 
/home/deploy/webstores/mystore/current Backtrace: 
また、道の物事がRails3スプリーで計算されていることに留意すべきである

わずかなビットがある:あなたのエラーは異なるその多くはかかわら

ファイルの行場所

0 /home/deploy/.bundler/ruby/1.8/spree-e9c3485bf22e/core/app/models/calculator/price_bucket.rb 1 
+0

これは私が快適だが、spree_coreの宝石が更新されるまで、それが動作するソリューションではありません gitub.com/dblsystems/spree この解決策は快適ではありませんが、今のところうまくいきます。 – BandsOnABudget

+0

Yikes私はRails2 Spreeでこれをやっていましたが、今はそれを避けようとしています。 – Trip

答えて

0

これは私のために働くことになりました異なる。オブジェクトにはobject.lengthを呼び出すのではなく、item_totalの属性が含まれています。私のカスタム電卓で

def self.activate 
    Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c| 
     Rails.env.production? ? require(c) : load(c) 
    end 
    Calculator::PerWeight.register 
    end 

:私の主な拡張宝石で

def self.register 
    super 
    ShippingMethod.register_calculator(self) 
end 
関連する問題