尝试在ubuntu 12.04上的rails项目中使用image_science时出错

时间:2013-04-02 14:20:07

标签: ruby ruby-on-rails-3 image-science

我在ruby 1.9.3p327上运行rvm的rails 3.0.20应用程序。我的Gemfile读取:

gem 'image_science', :git => 'git://github.com/asynchrony/image_science.git'

和Gemfile.lock的版本为:

remote: git://github.com/asynchrony/image_science.git
revision: dc36ddaadc46aecdef907de3c41a9d14d28ba8d8
specs:
  image_science (1.3.2.1.Asynchrony)

我似乎无法在不删除image_science的情况下启动我的应用,因为我一直收到此错误:

/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `block in require': iconv will be deprecated in the future, use String#encode instead.
rake aborted!
/home/umar/gems/ruby/1.9.1/bundler/gems/image_science-dc36ddaadc46/lib/image_science/extension.so: undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE - /home/umar/gems/ruby/1.9.1/bundler/gems/image_science-dc36ddaadc46/lib/image_science/extension.so
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `require'
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `block in require'
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:597:in `new_constants_in'
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:in `load_dependency'
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `require'
/home/umar/gems/ruby/1.9.1/bundler/gems/image_science-dc36ddaadc46/lib/image_science.rb:3:in `<top (required)>'
/home/umar/.rvm/gems/ruby-1.9.3-p327@a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require'
/home/umar/.rvm/gems/ruby-1.9.3-p327@a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/home/umar/.rvm/gems/ruby-1.9.3-p327@a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `each'
/home/umar/.rvm/gems/ruby-1.9.3-p327@a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `block in require'
/home/umar/.rvm/gems/ruby-1.9.3-p327@a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `each'
/home/umar/.rvm/gems/ruby-1.9.3-p327@a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `require'
/home/umar/.rvm/gems/ruby-1.9.3-p327@a_proj/gems/bundler-1.3.4/lib/bundler.rb:132:in `require'
/home/umar/myprojects/a_proj/config/application.rb:9:in `<top (required)>'
/home/umar/myprojects/a_proj/Rakefile:4:in `require'
/home/umar/myprojects/a_proj/Rakefile:4:in `<top (required)>'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:495:in `raw_load_rakefile'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:78:in `block in load_rakefile'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:77:in `load_rakefile'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:61:in `block in run'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/home/umar/gems/ruby/1.9.1/bin/rake:19:in `load'
/home/umar/gems/ruby/1.9.1/bin/rake:19:in `<main>'

如何解决此错误。

1 个答案:

答案 0 :(得分:0)

您可能需要安装所需的库(FreeImage和RubyInline)才能使ImageScience正常工作。 (ImageScience RDoc

顺便说一下,我假设您不使用mini_magick或rmagick,因为您无法访问imagemagick或graphicsmagick安装。

也许你应该尝试使用这两种中的一种,因为ImageScience暂时没有更新。

希望这有帮助。