Bug #2972

Incompatibility with jsonp and bundler_ext support

Added by Steven Bambling over 4 years ago. Updated over 3 years ago.

Assigned To:Dominic Cleal
Target version:Sprint 25
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/foreman-packaging/pull/471
Story points-
Velocity based estimate-
Release1.6.0Release relationshipAuto


I've seen the Foreman Versions 1.2.1.x and 1.2.0.x, when installing via packages from the RPM repository using SCL

When enabling support_jsonp support via the foreman settings.yaml the rails app fails to start with an error complaining about the version of rails not being installed on the system. If set to false the foreman app starts without issue.

[root@puppet foreman]# sudo /etc/init.d/foreman start
Starting foreman: /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/resolver.rb:287:in `resolve': Could not find gem 'rails (= 3.2.13) ruby' in the gems available on this machine. (Bundler::GemNotFound)
from /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/resolver.rb:161:in `start'
from /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/resolver.rb:128:in `block in resolve'
from /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/resolver.rb:127:in `catch'
from /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/resolver.rb:127:in `resolve'
from /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/definition.rb:192:in `resolve'
from /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/definition.rb:127:in `specs'
from /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/definition.rb:172:in `specs_for'
from /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/runtime.rb:11:in `setup'
from /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler.rb:114:in `setup'
from /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler.rb:119:in `require'
from /usr/share/foreman/config/application.rb:34:in `<top (required)>'
from /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in `require'
from /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in `require'
from /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/commands.rb:53:in `block in <top (required)>'
from /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/commands.rb:50:in `tap'
from /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/commands.rb:50:in `<top (required)>'
from /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:60:in `require'
from /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:60:in `rescue in require'
from /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:35:in `require'
from /usr/share/foreman/script/rails:6:in `<main>'

Associated revisions

Revision 3fba9776
Added by Dominic Cleal almost 4 years ago

fixes #2972 - load jsonp on bundler_ext installations

Revision 2494f5fd
Added by Dominic Cleal over 3 years ago

refs #2972 - add rack-jsonp

Revision b273713e
Added by Dominic Cleal over 3 years ago

refs #2972 - foreman requires jsonp, ship bundler.d/jsonp.rb

Since ~foreman was included recursively, swapped to a more explicitly layout
to name the sub-dirs that are required in the RPM. This then allows us to
pull in the empty bundler.d dir and specific files below it, instead of
excluding files that are in other sub-packages.

Revision fb803178
Added by Lukas Zapletal over 3 years ago

Merge pull request #471 from domcleal/rpm/develop-2972-jsonp

refs #2972 - change bundler.d/ structure and jsonp support


#1 Updated by Lukas Zapletal over 4 years ago


in your bit I do see that you are using bundler and not bundler_ext. I do not understand what is wrong in this case. If you switch an RPM SCL installation to bundler, then just do bundle update/install as you wish but note we do not recommend that and the moment you swtitch to bundler you are not receiving our updates via RPMs anymore.

If you want to switch to JSONP and keep RPM SCL, I guess you need to install package named ruby193-rubygem-jsonp and then enable support there. If this does not work or the package does not exist that is another story and we need to fix that.

So what commands have you issued to get into this state?

#2 Updated by Dominic Cleal over 4 years ago

Lukas, Steve's indeed using bundler_ext, but I think enabling :support_jsonp: true in settings.yaml is causing config/application.rb to then call Bundler.require which causes Bundler to launch and causes this issue.

#3 Updated by Lukas Zapletal over 4 years ago

  • Category changed from Rails to Packaging
  • Priority changed from Normal to Low


#4 Updated by Dominic Cleal almost 4 years ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Dominic Cleal
  • Target version set to Sprint 24
  • Release set to 1.6.0

#5 Updated by Dmitri Dolguikh almost 4 years ago

  • Target version changed from Sprint 24 to Sprint 25

#6 Updated by Dominic Cleal almost 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#7 Updated by The Foreman Bot over 3 years ago

  • Pull request https://github.com/theforeman/foreman-packaging/pull/471 added

Also available in: Atom PDF