Bug 1029404 - Fail to install gems for ruby-1.8 apps due to "remote: Too many redirects " error during deployments
Summary: Fail to install gems for ruby-1.8 apps due to "remote: Too many redirects " e...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Michal Fojtik
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-12 11:00 UTC by Zhe Wang
Modified: 2015-05-14 23:32 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-24 03:29:45 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1025713 0 high CLOSED Unable to run bundle install on a ruby-1.8 app 2021-02-22 00:41:40 UTC

Internal Links: 1025713

Description Zhe Wang 2013-11-12 11:00:23 UTC
Description of problem:
Given a ruby-1.8 app, when trying to install some gem, it almost always fails because of the error: 

remote: Fetching source index from http://rubygems.org/
remote: Too many redirects 

On the other hand, there is no such problem for ruby-1.9 apps.

I reserved my ruby-1.8 app in INT (rb8-zwint.int.rhcloud.com) for your debugging.

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

How reproducible:
almost always(>90%)

Steps to Reproduce:
1. create a ruby-1.8
2. try to install a ref gem with the following Gemfile and Gemfile.lock
<----Gemfile---->

source 'http://rubygems.org'

gem 'ref'
gem 'rack'
gem 'thread-dump'

<--------------->

<----Gemfile.lock---->

GEM
  remote: http://rubygems.org/
  specs:
    rack (1.5.2)
    ref (1.0.5)
    thread-dump (0.0.5)

PLATFORMS
  ruby

DEPENDENCIES
  rack
  ref
  thread-dump


<-------------------->

3. push the files and trigger a build


Actual results:
The build fails with the error:

remote: Fetching source index from http://rubygems.org/
remote: Too many redirects
remote: An error occurred executing 'gear postreceive' (exit code: 17)
remote: Error message: Failed to execute: 'control build' for /var/lib/openshift/5281fe6f03ef6422b60001c5/ruby
remote: 
remote: For more details about the problem, try running the command again with the '--trace' option.
To ssh://5281fe6f03ef6422b60001c5.rhcloud.com/~/git/rb8.git/
   610d16a..2e72643  master -> master

And this is the msg in the error log (ruby/logs/error_log*):

/usr/lib/ruby/gems/1.8/gems/passenger-3.0.21/helper-scripts/prespawn:105:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.21/helper-scripts/prespawn:105:in `new'
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.21/helper-scripts/prespawn:105:in `connect'
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.21/helper-scripts/prespawn:86:in `socket'
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.21/helper-scripts/prespawn:90:in `head_request'
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.21/helper-scripts/prespawn:145


Expected results:
Installing gems for ruby-1.8 apps should succeed.

Additional info:

Comment 1 Michal Fojtik 2013-11-12 11:18:37 UTC
Zhe Wang: The source should be 'https://rubygems.org' as that is now preffered in bundler world.

Also there was a bug in rubygem-bundler that was fixed recently:

https://bugzilla.redhat.com/show_bug.cgi?id=1025713

Can you please try to reproduce this bug on latest devenv?

Comment 2 Zhe Wang 2013-11-13 01:49:27 UTC
Verified this bug in devenv_4025

After changing the source to https://rubygems.org , the installation succeeded.

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.