Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1052092 - [origin_cartridge_21]Failed to build plugin for rails app
Summary: [origin_cartridge_21]Failed to build plugin for rails app
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Michal Fojtik
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-13 10:07 UTC by chunchen
Modified: 2016-09-30 02:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-30 00:55:26 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description chunchen 2014-01-13 10:07:24 UTC
Description of problem:
It's failed to build plugin for rails app, when building plugin like 'dmsf', will meet "Failed to execute: 'control build' for /var/lib/openshift/52d3795273c527ab82000087/ruby" errors

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

How reproducible:
always

Steps to Reproduce:
1. Create an app with Rails and MySQL
rhc app create redmine9 ruby-1.9 mysql-5.1

2. Deploy the Redmine Quickstart
cd redmine9;
git remote add upstream -m master git://github.com/openshift/redmine-2.0-openshift-quickstart.git
git pull -s recursive -X theirs upstream master
git push
bundle install

3. Add <app_repo>/config/database.yml
cat database.yml:
development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000

4. Add the 'dmsf' plugin (or other plugin) to redmine as a git sub-module
./script/rails plugin install https://github.com/danmunn/redmine_dmsf.git
mv vendor/plugins/redmine_dmsf/ plugins/

5. Set BUNDLE_WITHOUT env variable
rhc env set BUNDLE_WITHOUT="xapian" -a redmine9

6. make some changes and perform a git push
echo "test text" > tst.txt
git add . && git commit -amp && git push

Actual results:
<------snip------>
 create mode 100644 plugins/redmine_dmsf/test/test_helper.rb
 create mode 100644 plugins/redmine_dmsf/test/unit/dmsf_file_test.rb
 create mode 100644 plugins/redmine_dmsf/test/unit/dmsf_folder_test.rb
 create mode 100644 plugins/redmine_dmsf/test/unit/dmsf_lock_test.rb
 create mode 100644 plugins/redmine_dmsf/test/unit/dmsf_permission_test.rb
 create mode 100644 plugins/redmine_dmsf/test/unit/dmsf_workflow_step_action_test.rb
 create mode 100644 plugins/redmine_dmsf/test/unit/dmsf_workflow_step_assignment_test.rb
 create mode 100644 plugins/redmine_dmsf/test/unit/dmsf_workflow_step_test.rb
 create mode 100644 plugins/redmine_dmsf/test/unit/dmsf_workflow_test.rb
 create mode 100644 plugins/redmine_dmsf/travis_patch.diff
 create mode 100644 tst.txt
Counting objects: 341, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (323/323), done.
Writing objects: 100% (338/338), 459.53 KiB, done.
Total 338 (delta 42), reused 0 (delta 0)
remote: Stopping Ruby cartridge
remote: Waiting for stop to finish
remote: Stopping MySQL cartridge
remote: Saving away previously bundled RubyGems
remote: Building git ref 'master', commit 6e49411
remote: Building Ruby cartridge
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 --without "xapian"'
remote: You are trying to install in deployment mode after changing
remote: your Gemfile. Run `bundle install` elsewhere and add the
remote: updated Gemfile.lock to version control.
remote: 
remote: You have added to the Gemfile:
remote: * rubyzip (>= 1.0.0)
remote: * zip-zip
remote: * simple_enum
remote: * nokogiri (>= 1.5.10)
remote: * uuidtools (~> 2.1.1)
remote: * xapian-full
remote: An error occurred executing 'gear postreceive' (exit code: 16)
remote: Error message: Failed to execute: 'control build' for /var/lib/openshift/52d3795273c527ab82000087/ruby
remote: 
remote: For more details about the problem, try running the command again with the '--trace' option.
To ssh://52d3795273c527ab82000087@redmine9-cdm.dev.rhcloud.com/~/git/redmine9.git/
   1685eda..6e49411  master -> master


Expected results:
Building plugin for rails app should be successfully.

Additional info:

Comment 1 Michal Fojtik 2014-01-13 10:53:18 UTC
You need to update Gemfile.lock first. Run 'bundle --without xapian" locally first, then push Gemfile.lock :-)

Comment 2 chunchen 2014-01-14 07:42:54 UTC
According to Comment#1, it can work well, please refer to the following results:

1. Create an app with Rails and MySQL
rhc app create redmine ruby-1.8 mysql-5.1

2. Deploy the Redmine Quickstart
cd redmine;
git remote add upstream -m master git://github.com/openshift/redmine-2.0-openshift-quickstart.git
git pull -s recursive -X theirs upstream maste

3. Add the 'dmsf' plugin (or other plugin) to redmine as a git sub-module
cd redmine
git submodule add https://github.com/danmunn/redmine_dmsf.git plugins/redmine_dmsf

4. Set BUNDLE_WITHOUT env variable
rhc env set BUNDLE_WITHOUT="xapian" -a redmine

5. Do bundle
cd redmine
bundle --without "xapian"

6. Perform a git push
$ git add . && git commit -amp && git push

<------------snip----------->
remote: Bundling RubyGems based on Gemfile/Gemfile.lock to repo/vendor/bundle with 'bundle install --deployment --without "xapian"'
remote: Fetching gem metadata from http://rubygems.org/.........
remote: Fetching gem metadata from http://rubygems.org/.........
remote: Fetching gem metadata from http://rubygems.org/..
remote: Fetching gem metadata from http://rubygems.org/..
remote: Installing rake (10.1.1)
remote: Installing i18n (0.6.9)
remote: Installing multi_json (1.8.4)
remote: Installing activesupport (3.2.6)
remote: Installing builder (3.0.4)
remote: Installing activemodel (3.2.6)
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.1.3)
remote: Installing actionpack (3.2.6)
remote: Installing mime-types (1.25.1)
remote: Installing polyglot (0.3.3)
remote: Installing treetop (1.4.15)
remote: Installing mail (2.4.4)
remote: Installing actionmailer (3.2.6)
remote: Installing arel (3.0.3)
remote: Installing tzinfo (0.3.38)
remote: Installing activerecord (3.2.6)
remote: Installing activeresource (3.2.6)
remote: Installing coderay (1.0.9)
remote: Installing json (1.8.1) with native extensions
remote: Installing nokogiri (1.6.1) with native extensions ...
remote: Installing rubyzip (1.1.0)
remote: Installing shoulda (2.11.3)
remote: Installing simple_enum (1.6.8)
remote: Installing uuidtools (2.1.4)
remote: Installing zip-zip (0.2)
<-------snip------->

Comment 3 chunchen 2014-01-14 10:02:55 UTC
There's a typo in Comment#2, the cartridge type(ruby-1.8) should be ruby-1.9, sorry for the confused.


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