Bug 965322 - when creating a ruby-1.8 app, the ruby version created under vendor is showing as 1.9.1 instead of 1.8.7
when creating a ruby-1.8 app, the ruby version created under vendor is showin...
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Jhon Honce
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-05-20 19:18 EDT by Peter Ruan
Modified: 2015-05-14 19:19 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-06-11 00:06:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Peter Ruan 2013-05-20 19:18:50 EDT
Description of problem:
  when creating a ruby-1.8 app, the ruby version created under vendor is showing as 1.9.1 instead of 1.8.7

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

AMI: devenv_3249

How reproducible:

Steps to Reproduce:
1. rhc app create app1 ruby-1.8
2. add the Gemfile and Gemfile.lock files into the local repo
3. do git commit and push 
4. cd /var/lib/openshift/<app_name>/app-root/repo/vendor/bundle/ruby/, you will see that it's 1.9.1 instead of 1.8

Actual results:
    source 'http://rubygems.org'
    gem 'pg'
    gem 'rack'
    gem 'thread-dump'
      remote: http://rubygems.org/
        pg (0.14.1)
        rack (1.4.5)
        thread-dump (0.0.5)
    error output
    [pruan@homer-linux <DEV> app1]# git push
    Counting objects: 4, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 384 bytes, done.
    Total 3 (delta 1), reused 0 (delta 0)
    remote: Stopping Ruby cart
    remote: httpd (no pid file) not running
    remote: Running build on Ruby cart
    remote: Bundling RubyGems based on Gemfile/Gemfile.lock to repo/vendor/bundle with 'bundle install --deployment'
    remote: Fetching gem metadata from http://rubygems.org/..........
    remote: Installing pg (0.14.1) with native extensions .........
    remote: ............
    remote: ..
    remote: Installing rack (1.4.5)
    remote: Installing thread-dump (0.0.5) with native extensions
    remote: .......
    remote: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
    remote:         /opt/rh/ruby193/root/usr/bin/ruby extconf.rb
    remote: creating Makefile
    remote: make
    remote: gcc -I. -I/opt/rh/ruby193/root/usr/include/x86_64-linux -I/opt/rh/ruby193/root/usr/include/ruby/backward -I/opt/rh/ruby193/root/usr/include -I.   -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fPIC -m64 -o thread_dumper.o -c thread_dumper.c
    remote: In file included from thread_dumper.c:1:
    remote: thread_dumper.h:2:17: error: env.h: No such file or directory
    remote: thread_dumper.h:3:18: error: node.h: No such file or directory
    remote: In file included from thread_dumper.h:4,
    remote:                  from thread_dumper.c:1:
    remote: /opt/rh/ruby193/root/usr/include/ruby/backward/st.h:2:2: warning: #warning use "ruby/st.h" instead of bare "st.h"
    remote: In file included from thread_dumper.c:1:
    remote: thread_dumper.h:10: warning: parameter names (without types) in function declaration
    remote: thread_dumper.c:6: error: expected ')' before 'th'
    remote: thread_dumper.c: In function 'dump':
    remote: thread_dumper.c:44: error: dereferencing pointer to incomplete type
    remote: make: *** [thread_dumper.o] Error 1
    remote: Gem files will remain installed in /var/lib/openshift/519aa3de13ce5808d8000003/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/thread-dump-0.0.5 for inspection.
    remote: Results logged to /var/lib/openshift/519aa3de13ce5808d8000003/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/thread-dump-0.0.5/ext/gem_make.out
    remote: An error occured while installing thread-dump (0.0.5), and Bundler cannot continue.
    remote: Make sure that `gem install thread-dump -v '0.0.5'` succeeds before bundling.
    remote: An error occured executing the 'postreceive' command. For more details about the problem, try running the command again with the '--trace' option.
    To ssh://519aa3de13ce5808d8000003@app1-pruanb.dev.rhcloud.com/~/git/app1.git/

Expected results:

Additional info:
Comment 1 Jhon Honce 2013-05-20 22:52:32 EDT
Fixed in https://github.com/openshift/origin-server/pull/2568
Comment 2 openshift-github-bot 2013-05-21 00:50:24 EDT
Commits pushed to master at https://github.com/openshift/origin-server

Bug 965322 - Ruby always building 1.9.3 environment

* Only bundle using SCL 1.9.3 if configured Ruby version is 1.9

Bug 965322 - Use expected version of ruby to start httpd
Comment 3 Meng Bo 2013-05-21 06:51:17 EDT
Checked this issue on devenv_3253, issue has been fixed.

[root@ip-10-60-53-75 openshift]# ls ruby18-bmengdev/app-root/repo/vendor/bundle/ruby/
[root@ip-10-60-53-75 openshift]# ls ruby19-bmengdev/app-root/repo/vendor/bundle/ruby/
Comment 4 Peter Ruan 2013-05-21 13:42:32 EDT
verified with the latest devenv.  The gem build step is working now.

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