Bug #2972
Incompatibility with jsonp and bundler_ext support
Description
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>'
[FAILED]
Associated revisions
refs #2972 - add rack-jsonp
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.
History
#1
Updated by Lukas Zapletal over 9 years ago
Steven,
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 9 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 9 years ago
- Category changed from Rails to Packaging
- Priority changed from Normal to Low
Reproduced.
#4
Updated by Dominic Cleal almost 9 years ago
- Status changed from New to Ready For Testing
- Assignee set to Dominic Cleal
- Target version set to 1.8.2
- Legacy Backlogs Release (now unused) set to 10
#5
Updated by Anonymous almost 9 years ago
- Target version changed from 1.8.2 to 1.8.1
#6
Updated by Dominic Cleal over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 3fba977636671e3e552bfd4eb1369e4821c3b347.
#7
Updated by The Foreman Bot over 8 years ago
- Pull request https://github.com/theforeman/foreman-packaging/pull/471 added
fixes #2972 - load jsonp on bundler_ext installations