The Django vs Ruby on Rails comparison on OctoCounts shows side-by-side source line counts for django/django and rails/rails, counted under the rules and on the dates stated below: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.
This page compares the source lines of code (SLOC) of django/django and rails/rails using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.
As of 2026-11-13, django/django contains 559,950 total lines (406,055 code) across 3,631 files, while rails/rails contains 321,476 total lines (144,543 code) across 1,894 files as of 2026-11-16. django/django has about 2.8x the counted code lines of rails/rails under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.
| Metric | django/django | rails/rails |
|---|---|---|
| Files | 3,631 | 1,894 |
| Total lines | 559,950 | 321,476 |
| Code lines | 406,055 | 144,543 |
| Comment lines | 45,803 | 123,051 |
| Blank lines | 108,092 | 53,882 |
| Languages counted | 17 | 13 |
Top languages in django/django: PO File (59.3% of code), Python (32.1% of code), Modelica (5.5% of code). Top languages in rails/rails: Ruby (87.4% of code), JavaScript (8.1% of code), Rakefile (1.3% of code). JavaScript appears in both top language lists; PO File, Python, Modelica, CSS appear only in django/django's top languages; Ruby, Rakefile, Sass, Ruby HTML appear only in rails/rails's top languages.
Methodology: both counts come from cached OctoCounts reports generated with tokei. django/django was counted at ref main (commit f24f38c6b282) on 2026-11-13; rails/rails was counted at ref main (commit ed17c90871d2) on 2026-11-16. See the counting methodology for ignored directories and analysis options.
Both reports use the same engine and effective counting rules. Repository declarations, when enabled, are specific to each repository. django/django: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed. rails/rails: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.
Background observations recorded on 2026-09-16; language descriptions here are historical context, not claims about the current filtered shares. Use this page's measured language breakdown for current counts. Repository layout before counting filters: django/django is the Django framework repository — the Python web framework, its bundled contrib apps, documentation source, and test suite. rails/rails is the Ruby on Rails repository — the Rails framework's core components (Active Record, Action Pack, and the other constituent modules) with their tests. Both repositories are full web-framework source trees, counted on the dates shown above.
The language tables make the comparison structurally simple: Django's counted tree is Python, and Rails' counted tree is Ruby, so the totals measure two framework codebases in their respective implementation languages.
Framework repository size does not predict application performance or development speed for your project: a production app adds its own code, third-party gems/packages, and configuration on top of a small subset of the framework.
Sources: django/django repository · rails/rails repository. Statements verified 2026-09-16.
Evidence and next steps:
Saved reports remain subject to cache cleanup and replacement. Export their JSON for durable citation; live report URLs can change.
Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.
As of 2026-11-13, django/django contains 559,950 total lines (406,055 code) across 3,631 files, while rails/rails contains 321,476 total lines (144,543 code) across 1,894 files as of 2026-11-16. django/django has about 2.8x the counted code lines of rails/rails under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.
Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for django/django, rails/rails, or any repository.
Methodology: both counts come from cached OctoCounts reports generated with tokei. django/django was counted at ref main (commit f24f38c6b282) on 2026-11-13; rails/rails was counted at ref main (commit ed17c90871d2) on 2026-11-16. See the counting methodology for ignored directories and analysis options.
Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.