Bundler installed from RPM, doesn't recognise that bundler is installed

Viewed 27

I know I'm working with old technology here, I'm required to install a rails 3.2 app on ruby 2.2 on Centos 7, on an internal network, where rubygems.org will be inaccessible. That means deploying everything as RPMS.

So I've installed ruby, rubygems, bundler and a few other gems from RPMs (the rest will be installed via bundle install --local). The problem is that when I run the install, I get this error:

$ bundle install --local --path vendor
/usr/share/rubygems/rubygems/dependency.rb:296:in `to_specs': Could not find 'bundler' (>= 0) among 7 total gem(s) (Gem::LoadError)

So bundler is telling me that it can't find bundler among 7 gems, but here's the output of gem list:

$ gem list

*** LOCAL GEMS ***

bigdecimal (1.2.6)
bundler (1.7.8)
io-console (0.4.3)
json (1.8.1)
net-http-persistent (2.9.4)
psych (2.0.8)
rdoc (4.2.0)
thor (0.19.1)

Clearly, one of those 7 gems is bundler, with a version higher than 7.

Bundler is both in the Gemfile

gem 'bundler'

and in Gemfile.lock

DEPENDENCIES
  activerecord-oracle_enhanced-adapter (= 1.4.3.61)
  axlsx (>= 2.1.0.pre)
  builder
  bundler
  chronic (>= 0.9.1)
  client_side_validations (= 3.2.7)
....
rails (3.2.22.5)
  actionmailer (= 3.2.22.5)
  actionpack (= 3.2.22.5)
  activerecord (= 3.2.22.5)
  activeresource (= 3.2.22.5)
  activesupport (= 3.2.22.5)
  bundler (~> 1.0)
  railties (= 3.2.22.5)

Oh, and bundler is here:

$ which bundler
/opt/rh/rh-ruby22/root/usr/bin/bundler

Why isn't the bundler executable recognising either itself or the installed bundler gem (presumably itself) as 'bundler' (>= 0)? Is there any way to get past this (note, without internet access).

0 Answers
Related