← All Articles

Cloud 66 for Rails, Webpacker Gem and Yarn

Kasia HoffmanKasia Hoffman
May 24th 17Updated Jul 8th 22
Ruby on Rails


At Cloud 66 we are happy to announce that the Webpacker Gem and Yarn is available now by default to our Rails/Rack users.

Why is this important?

Historically, adding a Javascript library was not so smooth in Rails/Rack applications. This has now changed since adding Pull Request 26836 that includes Webpacker Gem and Yarn. :)

Rails 5.1+ uses Webpack and Yarn out of the box by default for new Rails apps. To use Webpack and Yarn with previous versions you will have to install it manually. Unless you are a Cloud 66 user :)

A short overview of Webpacker Gem and Yarn:

What is the Webpacker Gem?

Webpacker is designed to help using the JavaScript preprocessor and bundler Webpack 2.x.x+ to manage JavaScript applications in Rails. Its primary purpose is to coexist with the asset pipeline.

What is Yarn?

Yarn is a JavaScript package manager for your code, that is a faster alternative to NPM.

The are a few benefits of using Yarn with your Rails application:

  • It allows you to use and share code with other developers from around the world.
  • You don't have to download packages twice ever again, as Yarn catches every package it downloads.
  • It facilitates much faster installation times by stopping other operations to maximize resource utilization.
  • It's secure! Yarn verifies and checks to make sure the installed packages are not compromised before the code is executed.
  • Yarn promotes consistency as it ensures one install that works on one system will work on another in the same way.

Cloud 66 for Rails, Webpacker Gem and Yarn

If you are using Cloud 66 for any Rack stack (including Rails) your Webpack will be installed by using Yarn.

Check out a sample that works at Cloud 66.

This feature works on both Ubuntu 14 and Ubuntu 16


Try Cloud 66 for Free, No credit card required