2011-05-04 53 views
0

我迁移一个Rails 2.1.2应用到Rails 2.3.11未定义的方法“内联”为ImageScience:类(NoMethodError)

为了使我的生活更轻松,我用捆绑,但开始时,我得到了下面的错误我服务器:

/Library/Ruby/Gems/1.8/gems/image_science-1.2.1/lib/image_science.rb:90: undefined method `inline' for ImageScience:Class (NoMethodError) 
     from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require' 
     from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require' 
     from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `each' 
     from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `require' 
     from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `each' 
     from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `require' 
     from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:112:in `require' 
     from ./script/../config/boot.rb:113:in `load_gems' 
     from /Library/Ruby/Gems/1.8/gems/rails-2.3.11/lib/initializer.rb:164:in `process' 
     from /Library/Ruby/Gems/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in `send' 
     from /Library/Ruby/Gems/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in `run' 
     from /Users/michaelkoper/code/beruby_git/config/environment.rb:18 
     from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in `require' 
     from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in `require' 
     from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:547:in `new_constants_in' 
     from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in `require' 
     from /Library/Ruby/Gems/1.8/gems/rails-2.3.11/lib/commands/server.rb:84 
     from script/server:3:in `require' 
     from script/server:3 

这有点奇怪,因为我得到它没有捆绑器工作。我想我错过了一个宝石依赖。

的Gemfile:

gem 'mperham-deadlock_retry', :require => 'deadlock_retry' 
    gem 'hoptoad_notifier', '2.4.2' 
    gem 'will_paginate', '~> 2.3.15' 
    gem "activemerchant", :require => "active_merchant" 
    gem "newrelic_rpm" 
    gem 'calendar_date_select' 
    gem 'ckeditor', '3.4.3'  gem 'automatic_foreign_key' 
    gem 'chronic' 
    gem 'mechanize' 
    gem 'rexml-expansion-fix' 
    gem 'image_science', '1.2.1' 
    gem 'inline', '0.1.0' 

捆绑安装:

Using rake (0.8.7) 
    Using activesupport (2.3.11) 
    Using rack (1.1.2) 
    Using actionpack (2.3.11) 
    Using actionmailer (2.3.11) 
    Using builder (3.0.0) 
    Using braintree (2.10.0) 
    Using activemerchant (1.14.0) 
    Using activerecord (2.3.11) 
    Using activeresource (2.3.11) 
    Using redhillonrails_core (1.1.3) 
    Using automatic_foreign_key (1.2.0) 
    Using calendar_date_select (1.16.2) 
    Using cgi_multipart_eof_fix (2.5.0) 
    Using hoe (2.8.0) 
    Using chronic (0.2.3) 
    Using mime-types (1.16) 
    Using ckeditor (3.4.3) 
    Using columnize (0.3.2) 
    Using daemons (1.0.10) 
    Using fastthread (1.0.7) 
    Using gem_plugin (0.2.3) 
    Using highline (1.6.1) 
    Using hoptoad_notifier (2.4.2) 
    Using image_science (1.2.1) 
    Using inline (0.1.0) 
    Using linecache (0.43) 
    Using nokogiri (1.4.4) 
    Using mechanize (0.9.3) 
    Using mongrel (1.1.5) 
    Using mperham-deadlock_retry (1.0.0) 
    Using mysql (2.8.1) 
    Using newrelic_rpm (2.14.1) 
    Using rails (2.3.11) 
    Using rexml-expansion-fix (1.0.1) 
    Using ruby-debug-base (0.10.4) 
    Using ruby-debug (0.10.4) 
    Using will_paginate (2.3.15) 
    Using bundler (1.0.7) 
+0

是ImageScience自己的模型,或者是否是它依赖另一个图书馆/创业板等? – 2011-05-04 11:06:26

+0

@Tyran East,ImageScience不是我创建的模型 – 2011-05-04 11:11:39

+0

好吧,我解决了它。我从宝石规范内联删除并将图像科学更改为版本1.1.3。这不是解决方案,所以我保持这个问题的活力。我真的想要使用最新版本...... – 2011-05-04 11:34:53

回答

0

事实上,它看起来像你可能希望这样的回答:ImageScience breaks on update to Rails 3

+0

image_science确实具有RubyInline和hoe(1.2.1)作为依赖关系。但我不认为这种破解会修复它...我不想要求image_science无处不在,因为我使用它很多...我会试试看吧 – 2011-05-04 11:15:31

+0

是否有可能你只需要把“inline “在Gemfile中的”image_science“行之前的行?我实际上并不知道Gemfile排序是否重要,但它可能值得一试。 – 2011-05-04 17:12:11

相关问题