Bug 1016966

Summary: Git push failed when add railsapp quickstart
Product: OpenShift Container Platform Reporter: nsun <nsun>
Component: ContainersAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 2.2.0CC: libra-onpremise-devel, tiwillia, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-23 14:45:40 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:

Description nsun 2013-10-09 04:43:30 UTC
Description of problem:
Railsapp quickstart test failed.
Version-Release number of selected component(if aplicable):
OSE puddle :  [1.2/2013-10-03.1]

How reproducible:
aways

Steps to Reproduce:
https://github.com/openshift/rails-example/blob/master/README.md, and git push failed.

Actual Results:
remote: >= 1.9.2 : nothing to do! Yay!
remote: Precompiling with 'bundle exec rake assets:precompile'
remote: /opt/rh/ruby193/root/usr/bin/ruby /var/lib/openshift/5253dd4dfc7d6a54da000009/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
remote: Target directory must exist for environment variables
remote: An error occurred executing 'gear postreceive'
remote: 
remote: For more details about the problem, try running the command again with the '--trace' option.
To ssh://5253dd4dfc7d6a54da000009.com/~/git/railsapp.git/
   00a6326..55d1e9b  master -> master

Expected results:
successed

Additional info:
Git push successed on devenv_stage_488.

Comment 2 Johnny Liu 2013-10-16 06:03:24 UTC
*** Bug 1019511 has been marked as a duplicate of this bug. ***

Comment 4 Brenton Leanhardt 2013-10-18 15:10:36 UTC
The reason this is failing is because when support for postgres was added the new user_env directory is referenced.  This does not exist in OSE 1.2:

.openshift/action_hooks/deploy:  set_env_var 'RAILS_DB' $RAILS_DB $OPENSHIFT_HOMEDIR/.env/user_vars

To workaround this in the meantime you can use these steps to create a working quickstart:

rhc app create -a railsapp -t ruby-1.9
rhc cartridge add -a railsapp -c mysql-5.1
cd railsapp
git remote add upstream -m master git://github.com/openshift/rails-example.git
git fetch upstream
git merge -s recursive -X theirs b6203669830f7d06e2b96393cd04f734e52daa18

b6203 is the commit just before the recent postgres support.

Comment 5 Brenton Leanhardt 2013-10-21 15:42:33 UTC
Michal pushed a fix today:
https://github.com/openshift/rails-example/pull/30

Comment 6 nsun 2013-10-22 11:31:13 UTC
Railsapp Quickstart verified on OSE1.2.