| Summary: | Error occurs during git push of rails quick start | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Gaoyun Pei <gpei> |
| Component: | Containers | Assignee: | John W. Lamb <jolamb> |
| Status: | CLOSED ERRATA | QA Contact: | libra bugs <libra-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 2.0.0 | CC: | bleanhar, dneary, jialiu, libra-onpremise-devel, mfojtik |
| 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: | 2014-05-15 14:40:47 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
Gaoyun Pei
2013-11-15 10:13:34 UTC
I am also seeing this issue. Dave. After install nodejs.x86_64, libuv.x86_64 andhttp-parser.x86_64 from epel, this issue disappeared. Seem like ose need ship these packages into openshift channel. mfojtik is looking into how to make the quickstart detect and use the nodejs010 scl packages for the unmet dependencies mentioned in comment 3. Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/608c94857d26dd3242928c91fd30097b3775896b Bug 1030873 - Fix the there is no system NodeJS installed which is required for assets compilation Still get the same error when testing on 2.1/2014-03-24.2 puddle. Steps: 1. rhc app create railsapp ruby-1.9 2. rhc cartridge add -a railsapp -c mysql-5.5 3. cd railsapp git remote add upstream -m master git://github.com/openshift/rails-example.git git pull -s recursive -X theirs upstream master 4. git push [root@broker railsapp]# git push Counting objects: 582, done. Compressing objects: 100% (312/312), done. Writing objects: 100% (572/572), 174.85 KiB, done. Total 572 (delta 239), reused 559 (delta 231) remote: Stopping MySQL 5.5 cartridge remote: Stopping Ruby cartridge remote: httpd: Could not reliably determine the server's fully qualified domain name, using node2.ose-201403214.com.cn for ServerName remote: Waiting for stop to finish remote: Building git ref 'master', commit d74f774 remote: Building Ruby cartridge remote: bundle install --deployment --path ./app-root/repo/vendor/bundle remote: NOTE: You can prevent installing certain Gemfile group using: rhc env set BUNDLE_WITHOUT=groupname remote: Fetching gem metadata from https://rubygems.org/......... remote: Fetching gem metadata from https://rubygems.org/.. remote: Installing rake (10.1.0) remote: Installing i18n (0.6.9) remote: Installing multi_json (1.8.2) remote: Installing activesupport (3.2.16) remote: Installing builder (3.0.4) remote: Installing activemodel (3.2.16) remote: Installing erubis (2.7.0) remote: Installing journey (1.0.4) remote: Installing rack (1.4.5) remote: Installing rack-cache (1.2) remote: Installing rack-test (0.6.2) remote: Installing hike (1.2.3) remote: Installing tilt (1.4.1) remote: Installing sprockets (2.2.2) remote: Installing actionpack (3.2.16) remote: Installing mime-types (1.25.1) remote: Installing polyglot (0.3.3) remote: Installing treetop (1.4.15) remote: Installing mail (2.5.4) remote: Installing actionmailer (3.2.16) remote: Installing arel (3.0.3) remote: Installing tzinfo (0.3.38) remote: Installing activerecord (3.2.16) remote: Installing activeresource (3.2.16) remote: Installing coffee-script-source (1.6.3) remote: Installing execjs (2.0.2) remote: Installing coffee-script (2.2.0) remote: Installing rack-ssl (1.3.3) remote: Installing json (1.8.1) with native extensions remote: Installing rdoc (3.12.2) remote: Installing thor (0.14.6) remote: Installing railties (3.2.16) remote: Installing coffee-rails (3.2.2) remote: Installing jquery-rails (3.0.4) remote: Installing minitest (5.1.0) remote: Installing mysql2 (0.3.14) with native extensions remote: Installing pg (0.17.0) with native extensions remote: Using bundler (1.1.4) remote: Installing rails (3.2.16) remote: Installing sass (3.2.12) remote: Installing sass-rails (3.2.6) remote: Installing sqlite3 (1.3.8) with native extensions remote: Installing uglifier (2.3.2) remote: Your bundle is complete! It was installed into ./vendor/bundle remote: Post-install message from rdoc: remote: Depending on your version of ruby, you may need to install ruby rdoc/ri data: remote: remote: <= 1.8.6 : unsupported remote: = 1.8.7 : gem install rdoc-data; rdoc-data --install remote: = 1.9.1 : gem install rdoc-data; rdoc-data --install remote: >= 1.9.2 : nothing to do! Yay! remote: Preparing build for deployment remote: Deployment id is f5c8fcb2 remote: Activating deployment remote: Starting MySQL 5.5 cartridge remote: rake aborted! remote: Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. remote: /var/lib/openshift/5330f649cfb77f5db400002e/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/execjs-2.0.2/lib/execjs/runtimes.rb:51:in `autodetect' remote: /var/lib/openshift/5330f649cfb77f5db400002e/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/execjs-2.0.2/lib/execjs.rb:5:in `<module:ExecJS>' remote: /var/lib/openshift/5330f649cfb77f5db400002e/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/execjs-2.0.2/lib/execjs.rb:4:in `<top (required)>' remote: /var/lib/openshift/5330f649cfb77f5db400002e/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require' remote: /var/lib/openshift/5330f649cfb77f5db400002e/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `<top (required)>' remote: /var/lib/openshift/5330f649cfb77f5db400002e/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require' remote: /var/lib/openshift/5330f649cfb77f5db400002e/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `<top (required)>' remote: /var/lib/openshift/5330f649cfb77f5db400002e/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require' remote: /var/lib/openshift/5330f649cfb77f5db400002e/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `<top (required)>' remote: /var/lib/openshift/5330f649cfb77f5db400002e/app-root/runtime/repo/config/application.rb:7:in `<top (required)>' remote: /var/lib/openshift/5330f649cfb77f5db400002e/app-root/runtime/repo/Rakefile:5:in `require' remote: /var/lib/openshift/5330f649cfb77f5db400002e/app-root/runtime/repo/Rakefile:5:in `<top (required)>' remote: (See full trace by running task with --trace) remote: Compilation of assets is disabled or assets not detected. remote: exec rake db:migrate RAILS_ENV=production remote: Starting Ruby cartridge remote: httpd: Could not reliably determine the server's fully qualified domain name, using node2.ose-201403214.com.cn for ServerName remote: ------------------------- remote: Git Post-Receive Result: success remote: Activation status: success remote: Deployment completed with status: success To ssh://5330f649cfb77f5db400002e.com.cn/~/git/railsapp.git/ 3bca57c..d74f774 master -> master After dig into this issue, seem like dev miss one place to wrap command with ruby_with_nodejs_context.
In ruby/lib/util, "bundle exec" will cause asset, so need wrap it.
<--snip-->
function has_assets {
[ -f .openshift/markers/disable_asset_compilation ] && return 1
[ ! -f Gemfile ] && return 1
[ ! -f Rakefile ] && return 1
! grep " rails " Gemfile.lock >/dev/null && return 1
! grep " execjs " Gemfile.lock >/dev/null && return 1
! bundle exec "rake -T" | grep "assets:precompile" >/dev/null && return 1
# This line need to be wrapped.
return 0
}
<--snip-->
Replace it using the following line:
! ruby_with_nodejs_context "bundle exec \"rake -T\"" | grep "assets:precompile" >/dev/null && return 1
(In reply to Johnny Liu from comment #10) > After dig into this issue, seem like dev miss one place to wrap command with > ruby_with_nodejs_context. > > In ruby/lib/util, "bundle exec" will cause asset, so need wrap it. > <--snip--> > function has_assets { > [ -f .openshift/markers/disable_asset_compilation ] && return 1 > > [ ! -f Gemfile ] && return 1 > [ ! -f Rakefile ] && return 1 > ! grep " rails " Gemfile.lock >/dev/null && return 1 > ! grep " execjs " Gemfile.lock >/dev/null && return 1 > ! bundle exec "rake -T" | grep "assets:precompile" >/dev/null && return 1 > # This line need to be wrapped. > > return 0 > } > <--snip--> > > > > Replace it using the following line: > ! ruby_with_nodejs_context "bundle exec \"rake -T\"" | grep > "assets:precompile" >/dev/null && return 1 Thanks, getting ready to look at this now. Should be resolved by https://github.com/openshift/origin-server/pull/5080 - tested in Enterprise and Online. Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/9064e2afadb0b52d29c7a0dc7fef122c330a1062 util: add nodejs context for bundle exec call Bug 1030873 https://bugzilla.redhat.com/show_bug.cgi?id=1030873 NodeJS needs to be available for `bundle exec` call in `ruby/lib/util` since it triggers asset compilation See also: * https://github.com/openshift/rails-example/commit/07d01120b308f415416a78d0bd7e9bd339d9ead3 * https://github.com/openshift/origin-server/commit/608c94857d26dd3242928c91fd30097b3775896b This should be fixed in the most recent puddle Verified this bug with 2.1/2014-03-27.2, and PASS. No error is seen for rails quick-start. |