Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

remove nodejs as a requirement for production #273

Merged
merged 4 commits into from
Aug 17, 2015
Merged

remove nodejs as a requirement for production #273

merged 4 commits into from
Aug 17, 2015

Conversation

jordimassaguerpla
Copy link
Member

Assets are not being recompiled in production for Rails 4

http://guides.rubyonrails.org/asset_pipeline.html

Thus, we don't need any javascript engine in production (nor the gems
that requires that)

Let's remove nodejs and the gems that require that from production
(=assets gems)

However, we do need nodejs and these gems for precompiling the assets,
thus we use an env variable for enabling/disabling them.

This way we can do:

For precompiling assets in the spec file:

PACKAGING=yes IGNORE_ASSETS=no RAILS_ENV=production bundle exec rake
assets:precompile

and then, for bundling the gems:

PACKAGING=yes IGNORE_ASSETS=yes bundle install

Assets are not being recompiled in production for Rails 4

http://guides.rubyonrails.org/asset_pipeline.html

Thus, we don't need any javascript engine in production (nor the gems
that requires that)

Let's remove nodejs and the gems that require that from production
(=assets gems)

However, we do need nodejs and these gems for precompiling the assets,
thus we use an env variable for enabling/disabling them.

This way we can do:

For precompiling assets in the spec file:

PACKAGING=yes IGNORE_ASSETS=no RAILS_ENV=production bundle exec rake
assets:precompile

and then, for bundling the gems:

PACKAGING=yes IGNORE_ASSETS=yes bundle install
# run:
#
# IGNORE_ASSETS=yes bundle list
unless ENV["IGNORE_ASSETS"] && ENV["IGNORE_ASSETS"] == "yes"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can simply write:

if ENV["IGNORE_ASSETS"] == "yes"

@jordimassaguerpla
Copy link
Member Author

@flavio: I've fixed the mentioned issues

flavio added a commit that referenced this pull request Aug 17, 2015
remove nodejs as a requirement for production
@flavio flavio merged commit ae3a113 into SUSE:master Aug 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants