Bug 862876
Summary: | ruby-1.9 (maybe 1.8) will throw errors about not being able to write to ~/.gem/ | ||
---|---|---|---|
Product: | OKD | Reporter: | Mike McGrath <mmcgrath> |
Component: | Containers | Assignee: | Jhon Honce <jhonce> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 2.x | CC: | chunchen, jhou, xtian |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | devenv_2301 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-11-06 18:48:21 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Mike McGrath
2012-10-03 19:52:16 UTC
Configure hook enhanced to create ~/.gem directories code will be pushed once repositories are open for business. Tested on devenv_2301 Steps: 1. Create a ruby-1.9 app 2. ssh into app, cd $OPENSHIFT_REPO_DIR 3. Create a valid Gemfile under $OPENSHIFT_REPO_DIR [r19-2301t.dev.rhcloud.com repo]\> cat Gemfile [r19-2301t.dev.rhcloud.com repo]\> cat Gemfile source "http://rubygems.org" gem "rack" 4. Run 'bundle install' [r19-2301t.dev.rhcloud.com repo]\> bundle install Using rack (1.4.1) Using bundler (1.1.4) Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. Repeat above steps for ruby-1.8 apps For ruby-1.8, I caught this error: [r18-2301t.dev.rhcloud.com repo]\> bundle install Fetching source index for http://rubygems.org/ which: no sudo in (/usr/libexec/openshift/cartridges/ruby-1.8/info/bin/:/usr/libexec/openshift/cartridges/abstract-httpd/info/bin/:/usr/libexec/openshift/cartridges/abstract/info/bin/:/sbin:/usr/sbin:/bin:/usr/bin) Gem::Exception: Cannot load gem at [/usr/lib/ruby/gems/1.8/cache/rack-1.4.1.gem] in /var/lib/openshift/dfe1250e6b20441d85887c6cabd469ef/app-root/runtime/repo An error occured while installing rack (1.4.1), and Bundler cannot continue. Make sure that `gem install rack -v '1.4.1'` succeeds before bundling. You need to set GEM_HOME to point to ~/.gem. Otherwise, bundler will attempt to install into the system directories as you demonstrated in comment#3 Verified on devenv_2303 For ruby-1.8, need to set GEM_HOME to point to ~/.gem, and bundle install will work. [ruby18-2303t.dev.rhcloud.com ~]\> export GEM_HOME=/var/lib/openshift/5555b0bfab3b4447b9d1b438e250af24/.gem/ [ruby18-2303t.dev.rhcloud.com repo]\> cat Gemfile source "http://rubygems.org" gem "rack" [ruby18-2303t.dev.rhcloud.com repo]\> bundle install Fetching source index for http://rubygems.org/ which: no sudo in (/usr/libexec/openshift/cartridges/ruby-1.8/info/bin/:/usr/libexec/openshift/cartridges/abstract-httpd/info/bin/:/usr/libexec/openshift/cartridges/abstract/info/bin/:/sbin:/usr/sbin:/bin:/usr/bin) Installing rack (1.4.1) Using bundler (1.0.21) Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. |