简体   繁体   中英

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

I've been using on my server Redmine 1.1.x for some time and I'm trying to upgrade it to 2.2.2. I followed the upgrade sequence and now the application is not working anymore :

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

However:

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/

As you can see, builder v3.0.0 is installed. What gives?

What I did try:

  • remove Gemfile.lock and run bundle install again
  • what Paulo Fidalgo advised (see below)

Based on Paulo Fidalgo advice:

My Gemfile contains 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$

You need to add builder to your Gemfile and then run:

bundle update

I had several issues (for example some gems compiled with a different ruby version than the runtime), but the main one was that my web host requires me to install gems into ~/gems and hence to export GEMS_PATH = ~/gems/ !

That, in my public/.htaccess , fixed the main issue:

SetEnv GEM_PATH /home/bicou/gems/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM