Bug 1024612 - No Rails environment set during deployment
Summary: No Rails environment set during deployment
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Dan McPherson
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-30 05:17 UTC by Stefan
Modified: 2015-05-14 23:32 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-30 15:20:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Stefan 2013-10-30 05:17:02 UTC
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 15:20:05 UTC
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.