I Gots the Asset Pipeline Blues
The bundler gem was available around November 2009, and was usable with Rails 2.3:
The Asset Pipeline was added to Rails 3.1 in August of 2011:
Rails with Webpack and Yarn
I read something somewhere by DHH about Webpack, and Yahuda Katz was working on an npm-replacement called Yarn, so those seemed like good places to start. As a result, this entire article is shamelessly
stolen abstracted from the article “Replacing the Rails Asset Pipeline with Webpack and Yarn”, by Samuel Mullen, November 16, 2016. This is an in depth look at setting up the Rails/Webpack/Yarn environment. There are a lot of moving parts, nice job Sam!
I followed the demo and I have published my results here:
bundle exec rails s
popped up the “Yay! You’re on Rails!” page. Success!
- There is a node_modules directory in Rails root:
du -hs node_modules 74M node_modules
Ah ha! Just as I was finishing up my evaluation, what did I see in Ruby Weekly? (Issue 327):
Rails 5.1 support for Webpack and Yarn. Woot! Let’s see how that plays out. Cheers!