TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Building GitHub with Ruby on Rails

660 pointsby Lukas_Skywalkerabout 2 years ago

40 comments

samwillisabout 2 years ago
GitHub running off the main branch is fascinating, and initially sounds mad, but makes so much sense. Assuming they have very high test coverage, running against mainline Rails isn&#x27;t really any different to having the fork they had before, but they have more influence on future development.<p>It must also be a massive boon for the Rails ecosystem to have such a large property running off the head.<p>Doesn&#x27;t anyone know of any Django shops that do the same, running off mainline?
评论 #35483355 未加载
评论 #35479535 未加载
评论 #35486407 未加载
评论 #35479670 未加载
评论 #35481194 未加载
评论 #35479362 未加载
评论 #35479697 未加载
dagorenoufabout 2 years ago
I built my startup 4 years ago with a combination of react + aws + gatsby + hasura. I thought this would be great for performance and scale. Fast forward to today, I spend at least 2x as much time to code a feature than if I had just stuck with a simple rails stack, and the scale I imagined never happened. Now rebuilding everything with rails so I can ship faster and focus on growing the product, not making engineering prowesses.
评论 #35480069 未加载
评论 #35480202 未加载
评论 #35481104 未加载
评论 #35481616 未加载
upmostlyabout 2 years ago
I absolutely love Rails. I&#x27;ll always remember back in 2010 catching the train to Waterloo station in London and seeing a huge sign overlooking the train tracks that read something like &quot;We Need Rails Developers&quot;.<p>Rails was such a huge part of my professional career.<p>Now, 13 years later and I&#x27;m deep in the JavaScript ecosystem and have been for 8 years.<p>The most exciting thing to come out of this ecosystem recently is RedwoodJS, because it takes a lot of inspiration from Rails.
评论 #35480390 未加载
评论 #35482693 未加载
评论 #35479213 未加载
评论 #35482270 未加载
评论 #35479610 未加载
评论 #35491477 未加载
评论 #35479364 未加载
评论 #35490108 未加载
评论 #35482950 未加载
uptownJimmyabout 2 years ago
I like GitHub, fwiw. I am not someone who requires everything to be perfect, and I&#x27;ve learned to be tolerant of our human reality, where imperfection is the norm.<p>But GitHub is not a great Web app. It is frequently&#x2F;constantly out of sync with the latest data&#x2F;status. You quickly develop the habit of manually refreshing the page every time you are preparing to do anything with a PR, and that&#x27;s not something that should be necessary these days.<p>It surprises me to see a loud and proud blog post detailing GitHub&#x27;s process of staying so relentlessly up to date with the latest and greatest version of Rails: the app is not properly responsive, for whatever reason, and to a degree that would not be tolerated where I have worked. I would rather read about how they are trying to fix this issue.
评论 #35481270 未加载
评论 #35483457 未加载
ksecabout 2 years ago
And as I have said before but worth repeating again, Rails is perhaps the only open source framework that is being battle tested in development at scale. It may not be the fastest ( or in fact quite slow ), but I dont think you could find similar testing being done and Deployed at the scale of Github on any other framework.<p>I wonder if Eileen Uchitelle will bring this practice to Shopify as well? Edit: It seems [1] Shopify is also running on latest Ruby and Rails version as well.<p>[1] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=35481352" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=35481352</a>
评论 #35486530 未加载
评论 #35483806 未加载
评论 #35482853 未加载
评论 #35488248 未加载
评论 #35484187 未加载
评论 #35488341 未加载
pvsukale3about 2 years ago
It is so nice to have the latest releases of both Ruby and Rails run in production as soon as they are released. Huge for indie developers and small teams that use Rails. Kudos to Shopify too, who are working on improving Ruby tooling a lot recently. Exciting time to be a Rails dev.
snemvaltsabout 2 years ago
Github is one of the few webapps where I can feel <i>daily</i> that the framework used isn&#x27;t enough. So many things get out of sync&#x2F;not up to date, which are fixed by refreshing the page.
评论 #35479972 未加载
评论 #35479699 未加载
评论 #35479629 未加载
评论 #35480035 未加载
评论 #35479701 未加载
评论 #35481715 未加载
Intrepiddabout 2 years ago
Working with Ruby and Rails since 2010 and absolutely loving it. Never ever looking back.
nomilkabout 2 years ago
&gt; Instead of telling your team you found something in Rails that will be fixed in the next release, you can work on something in Rails and see it the following week!<p>That&#x27;s awesome. Not only fixing it for your team but the entire rails world.
评论 #35482327 未加载
holistioabout 2 years ago
We are also running on Rails - and loving it, too.<p>However, incorporating this methodology into our workflow would be both a lot of work to set up and also a lot of work to keep running.<p>There certainly is a size threshold under which this is clearly an overkill and we are under that threshold.<p>Yet, if this could be turned into a product, a clean integration, a command I need to run... would definitely use it (and pay for it).
评论 #35479135 未加载
评论 #35479517 未加载
评论 #35479393 未加载
mo_po2about 2 years ago
Going a bit of topic, Arch Linux does mostly the same, and thanks to it all of its users are direct testers&#x2F;reporters of unpatched projects, with the exception of a few minor patches related to chore in projects that don&#x27;t allow to customize it (mostly paths). I guess that this has probably improved the overall health of Linux beyond Arch itself during the last 2 decades for similar reasons to the ones provided in this article.
评论 #35480213 未加载
didipabout 2 years ago
I must be the only person on Hacker News who dislike Ruby.<p>It simply has too much magic and doesn&#x27;t offer enough abilities (unlike Elixir or any Scheme variant) to justify the dynamic type nature.<p>Go and Rust are perfect for me (and maybe Zig?). They covered everything I need.
评论 #35485413 未加载
评论 #35486167 未加载
评论 #35483954 未加载
评论 #35485275 未加载
TheRealDunkirkabout 2 years ago
I&#x27;ve been using Rails and GitHub since the first 2.x days. I have been expecting an announcement that they are switching to .NET since Microsoft bought them. I&#x27;m guessing it&#x27;s too big of a bite, even for Microsoft, thank Ada. I love being able to point recalcitrant policy makers at my company at GitHub as an example of a top web app -- the context for which they already know very well -- being a Rails monolith.<p>I&#x27;d love to see their Gemfile.
评论 #35483395 未加载
hmontazeriabout 2 years ago
Ruby and Rails are the single reasons why my previous startup worked out. We had a small engineering team and had to move incredibly fast. Without the magic we wouldn’t have been able to ship at insane speed. I tattooed the ruby logo on my arm as this was an absolute life changer for me. Having financial freedom now lets me spend so much time with my kids. I’ll be forever grateful.
评论 #35491495 未加载
Zanfaabout 2 years ago
It&#x27;s been interesting looking into their &quot;leaked&quot; source to see how the application is architected. It&#x27;s surprisingly accessible given the overall size.
评论 #35479540 未加载
exabrialabout 2 years ago
I think the big lesson here is writing excellent tests and making them easy to execute makes your code easier to change fear of breaking something.<p>Unfortunately I’m fairly certain the message that will be heard is ‘We should totally change something around on the customer every week, that’s what GitHub does’
larussoabout 2 years ago
&gt; Ultimately, if more companies treated the framework as an extension of the application, it would result in higher resilience and stability. Investment in Rails ensures your foundation will not crumble under the weight of your application. Treating it as an unimportant part of your application is a mistake and many, many leaders make this mistake<p>I really like the sentiment of this quote but that is an easy thing to say for a behemoth like GitHub.<p>I find these blog posts from google, meta, aws etc super awesome since they run and solve problems smaller companies simply don’t have. And they shape how smaller companies solve similar issue at smaller scale. But doing a setup to be practically on bleeding edge rails for example is not something every company can afford. They need LTS releases and the sorts. Still awesome that they managed to achieve this.
politelemonabout 2 years ago
Good post and an interesting glimpse into the behind-the-scenes efforts that goes into maintaining Github.<p>I cannot agree with the &quot;Should I do it too?&quot; section. It probably works very well for an org as large and dedicated as Github, it very likely makes a lot of sense for what they do at the scale they do it at.<p>For most of us that are <i>consumers</i> of technologies and frameworks, treating the framework as an extension of an application stack, as the blog has outlined, is a terrible idea; it requires devoting time and effort towards its upkeep, and that is not our core business, nor should it be.<p>That does not, however, mean it&#x27;s being treated as an unimportant part of the application stack, and implying so is judgmental. It&#x27;s importance is that you need to be careful about the tech choices you make and understand what the implications will be down the line.
评论 #35479565 未加载
评论 #35479445 未加载
评论 #35479532 未加载
评论 #35480139 未加载
elifabout 2 years ago
I wonder how much they end up having to unit test gems they use, and how much they have to maintain gem compatibility for those maintainers..<p>I have to imagine this leads to either GitHub being the defacto lead maintainers for those gems, or GitHub removing gems from their stack and writing their own code.
danforddotdevabout 2 years ago
I&#x27;m curious what their data access layer looks like underneath that monolith. Is the Rails piece mostly now just a frontend for dozens of other services, properly owned and maintained by other teams? I don&#x27;t mean to trivialize something that&#x27;s obviously huge and complex as &quot;just a frontend&quot;, but IME one of the biggest things that breaks down in a Rails monolith as it scales is heavy, direct usage of ActiveRecord. Either there&#x27;s lots of DB migrations happening since there&#x27;s so many different developers working on different features, which makes development with a shared DB tricky, or the scale makes DB performance problems hard to diagnose since they cut across many teams or tables in complicated ways.
评论 #35483021 未加载
评论 #35482745 未加载
hakreabout 2 years ago
Some of their points which reminded me I consider working well, also for smaller teams.<p>* Parallel builds&#x2F;CI to look into the near future: current + next. When time is due current and next need to become green and the next alpha becomes future, which is allowed to fail (3 parallel tracks: current, next and future). Keeps all your build tools en par early, too, so there is less rot, and one team can concentrate on the migration while other teams aren&#x27;t interrupted by that, but also for a single or only a handful of developers, you can have better change management (at the cost of the extra computing power).<p>* It feels less a monolith, if its in a dynamic language (not compiled &#x2F; transpilled &#x2F; linked) and in many files (there is little to build and deployments are smaller and faster). In such projects, increments are possible across multiple axis in a synchronized dance.<p>* Pipeline everything and continuously shift left. Identify the most important improvements and if they can step-break the process well, apply the earliest one coming from the developer perspective. Any such change will speed up any change after that step.<p>* Implement fast turn-around with the parts that change often so you can change them often well. Cooperate well with upstream, this is most often a key to ongoing success.<p>* Distributing traffic over multiple application servers and being able to deploy different configurations &#x2F; revisions and directing part of the traffic to it is invaluable. Have your tools&#x2F;systems configured well to make it easy and comfortable to do this way. Production must not feel like an all or nothing game any longer, but serves as experimental playground.
compumikeabout 2 years ago
Even as a much smaller team, building Heii On-Call [0] as a lightweight alerting&#x2F;monitoring&#x2F;on-call rotations SaaS based on Ruby on Rails has basically been a pleasure!<p>And as the article highlights, perhaps the key reason for smooth deployments and upgrades is that the CI testing story is so, so good: RSpec [1] plus Capybara [2] for us. That means we have decently extensive tests of just about all behavior. The few small Rails and Ruby upgrades we&#x27;ve done have gone quite smoothly and confidently, with usually just a few non-Rails gem dependencies needing to be manually updated as well.<p>The &quot;microservices&quot; story is where we&#x27;ve pulled in the Crystal programming language [3] to great effect. After dabbling with Go and Rust, we&#x27;ve found that Crystal is truly a breath of fresh air. Crystal powers the parts of Heii On-Call that need to be fast and low-RAM, specifically the inbound API <a href="https:&#x2F;&#x2F;api.heiioncall.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;api.heiioncall.com&#x2F;</a> and the outbound HTTP(S) prober background processes. I&#x27;ve ported some shared utility classes from Ruby to Crystal almost completely by just copy-and-pasting ___.rb to ___.cr; porting the tests for those classes was far more onerous than porting the class code itself. (Perhaps another point of evidence toward the superiority of RoR&#x27;s testing story...)<p>The front-end story is nice but just a bit weaker. Using Hotwire &#x2F; Turbo successfully, but I have an open PR to fix a fairly obvious stale cache bug in Turbo [4] that has been sitting unloved for nearly a month, despite other users reporting the same issue. I&#x27;m hopeful that it will get merged in the next release, but definitely less active than the backend side.<p>For me, the key conclusion is that the excellent Ruby on Rails testing story is what enables everything to go a lot more smoothly and have such a strong foundation. I&#x27;d be curious if any GitHubbers can talk more about whether they too are using Rspec+Capybara or something else? Are there internal guidelines for test coverage?<p>[0] <a href="https:&#x2F;&#x2F;heiioncall.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;heiioncall.com&#x2F;</a><p>[1] <a href="https:&#x2F;&#x2F;rspec.info&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rspec.info&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;teamcapybara&#x2F;capybara">https:&#x2F;&#x2F;github.com&#x2F;teamcapybara&#x2F;capybara</a><p>[3] <a href="https:&#x2F;&#x2F;crystal-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;crystal-lang.org&#x2F;</a><p>[4] <a href="https:&#x2F;&#x2F;github.com&#x2F;hotwired&#x2F;turbo&#x2F;pull&#x2F;895">https:&#x2F;&#x2F;github.com&#x2F;hotwired&#x2F;turbo&#x2F;pull&#x2F;895</a>
评论 #35481671 未加载
stevebmarkabout 2 years ago
This is a very interesting cautionary tail for those who recommend Rails because Github uses it. It&#x27;s hard to imagine another core framework where the &quot;best&quot; way to use it is to dedicate an entire department to continuously working off the bleeding edge. And if you read between the lines, changes that Github needs to make are within Rails itself, and as we know there are core Ruby and Rails maintainers working at Github. This is a cautionary tale because of how much overhead Github needs to make this work. If your company has the klout to hire core Rails maintainers and the staff to be able to focus on working off the main branch of one of your framework dependencies, then go for it!<p>You should also read about Github&#x27;s history with &quot;Rails&quot; and how challenging it was for them to make it fast enough for them and upgrade it. It&#x27;s pretty interesting they got around that &quot;challenge&quot; by throwing a LOT more resources at it. It&#x27;s interesting because this isn&#x27;t usually a challenge with other major framework upgrades. It makes sense you would need this much investment given the hyper-dynamic dangers of Ruby (not just the language, but the ecosystem), making it difficult and risky to upgrade.<p>TL;DR the advice in this blog post does not seem applicable to most companies.
suralindabout 2 years ago
This make so much sense, I think every company should update deps frequently and Dependabot and other services like that can help with that. It probably would be too costly to attempt what GH is doing for smaller orgs.
qrushabout 2 years ago
Absolutely love this approach and I think it makes a ton of sense for an open source focused company - however I haven&#x27;t seen this approach in any company I&#x27;ve worked for in 15 years (where I have helped with most of the Rails upgrades!).<p>There&#x27;s a ton of merit to being on the latest release or close to it so you can get the latest security patches easier. The diff between that and the latest `main` branch seems like it has diminishing returns for most orgs.
MiraiYabout 2 years ago
meanwhile, i have to work on a rails 3.2 app with ruby 2.2
评论 #35479360 未加载
评论 #35480342 未加载
评论 #35481586 未加载
评论 #35480296 未加载
评论 #35479927 未加载
benatkinabout 2 years ago
I&#x27;ve been using Codeberg, which uses Forgejo which is written in Go and is fast and light.<p>Fantastic that GitHub has managed to wrangle so many lines of code in a language I don&#x27;t care very much for, but my Samsung A53&#x27;s browser is snappier without it :)<p>Edit: to be fair, GitHub&#x27;s has a hamburger menu that morphs to an X that I dearly miss. JK :P
评论 #35489198 未加载
Scarbuttabout 2 years ago
Is that two millions LOC for a single Rails application or across various Rails applications?
评论 #35479374 未加载
评论 #35483480 未加载
评论 #35479130 未加载
评论 #35479140 未加载
评论 #35479118 未加载
alberthabout 2 years ago
&gt; <i>Every Monday a scheduled GitHub Action workflow triggers an automated pull request, which bumps our Rails version to the latest commit on the Rails main branch for that day.</i><p>That’s a bold move to do as opposed to being end of week or weekend.
评论 #35481356 未加载
评论 #35481364 未加载
评论 #35481767 未加载
aledalgrandeabout 2 years ago
This is awesome, now I just wish they spruced up their UI with Hotwire :p How many times have you clicked the back button and found the same notifications unread?
insane_dreamerabout 2 years ago
Oh, and here I was told that RoR is only for quick-and-dirty prototyping and that &quot;real&quot; web applications are written in ___ (fill in blank)
cutlerabout 2 years ago
I dunno. I lived through Internet Explorer, SCO and Linux patent lawsuit days so I reckon it&#x27;s only a matter of time before Github goes ASP.Net.
评论 #35481502 未加载
评论 #35483898 未加载
funnyfoobarabout 2 years ago
How does the current Architecture of Github looks like, Apart from Rails, I have heard that they use Go as well.
rethababout 2 years ago
&gt; scheduled GitHub Action workflow<p>..sounds like they&#x27;re not dogfooding dependabot? curious if anybody knows more&#x2F;why
评论 #35488672 未加载
评论 #35482382 未加载
评论 #35481347 未加载
thih9about 2 years ago
&gt; Every Monday a scheduled GitHub Action workflow triggers an automated pull request, which bumps our Rails version to the latest commit on the Rails main branch for that day.<p>So uploading code to a github repo makes github server execute it later on. I wonder if this would qualify for a bug bounty... &#x2F;s<p>Edit: I guess not, since this is just a pull request and still requires approval before merging to main. I assume.
评论 #35480938 未加载
评论 #35480951 未加载
trevor-eabout 2 years ago
Does anyone know if Github uses Sorbet for their Ruby and Rails code?
评论 #35486779 未加载
surteenabout 2 years ago
Are there other languages where the dominant web framework changes so much? Will Rails ever be &quot;done&quot;?
评论 #35481745 未加载
评论 #35481253 未加载
评论 #35481255 未加载
评论 #35491338 未加载
peter_retiefabout 2 years ago
Another big rails application was twitter, it has been rewritten but the concept fitted well with rails. Twitter currently uses some java framework as far as I know. Question, does twitter still have some RoR deployed?
qntmfredabout 2 years ago
Every time it&#x27;s pointed out that GitHub is a rails app I am reminded of one of my favorite security exploits ever<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=3663197" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=3663197</a>
mrwnmonmabout 2 years ago
All the cool kids left Ruby for Go, why are they still in that land?
评论 #35481015 未加载
评论 #35480528 未加载