# rails/rails SLOC report

> As of 2026-09-17 (commit 6b52f384babc), rails/rails contains 305,333 total lines: 138,140 code, 115,654 comments, 51,539 blank, across 1,866 files in 12 languages (top: Ruby 86.9%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.

rails/rails has 138,140 source lines of code out of 305,333 total lines across 1,866 files, counted from the 6b52f384babca028b0e4e63651c2e634f123a2cd ref at commit 6b52f384babc by the OctoCounts tokei engine on 2026-09-17. The report is cached by commit, tokei version, and analysis options, so recounting the same revision returns exactly these numbers.

OctoCounts produced this report by resolving rails/rails to commit 6b52f384babc, downloading the repository source archive, and counting every source file with tokei, the open-source line counter written in Rust. The table below breaks the count down by programming language into files, total lines, code lines, comment lines, and blank lines, so the figures can be compared across languages and projects. Results are cached by commit, tokei version, and analysis options, so counting the same revision again reproduces exactly these numbers.

## Repository size insights

This is a large codebase by counted code lines. Code represents 45.2% of all lines, comments represent 37.9%, and the repository averages 74 code lines per file. Ruby accounts for 86.9% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| Ruby | 1,569 | 211,646 | 120,039 | 64,686 | 26,921 |
| JavaScript | 42 | 12,580 | 11,732 | 338 | 510 |
| Rakefile | 32 | 2,349 | 1,846 | 101 | 402 |
| Sass | 6 | 2,047 | 1,617 | 119 | 311 |
| Ruby HTML | 66 | 1,564 | 1,367 | 2 | 195 |
| YAML | 9 | 753 | 610 | 123 | 20 |
| CSS | 4 | 501 | 422 | 23 | 56 |
| HTML | 5 | 369 | 329 | 3 | 37 |
| JSON | 4 | 138 | 138 | 0 | 0 |
| SVG | 24 | 47 | 40 | 7 | 0 |
| Markdown | 103 | 73,335 | 0 | 50,248 | 23,087 |
| Plain Text | 2 | 4 | 0 | 4 | 0 |

Top language (Ruby 86.9%). Generated at 2026-09-17T15:31:20.246987341+00:00. Canonical report: https://octocounts.com/github/rails/rails

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/rails/rails/commit/6b52f384babca028b0e4e63651c2e634f123a2cd?analysis=%7B%22ignoredDirs%22%3A%5B%5D%2C%22ignoredLanguages%22%3A%5B%5D%2C%22profile%22%3A%22default%22%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22includeGenerated%22%3Afalse%7D).

## Report FAQ

### How many lines of code does rails/rails have?

rails/rails has 305,333 total lines, including 138,140 code lines, 115,654 comment lines, and 51,539 blank lines.

### How was the rails/rails line count measured?

OctoCounts resolved the public GitHub repository to commit 6b52f384babc, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.

### What commit was counted for rails/rails?

This OctoCounts report was generated from 6b52f384babca028b0e4e63651c2e634f123a2cd at commit 6b52f384babc on 2026-09-17T15:31:20.246987341+00:00.

## Similar repository reports

- [rubygems/bundler](https://octocounts.com/github/rubygems/bundler) — Ruby, 48,869 code lines
- [openc3/cosmos](https://octocounts.com/github/openc3/cosmos) — Ruby, 227,540 code lines
- [jekyll/jekyll](https://octocounts.com/github/jekyll/jekyll) — Ruby, 28,177 code lines
- [sidekiq/sidekiq](https://octocounts.com/github/sidekiq/sidekiq) — Ruby, 13,599 code lines
- [sinatra/sinatra](https://octocounts.com/github/sinatra/sinatra) — Ruby, 10,079 code lines
- [ramsayleung/bayes_spam_sniper](https://octocounts.com/github/ramsayleung/bayes_spam_sniper) — Ruby, 6,701 code lines

## Related OctoCounts pages

- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Django vs Ruby on Rails](https://octocounts.com/compare/django-vs-rails)
- [Laravel vs Django](https://octocounts.com/compare/laravel-vs-django)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [OctoCounts API docs](https://octocounts.com/docs/api)
