Bug 1024612 - No Rails environment set during deployment
No Rails environment set during deployment
Status: CLOSED NOTABUG
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Dan McPherson
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-30 01:17 EDT by Stefan
Modified: 2015-05-14 19:32 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-30 11:20:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stefan 2013-10-30 01:17:02 EDT
Description of problem: There is no rails environment set during deployment


How reproducible: Always


Steps to Reproduce:
1. Have Rails App
2. Deploy to OpenShift


Actual results:
- rake assets:precompile is run without RAILS_ENV=production
- gems in development group are installed 


Expected results:
- rake assets:precompile should be run with RAILS_ENV=production
- gems in development group should not be installed
Comment 1 Dan McPherson 2013-10-30 11:20:05 EDT
Hi Stefan,

  You are mentioning install and rake assets:precompile which are two separate steps.  bundle doesn't take into account RAILS_ENV at all as bundler has no knowledge of rails.  And bundle is the step that installs the gems.  We also run bundle install --deployment which installs exactly what you have in your Gemfile.lock.

As for the precompile, the actual step that runs is:

remote: Precompiling with 'bundle exec rake assets:precompile'
remote: /opt/rh/ruby193/root/usr/bin/ruby /var/lib/openshift/527120026650709e8c000027/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets


which does include RAILS_ENV=production.

  I am closing this as NOTABUG but if you have a related concern/issue please feel free to reopen.

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