Support for Rails 5.1 on App Engine: installing yarn on the Ruby runtime

812 views
Skip to first unread message

Rafael Soares

unread,
Jul 5, 2017, 8:49:22 PM7/5/17
to Google App Engine
So, I've created a new Rails 5.1 app, worked on it locally (even built some webpack modules) and deployed to App Engine Flex environment.

It worked nicely, but I saw this error message in the console output:

Step 8/10 : RUN if test -d app/assets -a -f config/application.rb; then       bundle exec rake assets:precompile || true;     fi
 ---> Running in 503bf8112b4a
Yarn executable was not detected in the system.
/app/vendor/bundle/ruby/2.4.0/bin/rake: No such file or directory - yarn

It continued to finish the deploy, and the app worked normally, but I suspect that was because I ran `RAILS_ENV=production rails assets:precompile` locally before deploying (I was following the tutorial for deploying). It probably wouldn't have built the assets.

Is there a way (or is it on the roadmap) to install yarn on the ruby runtime, so we can leverage asset precompilation during deploy, avoiding the need to precompile locally.

Thanks!

Kenworth (Google Cloud Platform)

unread,
Jul 6, 2017, 8:29:39 PM7/6/17
to Google App Engine
I am currently investigating this issue and will post on this thread when I have an update.

Kenworth (Google Cloud Platform)

unread,
Jul 12, 2017, 8:04:11 PM7/12/17
to google-a...@googlegroups.com
Hi Rafael,

This is expected behavior at the moment. Our backline team is aware of the Yarn use-case issue and is working on it. You can consult this GitHub thread [1] for a similar issue. It discusses some possible workarounds like customizing the Dockerfile.

[1] https://github.com/GoogleCloudPlatform/ruby-docker/issues/91
Reply all
Reply to author
Forward
0 new messages