O'Reilly logo

Rails, Angular, Postgres, and Bootstrap, 2nd Edition by David B. Copeland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring Rails and Angular

As I mentioned earlier, using Angular with the Rails asset pipeline is difficult. In the previous edition of this book, I used Bower to download Angular, and Sprockets (the library that powers Rails’s asset pipeline) automatically brought it in. Angular is not available via Bower, so we have to use Yarn (that’s why we set it up in Chapter 2, Create a Great-Looking Login with Bootstrap and Devise). Configuring the asset pipeline to use Yarn-based libraries and packages is not simple, mainly due to the assumptions the NPM modules Yarn downloads make about the JavaScript environment they are running in. Fortunately, Rails 5.1 introduced Webpacker and that can interoperate with modern JavaScript tools. We used it ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required