---
title: "A new asset pipeline for Rails"
publication: "Ruby Weekly"
issue: 591
published_at: "2022-02-17"
canonical_url: "https://rubyweekly.com/issues/591"
---

Plus comparing Delayed Job and Sidekiq, migrating to Rails 7, and a MIDI library for Ruby. |        

#​591 — February 17, 2022 

[Read on the Web](https://rubyweekly.com/issues/591)   

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/wavmz2ch2xawrrwhf0fu.jpg)](https://world.hey.com/dhh/introducing-propshaft-ee60f4f6)  

[Introducing Propshaft: The Future of Asset Pipelining in Rails?](https://world.hey.com/dhh/introducing-propshaft-ee60f4f6) — Propshaft is a new asset pipeline for Rails that boasts an approach that takes advantage of modern web technology, is “_dramatically simpler than the Sprockets that went before it_”, and is the heir apparent to handling assets in Rails 8 (but no sooner, says DHH). 

David Heinemeier Hansson   

[Take the 2022 Ruby on Rails Survey](https://rails-hosting.com/) — This is the _seventh_ outing for Planet Argon’s survey which began way back in 2009. We support it each time as the results always make for interesting reading (see [2020’s results](https://rails-hosting.com/2020/) for example). Participate and make your Ruby and Rails preferences known. 

Planet Argon Team   [![\](https://copm.s3.amazonaws.com/a1223803.png)](https://www.cloud66.com/rails/?utm_source=-&utm_medium=-&utm_campaign=RubyWeekly-22-q1-1) 

[The Best Deployment Tool for Rails](https://www.cloud66.com/rails/?utm_source=-&utm_medium=-&utm_campaign=RubyWeekly-22-q1-1) — Deploy Rails apps on any cloud, with native support for Rails conventions, full databases support, replication & backups, powerful access management & traffic control features. Try it today for free with an extra $100 in free credits with the code:`Ruby-Weekly!` 

Cloud 66 sponsor   

[Ruby 3.1's Error Highlighting Gem](https://blog.saeloun.com/2022/02/16/ruby-3.1-adds-error-highlighting.html) — [error_highlight](https://github.com/ruby/error_highlight) is a gem loaded by default in Ruby 3.1+ that makes it clearer which piece of code causes an exception. You can customize the results too, as demonstrated in this post. 

Alkesh Ghorpade   

**IN BRIEF:** 

- Spruce up your projects' README.md files on GitHub with GitHub's new [support for Mermaid.js diagrams](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/) direct within Markdown.
- Rails creator David Heinemeier Hansson has [▶️ appeared on a podcast talking about technical leadership,](https://alphalist.com/podcast/45-david-heinemeier-hansson-ruby-on-rails-creator-and-cto-at-basecamp-and-hey) asynchronous work, how Basecamp is run, Rails 7, how he _doesn't_ work on Rails full-time, and.. the productivity benefits of using Twitter less 👀
- A React developer shared some thoughts on [why they were won over by Rails](https://reviewbunny.app/blog/dont-make-me-think-or-why-i-switched-to-rails-from-javascript-spas) for building their next app.     

Jobs  

[Director of Engineering @ ButterCMS (Remote)](https://apply.workable.com/buttercms/j/C70D8C3FB5/) — Working closely with our founder and CEO, you’ll own all technology, deliver on our roadmap, and most importantly, ensure that our customers are successful. 
ButterCMS   

[Help Us Build and Shape a Tool That Thousands of Developers Use Every Day](https://buildkite.com/careers/rails-engineer) — We are a differently shaped company that values work-life balance and supports staff to work the ways that make sense for them. 
Buildkite   

[Find Ruby Jobs Through Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-rubyweekly%29&utm_content=find-your-next-job) — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers. 
Hired    

📕 Articles & Tutorials  

[Delayed Job vs. Sidekiq: Which Is Better?](https://blog.appsignal.com/2022/02/15/delayed-job-vs-sidekiq-which-is-better.html) — Two quite different approaches to a similar task: running background jobs. Delayed Job is simple and can use your existing database to store its required data. Sidekiq uses Redis but is particularly fast and scalable. 

Sapan Diwakar   

[Writing Ruby Gem Native Extensions in Rust](https://briankung.dev/2022/01/31/sneak-preview-writing-ruby-gem-native-extensions-in-rust/) — Consider this a potential sneak preview as some Ruby core members are using Rust to work on YJIT and there is a current PR to add the ability to write Rusty Ruby extensions. 

Brian Kung   

[Application Performance Monitoring, Built for Developers by Developers](https://ter.li/69in2w) 

Scout APM sponsor   

▶[Rails Authentication with Rodauth](https://www.youtube.com/watch?v=2hDpNikacf0) — If you haven’t looked at [Rodauth](https://github.com/jeremyevans/rodauth) yet, it’s a robust authentication platform that offers a load of features (normal and passwordless login, easy customization) that might just win you over from Devise. 

Janko Marohnić   

▶[Discussing How to Migrate to Rails 7](https://rubyrogues.com/how-to-migrate-to-rails-7-ruby-535) — Four Rubyists come together to discuss the techniques and tools needed to migrate apps to Rails 7, as well as their favorite Rails 7 features. _(1 hour 8 minutes.)_ 

Ruby Rogues Podcast podcast   

[What I Learned From My First Rails Upgrade](https://www.fastruby.io/blog/rails/upgrades/what-i-learned-first-rails-upgrade.html) — Initial experiences from someone working in a team specializing in upgrading Rails apps. 

Gelsey Torres   

[When I Do TDD and When I Don't](https://www.codewithjason.com/when-i-do-tdd-and-when-i-dont/) 
Jason Swett  

🛠 Code & Tools  

[UniMIDI: Realtime MIDI I/O for Ruby](https://github.com/arirusso/unimidi) — Supports macOS, Windows, and Linux and lets you work with MIDI input and output at a low level directly from Ruby. It’s been around for over a decade but now supports Ruby 3. 

Ari Russo   

[jmespath.rb: A Ruby Implementation of JMESPath](https://github.com/jmespath/jmespath.rb) — [JMESPath](https://jmespath.org/) is a query language for JSON, though can work with regular Ruby objects too. 

Rowe, Theo, et al.   

[Config 4.0: Add Multi-Environment Settings to Rails, Sinatra, and Other Ruby Projects](https://github.com/rubyconfig/config) — Using simple YAML config files, this provides a mechanism for adding a settings/configuration features to Ruby apps of all types. 

Ruby Config   

[Project Management for Software Teams Has Never Been Easier](https://shortcut.com/?utm_source=cooperRubyWeekly&utm_medium=spon_nl&utm_campaign=prospecting&utm_content=easy) — Shortcut is fast and intuitive project management built for developers. Delight the scrum gods and try it now. 

Shortcut (formerly Clubhouse.io) sponsor   

[Gemsmith v17: A CLI Tool for Smithing New Ruby Gems](https://github.com/bkuhlmann/gemsmith) — If you want to go a step beyond Bundler’s gem skeleton. 

Brooke Kuhlmann   

[GitHubOrgManager: A Manager for GitHub Organizations](https://github.com/baweaver/github_org_manager) — If your company uses a GitHub organization and you need to stay up to date with every repo in that org, this could help. 

Brandon Weaver   

[Ruby Trello API: An Implementation of the Trello API for Ruby](https://github.com/jeremytregunna/ruby-trello) — For users of the popular [Trello](https://trello.com/) list-management webapp. 

Jeremy Tregunna   

[Pundit 2.2 Released: The Pure Ruby Authorization Library](https://github.com/varvet/pundit) 
Varvet   

[Rambulance 2.2: Dynamically Render Error Pages or JSON Responses for Rails Apps](https://github.com/yuki24/rambulance) 
Yuki Nishijima   

[Elasticsearch Gem 8.0: Ruby Integrations for Elasticsearch](https://github.com/elastic/elasticsearch-ruby) 
elastic       

💡**Tip of the Week** 

   

## Adding bin dir to $PATH 

In [last week's tip](https://rubyweekly.com/issues/590), we discussed using binstubs. Instead of running `bundle exec <some executable>`, we can run a binstub directly from the `bin` directory. For instance `bin/rubocop`. 

Typing `bin/rubocop` can still feel cumbersome or leave us prone to forgetting the `bin` and making a mistake. It could be easier if we just had to run `rubocop` for instance, and our shell knew to run `bin/rubocop`. 

Operating systems use a `$PATH` environment variable to tell them where to look for executable files. (From a shell, try `echo $PATH` to see what's currently in this environment variable.) In order to get our shell to infer executables in our `bin` directory, we can add the `bin` directory to our `$PATH` variable. 

One nuance here is that we'll want our shell to recognize the `bin` directory of whatever repository we're currently in, even though we might have multiple `bin` directories in different repositories. We can do this by appending `./bin` to our `$PATH` variable. `.` means current directory, so `./bin` means the `bin` directory in our current repository. 

We can add this to our `$PATH` variable with `export PATH="./bin:$PATH"`. Breaking this down: it says to set `$PATH` to `./bin:<whatever was already in PATH>`. (Note: you might have to change this slightly for different shells.) 

However, if we do this in a shell and then exit that shell, it won't persist. To ensure it persists, we want to copy this line over to a file which runs every time we open a new shell. Depending on what shell you're using, this might be `~/.bash_profile`, `~/.bashrc`, `~/.zshrc`, or so on. Adding this line (or equivalent) means that the `bin` directory within any repository we're in will be on our `$PATH`. From now on, we can simply run `rails s`, for example, instead of `bundle exec rails s` or `bin/rails s`.    

This week’s tip was written by [Jemma Issroff](https://twitter.com/jemmaissroff).          

Curated by [Peter Cooper](https://twitter.com/peterc), [Glenn Goodrich](https://twitter.com/ruprict) and [Cooperpress](https://cooperpress.com/). 

[Change your email address](https://rubyweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://rubyweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
