0

我有一个在 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>'

我该如何解决这个错误。

4

1 回答 1

0

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

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

也许您应该尝试使用这两个之一,因为 ImageScience 已经有一段时间没有更新了。

希望这可以帮助。

于 2013-04-02T14:56:58.210 回答