Bug 1025713 - Unable to run bundle install on a ruby-1.8 app
Unable to run bundle install on a ruby-1.8 app
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Michal Fojtik
libra bugs
: UpcomingRelease
: 1029306 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-01 07:09 EDT by Chris Ryan
Modified: 2015-05-14 19:32 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-23 22:28:29 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Ryan 2013-11-01 07:09:59 EDT
Description of problem:
When running "bundle install" against a Gemfile on ruby-1.8, the application will hang indefinitely. Bundle install performs correctly in ruby-1.9, however.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Create a ruby-1.8 app
rhc create-app rubytest ruby-1.8
2. SSH into the app, create a simple Gemfile, and export the gem home directory.
rhc ssh rubytest
cd $OPENSHIFT_REPO_DIR
create a Gemfile with the following lines:
source 'https://rubygems.org'
gem 'rack'
export GEM_HOME=~/.gem
3.run 'bundle install' in the $OPENSHIFT_REPO_DIR

Actual results:
bundle install will hang indefinitely (or timeout, if using the client)

Expected results:
bundle install executes correctly

Additional info:
Comment 2 Michal Fojtik 2013-11-01 07:42:03 EDT
I was able to fix this bug by updating the 'bundler' gem:

[ruby01-mfojtik.dev.rhcloud.com repo]\> gem update bundler
Updating installed gems
Updating bundler
Successfully installed bundler-1.3.5
Gems updated: bundler

Then:

[ruby01-mfojtik.dev.rhcloud.com repo]\> bundle 
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using rack (1.5.2) 
Using bundler (1.3.5) 
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

I would suggest to update the rubygem-bundler to 1.3.5, currently we have 1.0.21.
Comment 4 Michal Fojtik 2013-11-01 08:36:17 EDT
I can reproduce this bug also in PROD:

[ruby-mfojtik.rhcloud.com repo]\> bundle
Fetching source index for https://rubygems.org/
[get stuck here...]
Comment 6 Michal Fojtik 2013-11-06 18:20:17 EST
Just FYI, I set this bug to high priority, because all ruby-1.8 cartridges in PROD  are currently affected by this and thus they are not usable.
Comment 7 Troy Dawson 2013-11-06 18:22:54 EST
I'll get our rubygem-bundler updated.
Comment 8 Troy Dawson 2013-11-07 16:26:36 EST
rubygem-bundler has been updated to version 1.3.5 and is able to be tested on devenv machines.
Please test to make sure this fixes the problem.
Comment 9 Chris Ryan 2013-11-08 10:03:14 EST
I'm working with ami-id devenv_4008 (ami-73dc871a). After creating a ruby-1.8 app, and SSH'ing to the gear, I am still unable to perform any command using bundle. Any command (bundle install, bundle --version, bundle --install, etc.) returns: 

/usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/cli.rb:20: undefined method `stop_on_unknown_option!' for Bundler::CLI:Class (NoMethodError)
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
	from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/bin/bundle:18
	from /usr/bin/bundle:19:in `load'
	from /usr/bin/bundle:19
Comment 10 Michal Fojtik 2013-11-08 10:19:24 EST
Chris:

I can reproduce this as well:

[ruby03-mfojtik.dev.rhcloud.com 527cfa7af3f3dd8e160001c9]\> bundle
/usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/cli.rb:20: undefined method `stop_on_unknown_option!' for Bundler::CLI:Class (NoMethodError)
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
	from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/bin/bundle:18
	from /usr/bin/bundle:19:in `load'
	from /usr/bin/bundle:19

Note, that this happens ONLY when I use the RHEL rubygem-bundler. If I do 'gem update bundler' or 'gem reinstall bundler' manually I can't hit this issues.
Comment 11 Michal Fojtik 2013-11-08 10:25:30 EST
Problem identified: It is the old version of 'rubygem-thor'. When I run 'gem update thor' in a gear, I get rid of this error.
Comment 12 Troy Dawson 2013-11-08 11:23:54 EST
I have created an updated rubygem-thor.
https://brewweb.devel.redhat.com/buildinfo?buildID=309440
I have verified that it fixes this problem.  I am running this package through our general tests to make sure it doesn't break anything.  If it doesn't I'll get it into the candidate repo so regular devenv's can use it.
Comment 13 Troy Dawson 2013-11-08 14:56:14 EST
rubygem-thor-0.18.1-1.el6oso has passed out tests and is in the candidate repo.  It is now able to be tested on the devenv's.
Comment 14 Peter Ruan 2013-11-08 20:13:20 EST
still seeing problems with devenv_4009

[17:05:46] INFO> GET https://ec2-54-234-81-69.compute-1.amazonaws.com/broker/rest/application/527d8a447708038c8a000006/gear_groups {} [200]
      [17:05:47] INFO> Remote cmd: `cd $OPENSHIFT_REPO_DIR; echo "source \"http://rubygems.org\"" >> ./Gemfile; echo "gem \"rack\"" >> ./Gemfile; export GEM_HOME=~/.gem/; bundle install` @ssh://527d8a447708038c8a000006@ktvcm0sl-vdzbgv.dev.rhcloud.com
      /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/cli.rb:20: undefined method `stop_on_unknown_option!' for Bundler::CLI:Class (NoMethodError)
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/bin/bundle:18
        from /usr/bin/bundle:19:in `load'
        from /usr/bin/bundle:19
      [17:05:48] INFO> Exit Status: 1
Comment 15 Chris Ryan 2013-11-11 11:41:38 EST
Tried again today with the newest devenv ( devenv_4017 (ami-61dd8708) ) after following the steps in Comment #1, and running bundle install, the error was:

bundle install
Could not load OpenSSL.
You must recompile Ruby with OpenSSL support or change the sources in your Gemfile from 'https' to 'http'.
Instructions for compiling with OpenSSL using RVM are available at rvm.io/packages/openssl.
Comment 16 Chris Ryan 2013-11-11 11:46:16 EST
As a follow up, the bundle install command works if the Gemfile has an http url (http://rubygems.org/), as the error message helpfully points out.
Comment 17 Chris Ryan 2013-11-11 11:48:19 EST
The bundle install will hang indefinitely (or timeout, if using the client) as before.
Comment 18 Michal Fojtik 2013-11-11 14:50:39 EST
Chris: Thanks for testing this. The rubygem-bundler is not compiled with:

BuildRequires: openssl-devel
Comment 19 Michal Fojtik 2013-11-12 06:16:47 EST
So the issue turns out into missing Requires: rubygem-net-http-persistent. The problem should be fixed now on latest devenv.
Comment 20 Michal Fojtik 2013-11-12 06:21:13 EST
*** Bug 1029306 has been marked as a duplicate of this bug. ***
Comment 21 Zhe Wang 2013-11-12 20:57:37 EST
Verified this bug in devenv_4025

remote: Fetching gem metadata from https://rubygems.org/..........
remote: Installing rack (1.5.2) 
remote: Installing ref (1.0.5) 
remote: Installing thread-dump (0.0.5) 
remote: Using bundler (1.3.5) 
remote: Your bundle is complete!

Note You need to log in before you can comment on or make changes to this bug.