Ask A Question


You’re not receiving notifications from this thread.

First open source contribution to turbo-rails

computer_smile asked in Rails


I'd like to take a crack at fixing for turbo-rails. I'm having a little trouble navigating my local setup to verify the change is working as expected. Here's what I've tried.

  1. Fork the main repo
  2. Create a sample app called blog
  3. Reference gem "turbo-rails", path: "../turbo-rails" in the local app
  4. Make the change to turbo-rails/app/assets/javascript/turbo.js

This is where I'm stuck. The change isn't reflected when I load the sample blog app. I'm fairly certain this is due to my lack of understanding in how gems and javascript builds for turbo-rails.

What file or how can I make a change to the main turbo.js code and test it out locally? Thanks in advance for taking a look.


You'll want to use to make the Javascript change. The Rails package just includes a copy of the latest Turbo for convenience so you'd want to fix it in the upstream Turbo JS package.

If you clone the Turbo repo, you can specify the Turbo package in your package.json if you set up an app using jsbundling-rails. That should be easier than trying to modify the gem's turbo.js file.


Thanks Chris. I actually see that this was referenced in If I view the code in it looks like the solution is applied.

However, when I view turbo-rails it does not have the solution applied.

Is that just because is waiting on a release? Still wrapping my head around the ecosystem and how it fits together. How would I use this latest code from in my project?


Yeah, they actually have to copy the Javascript into the turbo-rails gem periodically to keep it in sync. It's kind of annoying and I'm not sure if it's done automatically with each new release of Turbo.


Ahh thanks! That explains it 🙏

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,969+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.