0

我已经在我的服务器Redmine 1.1.x 上使用了一段时间,我正在尝试将其升级到 2.2.2。我遵循了升级顺序,现在该应用程序不再工作了:

'block in materialize': Could not find builder-3.0.0 in any of the sources (Bundler::GemNotFound)

然而:

bicou@ssh:~/redmine-2.2.2$ bundle install
Using rake (10.0.3)
Using i18n (0.6.1)
Using multi_json (1.5.0)
Using activesupport (3.2.11)
Using builder (3.0.0)
Using activemodel (3.2.11)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.4)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.2.2)
Using actionpack (3.2.11)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.4.4)
Using actionmailer (3.2.11)
Using arel (3.0.2)
Using tzinfo (0.3.35)
Using activerecord (3.2.11)
Using activeresource (3.2.11)
Using coderay (1.0.8)
Using fastercsv (1.5.5)
Using icalendar (1.2.1)
Using rack-ssl (1.3.2)
Using json (1.7.6)
Using rdoc (3.12)
Using thor (0.16.0)
Using railties (3.2.11)
Using jquery-rails (2.0.3)
Using metaclass (0.0.1)
Using mocha (0.12.3)
Using mysql (2.8.1)
Using net-ldap (0.3.1)
Using pg (0.14.1)
Using ruby-openid (2.1.8)
Using rack-openid (1.3.1)
Using bundler (1.2.3)
Using rails (3.2.11)
Using rmagick (2.13.1)
Using shoulda (2.11.3)
Using sqlite3 (1.3.7)
Using yard (0.8.3)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
bicou@ssh:~/redmine-2.2.2$ bundle show builder
/home/bicou/gems/gems/builder-3.0.0
bicou@ssh:~/redmine-2.2.2$ env | grep gem
GEM_HOME=/home/bicou/gems/
PATH=/home/bicou/gems/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
GEM_PATH=/home/bicou/gems/

如您所见,安装了builder v3.0.0。是什么赋予了?

我所做的尝试:

  • 删除 Gemfile.lock 并bundle install再次运行
  • Paulo Fidalgo 的建议(见下文)

根据 Paulo Fidalgo 的建议:

我的 Gemfile 包含 builder 3.0.0:

bicou@ssh:~/redmine-2.2.2$ grep builder Gemfile
gem "builder", "3.0.0"
bicou@ssh:~/redmine-2.2.2$ bundle update
Fetching gem metadata from http://rubygems.org/.........
Fetching gem metadata from http://rubygems.org/..
Using rake (10.0.3)
Using i18n (0.6.1)
Using multi_json (1.5.0)
Using activesupport (3.2.11)
Using builder (3.0.0)
Using activemodel (3.2.11)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.4)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.2.2)
Using actionpack (3.2.11)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.4.4)
Using actionmailer (3.2.11)
Using arel (3.0.2)
Using tzinfo (0.3.35)
Using activerecord (3.2.11)
Using activeresource (3.2.11)
Using bundler (1.2.3)
Using coderay (1.0.8)
Using fastercsv (1.5.5)
Using icalendar (1.2.1)
Using rack-ssl (1.3.2)
Using json (1.7.6)
Using rdoc (3.12)
Using thor (0.16.0)
Using railties (3.2.11)
Using jquery-rails (2.0.3)
Using metaclass (0.0.1)
Using mocha (0.12.3)
Using mysql (2.8.1)
Using net-ldap (0.3.1)
Using pg (0.14.1)
Using ruby-openid (2.1.8)
Using rack-openid (1.3.1)
Using rails (3.2.11)
Using rmagick (2.13.1)
Using shoulda (2.11.3)
Using sqlite3 (1.3.7)
Using yard (0.8.3)
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem is installed.
bicou@ssh:~/redmine-2.2.2$
4

2 回答 2

3

您需要将构建器添加到您的 Gemfile 中,然后运行:

捆绑更新

于 2013-01-22T10:30:56.253 回答
1

我遇到了几个问题(例如,一些 gems 编译时使用的 ruby​​ 版本与运行时不同),但主要问题是我的网络主机要求我将 gems 安装到~/gems并导出GEMS_PATH = ~/gems/

那,在我的public/.htaccess,解决了主要问题:

SetEnv GEM_PATH /home/bicou/gems/
于 2013-01-25T16:51:04.643 回答