Description of problem:
When pushing any code up to openshift, push is successful with the latest commit on the server. However, when attempting to access the website i.e. http://myapplication-myusername.rhcloud.com. The user sees 503 Service Temporarily Unavailable instead of the actual web page.
git push log shows error: "/var/lib/openshift/xxxxxxxxx//.env/CARTRIDGE_VERSION_2: line 1: 2: command not found". Checked CARTRIDGE_VERSION_2 and found that the file indeed contains only 1 line with one single character, the number "2", in it.
Version-Release number of selected component (if applicable):
Cartridge created with Rails Quickstart
This happens every time I git push to openshift. I think it happened after the cartridge was updated to version 2.
Steps to Reproduce:
1. Edits any repo file and make a local commit
2. Do git push to ssh://firstname.lastname@example.org/~/git/xxxxxx.git
3. Access via browser: http://myapplication-myusername.rhcloud.com
Git push is successful. The edited files appear on openshift server. However, the website becomes inaccessible with 503 Service Temporarily Unavailable. "git push" log returns the following messages...
##### LOG BEGINS #####
git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin master:master
Pushing to ssh://email@example.com/~/git/xxxxxx.git/
remote: [Mon Jun 24 05:37:41 2013] [warn] module php5_module is already loaded, skipping
remote: Waiting for stop to finish
remote: CLIENT_RESULT: Stopping CRON cart
remote: [Mon Jun 24 05:37:47 2013] [warn] module php5_module is already loaded, skipping
remote: Waiting for stop to finish
remote: Stopping Ruby cart
remote: Saving away previously bundled RubyGems
remote: Running build on Ruby cart
remote: Restoring previously bundled RubyGems (note: you can commit .openshift/markers/force_clean_build at the root of your repo to force a clean bundle)
remote: Bundling RubyGems based on Gemfile/Gemfile.lock to repo/vendor/bundle with 'bundle install --deployment'
remote: Using rake (10.0.3)
remote: Using i18n (0.6.1)
remote: Using multi_json (1.6.1)
remote: Using activesupport (3.2.11)
remote: Using builder (3.0.4)
remote: Using activemodel (3.2.11)
remote: Using erubis (2.7.0)
remote: Using journey (1.0.4)
remote: Using rack (1.4.5)
remote: Using rack-cache (1.2)
remote: Using rack-test (0.6.2)
remote: Using hike (1.2.1)
remote: Using tilt (1.3.3)
remote: Using sprockets (2.2.2)
remote: Using actionpack (3.2.11)
remote: Using mime-types (1.21)
remote: Using polyglot (0.3.3)
remote: Using treetop (1.4.12)
remote: Using mail (2.4.4)
remote: Using actionmailer (3.2.11)
remote: Using arel (3.0.2)
remote: Using tzinfo (0.3.35)
remote: Using activerecord (3.2.11)
remote: Using activeresource (3.2.11)
remote: Using coffee-script-source (1.4.0)
remote: Using execjs (1.4.0)
remote: Using coffee-script (2.2.0)
remote: Using rack-ssl (1.3.3)
remote: Using json (1.7.7)
remote: Using rdoc (3.12.1)
remote: Using thor (0.14.6)
remote: Using railties (3.2.11)
remote: Using coffee-rails (3.2.2)
remote: Using jquery-rails (2.2.1)
remote: Using minitest (4.6.1)
remote: Using mysql2 (0.3.11)
remote: Using nokogiri (1.5.6)
remote: Using rabl (0.8.0)
remote: Using bundler (1.1.4)
remote: Using rails (3.2.11)
remote: Using sass (3.2.5)
remote: Using sass-rails (3.2.6)
remote: Using sqlite3 (1.3.7)
remote: Using uglifier (1.3.0)
remote: Your bundle is complete! It was installed into ./vendor/bundle
remote: [Mon Jun 24 05:38:21 2013] [warn] module php5_module is already loaded, skipping
remote: CLIENT_RESULT: Starting CRON cart
remote: [Mon Jun 24 05:38:26 2013] [warn] module php5_module is already loaded, skipping
remote: Precompiling with 'bundle exec rake assets:precompile'
remote: /opt/rh/ruby193/root/usr/bin/ruby /var/lib/openshift/xxxxxx/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
remote: /var/lib/openshift/xxxxxxxxx//.env/CARTRIDGE_VERSION_2: line 1: 2: command not found
remote: An error occurred executing 'gear postreceive'
remote: For more details about the problem, try running the command again with the '--trace' option.
d812b10..25a7558 master -> master
updating local tracking ref 'refs/remotes/origin/master'
##### LOG ENDS #####
Git pushes successfully and the site is accessible right away without 503 Service Temporarily Unavailable.
It appears your code has an old version of the deploy script which sources the Environment Variables under .env. You're going to need to change your code to skip that step. You can do that a couple ways:
1) You can make sure deploy hook look like:
2) You could rebase on the upstream quickstart:
Please reopen if you are still having problems.