cloudfoundry / ruby-buildpack

Cloud Foundry buildpack for Ruby, Sinatra and Rails
http://docs.cloudfoundry.org/buildpacks/
Apache License 2.0
65 stars 160 forks source link

Rails 5.0 webpacker:compile failed #85

Closed yohfee closed 6 years ago

yohfee commented 7 years ago

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version? cf version 6.29.0+ff886fa93.2017-07-24

What version of the buildpack you are using? Buildpack version 1.6.46

If you were attempting to accomplish a task, what was it you were attempting to do? rails webpacker:compile ruby 2.4.1 rails 5.0.5 webpacker 2.0

What did you expect to happen? Precompiling assets succeed.

What was the actual behavior? Precompiling assets failed.

Please confirm where necessary:

Below shows node 6 is available only rails 5.1+. How can I use node 6 with rails 5.0? https://github.com/rakutentech/ruby-buildpack/blob/master/lib/language_pack/helpers/node_installer.rb#L36-L40

cf-gitbot commented 7 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/149953614

The labels on this github issue will be updated when the story is started.

sclevine commented 7 years ago

We plan to support providing custom versions of Node.js via the Node.js buildpack when multiple buildpack support is complete. Currently, we only provide the active LTS version of Node.js that was available when the rails version line was first released.

If it's difficult to work around this before multiple buildpack support is available, we could introduce an environment variable to force specific node versions. @dgodd, does this seem reasonable?

yohfee commented 7 years ago

I see, thanks. I'll push the local compiled assets for now.

dgodd commented 7 years ago

@sclevine I'm in favor of the environment variable plan

sclevine commented 7 years ago

Given that multiple buildpack support is available in the latest CAPI release, I'd like to wait on this until we know if it's necessary. In the long term, we should deprecate the provided Node.js anyways.

jainankita90 commented 6 years ago

Looking forward for this enhancement

sclevine commented 6 years ago

This should work now! The Ruby buildpack will use whatever version of Node.js is supplied by the Node.js buildpack. Just specify the Node.js buildpack before the Ruby buildpack when you push with the cf v3-push command.

I'm closing this issue as resolved, but let me know if you run into trouble.