All threads / Question About Railties, rails repo and rails gems

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Question About Railties, rails repo and rails gems

johnwalker1 asked in General

I am having a hard time understanding the rails repo. Active record, railties and all others(action view, etc) are in a monorepo. rails/rails.

They are all separate gems as well? Can someone explain this to me? Each action/active is a gem & available on rubygems.

Or is the rails repo /activerecord boilerplate to connect to the actual gem?

Tldr: what's the difference between activerecord gem and the folder that sits in rails repo titled "activerecord"?

Thanks!

Edit: it looks like the individual gems (activerecord) is not on rubygems. Now I am more confused. When I run "bundler list" it treats each one as a separate gem. Why is this?

It is a bit strange, but yes, they do use it as a monorepo. All the code for ActiveRecord is in the activerecord folder and so on. Each of those folders is a gem and gets published along with the Rails release. https://rubygems.org/gems/activerecord

The reason they do this is because they have to coordinate releasing all these gems at the same time with each new Rails release. This helps keep things consistent since they can keep track of it all in one place. Rails 6.1 can release updates for every gem with one command since it's all in the same repo.

Join the discussion

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

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

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

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.