Closed uhrohraggy closed 7 years ago
Is stage non-standard
Yes it's non-standard so you'll get a production build of ember according to those docs.
it says to check for the absence of the RAILS_ENV variable to indicate development mode, and then the last line says it will be absent in production builds, so it leads me to understand mirage would be set to enabled in production, correct?
No, because the environment isn't 'development' so that code inside the if statement won't run.
It's a nice trick that lets you run your ember app in development both with and without its hosting rails app: without the rails app (localhost:4200) you can run it just with the mirage fake api, or with/through the rails app (localhost:3000) you can turn mirage off and have ember hit the local rails server.
Thanks @nruth really appreciate the answer, and makes total sense.
The current documentation for RAILS_ENV is a bit confusing. Current copy:
Particularly given the example, it says to check for the absence of the RAILS_ENV variable to indicate development mode, and then the last line says it will be absent in production builds, so it leads me to understand mirage would be set to enabled in production, correct?
My particular issue is that we have a Rails Environment named
stage
- but appears to load the Ember application using production. There of course could be an issue with something in between, but if RAILS_ENV=stage, what gets set as the ember environment? (Isstage
non-standard?) - I will use EMBER_ENV but I think a quick table of supported Rails environments and the combinations of EMBER_ENV, RAILS_ENV (development, staging, production, non-standard, etc.) and what they'll be set to after build would be super helpful.Which operating system and version is the project developed on? Mac OSSierra 10.12.4
Which version of
ruby
is the project developed on? Ruby 2.3.3Which version of
npm
is the project developed on? NPM 4.1.2 Node 7.5.0Which version of
ember-cli
is the project developed on? Ember-cli 2.12.1What is the
rails
version? Rails 5.0.1What is the
ember-cli-rails
version (fromGemfile
)? ember-cli-rails (0.8.4) cocaine (~> 0.5.8) ember-cli-rails-assets (~> 0.6.2) html_page (~> 0.1.0) railties (>= 3.2)What is the
ember-cli-rails-addon
version (frompackage.json
)? "ember-cli-rails-addon": "^0.7.1",Is your application server multi-threaded (such as
puma
andunicorn
) or is it multi-process (such as thin and webrick)? pumaWhat are the contents of
config/initializers/ember.rb
? EmberCli.configure do |c| c.app :frontend endWhat are the contents of the Rails' view that renders the Ember application?
How is the application deployed? Capistrano