2011-07-14 55 views
-1
=> Booting Mongrel 
=> Rails 2.3.5 application starting on http://0.0.0.0:3000 
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement 
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1959:in `method_missing': undefined method `class_attribute' for ActiveRecord::Base:Class (NoMethodError) 
    from /usr/lib/ruby/gems/1.8/gems/paperclip-2.3.14/lib/paperclip.rb:182:in `included' 
    from /home/prabhu/Desktop/test/vendor/plugins/thoughtbot-paperclip-13d51e3/lib/paperclip/railtie.rb:20:in `include' 
    from /home/prabhu/Desktop/test/vendor/plugins/thoughtbot-paperclip-13d51e3/lib/paperclip/railtie.rb:20:in `send' 
    from /home/prabhu/Desktop/test/vendor/plugins/thoughtbot-paperclip-13d51e3/lib/paperclip/railtie.rb:20:in `insert' 
    from /usr/lib/ruby/gems/1.8/gems/paperclip-2.3.14/rails/init.rb:2:in `evaluate_init_rb' 
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:158:in `evaluate_init_rb' 
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' 
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:154:in `evaluate_init_rb' 
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:48:in `load' 
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:38:in `load_plugins' 
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in `each' 
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in `load_plugins' 
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:369:in `load_plugins' 
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:165:in `process' 
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send' 
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run' 
    from /home/prabhu/Desktop/test/config/environment.rb:9 
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' 
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in' 
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' 
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84 
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
    from script/server:3 
+0

你希望我們能夠真正閱讀嗎?請重新格式化爲清晰的內容。編輯有很多工具可以幫助你解決這個問題。 –

回答

1

你還沒有問一個問題,但我想你有一些問題, 'class_attribute' 是不確定的。

我不確定(懶得檢查;-),但可能'class_attribute'已被添加到Rails 3中。您有Rails 2和一個回形針gem。

你可以嘗試使用這種寶石的舊版本 - 只是檢查哪一個是使用Rails兼容2.

UPDATE:

正如你可以在評論閱讀,大衛發現你的一個版本有這個方法定義的Rails。所以,你有兩個選擇:升級Rails至少2.3.9,或降級回形針。

+1

你是對的:'class_attribute'最初被添加到Rails 3.但是,它被移植到了Rails 2.3.9,因此可能是OP的一個選項。 –

+0

那個問題現在解決了我在獲取嘗試上傳圖像時出現以下錯誤[回形針]/usr/bin/identify'-format%wx%h:file'2>/dev/null [paperclip]處理時收到錯誤:# [回形針]/usr/bin/identify'-format%wx%h:file '2>/dev/null [回形針]處理過程中收到錯誤:#