0

我遵循以下教程: http ://redminecrm.com/boards/4/topics/448-installing-redmine-2-2-passenger-nginx-rvm-on-ubuntu-12-04

起初,我遇到了 mysql2 的问题,但通过编辑 Gemfile 并运行包更新来修复它。之后,我遇到了一个新问题。下面附上回溯。我希望有人可以帮助我解决这个问题。

我正在使用 Ruby 2.0.0p0、passenger-4.0.0.rc6、nginx 1.2.7。

No such file to load -- iconv (LoadError)
  /var/data/redmine/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:317:in `rescue in depend_on'
  /var/data/redmine/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:312:in `depend_on'
  /var/data/redmine/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
  /var/data/redmine/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
  /var/data/redmine/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:438:in `each'
  /var/data/redmine/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:438:in `block in eager_load!'
  /var/data/redmine/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:436:in `each'
  /var/data/redmine/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:436:in `eager_load!'
  /var/data/redmine/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
  /var/data/redmine/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
  /var/data/redmine/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
  /var/data/redmine/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
  /var/data/redmine/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
  /var/data/redmine/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
  /var/data/redmine/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
  /var/data/redmine/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
  /var/data/redmine/config/environment.rb:14:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /var/data/redmine/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
  /var/data/redmine/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/local/rvm/gems/ruby-2.0.0-p0/gems/passenger-4.0.0.rc6/helper-scripts/rack-preloader.rb:82:in `eval'
  /usr/local/rvm/gems/ruby-2.0.0-p0/gems/passenger-4.0.0.rc6/helper-scripts/rack-preloader.rb:82:in `preload_app'
  /usr/local/rvm/gems/ruby-2.0.0-p0/gems/passenger-4.0.0.rc6/helper-scripts/rack-preloader.rb:127:in `<module:App>'
  /usr/local/rvm/gems/ruby-2.0.0-p0/gems/passenger-4.0.0.rc6/helper-scripts/rack-preloader.rb:6:in `<module:PhusionPassenger>'
  /usr/local/rvm/gems/ruby-2.0.0-p0/gems/passenger-4.0.0.rc6/helper-scripts/rack-preloader.rb:5:in `<main>'
4

2 回答 2

2

阅读日志!

没有要加载的文件 -- iconv (LoadError)

在你的系统上安装 iconv,然后安装 iconv gem

gem install iconv
于 2013-04-25T11:04:57.590 回答
0

在 `require' 中:没有要加载的文件 -- iconv (LoadError)

我已经解决了:

它显示 iconv 不存在,但 iconv 已安装在我的生产环境中。

root@AY130/current# iconv --version

iconv (Ubuntu EGLIBC 2.15-0ubuntu10.4) 2.15

版权所有 (C) 2012 Free Software Foundation, Inc.

这是免费软件;查看复制条件的来源。没有

保修单; 甚至不考虑适销性或特定用途的适用性。

由乌尔里希·德雷珀撰写。

如何解决:

安装

gem "iconv", "~> 1.0.3" #add this in your Gemfile

iconv 已被弃用一段时间。它被(内置)String#encode 替换

见这里:https ://bbs.archlinux.org/viewtopic.php?id=160369

其他:

在 `require' 中:没有要加载的文件 -- iconv (LoadError)

于 2013-10-12T10:03:36.893 回答