# rails/rails SLOC report

> As of 2026-10-07 (commit 1782cebf58d0), rails/rails contains 308,975 total lines: 140,386 code, 116,302 comments, 52,287 blank, across 1,876 files in 12 languages (top: Ruby 87.1%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.

rails/rails has 140,386 source lines of code out of 308,975 total lines across 1,876 files, counted from the main ref at commit 1782cebf58d0 by the OctoCounts tokei engine on 2026-10-07. 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 1782cebf58d0, 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.4% of all lines, comments represent 37.6%, and the repository averages 75 code lines per file. Ruby accounts for 87.1% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| Ruby | 1,579 | 214,634 | 122,261 | 64,889 | 27,484 |
| JavaScript | 42 | 12,580 | 11,732 | 338 | 510 |
| Rakefile | 32 | 2,377 | 1,870 | 101 | 406 |
| 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,961 | 0 | 50,693 | 23,268 |
| Plain Text | 2 | 4 | 0 | 4 | 0 |

Top language (Ruby 87.1%). Generated at 2026-10-07T21:49:50.861312024+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/1782cebf58d03fbb2a18280a0b11b48a5f0e14a1?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 308,975 total lines, including 140,386 code lines, 116,302 comment lines, and 52,287 blank lines.

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

OctoCounts resolved the public GitHub repository to commit 1782cebf58d0, 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 main at commit 1782cebf58d0 on 2026-10-07T21:49:50.861312024+00:00.

## Similar repository reports

- [openc3/cosmos](https://octocounts.com/github/openc3/cosmos) — Ruby, 235,260 code lines
- [OpenC3/cosmos](https://octocounts.com/github/OpenC3/cosmos) — Ruby, 235,290 code lines
- [Homebrew/homebrew-core](https://octocounts.com/github/Homebrew/homebrew-core) — Ruby, 465,748 code lines
- [jekyll/jekyll](https://octocounts.com/github/jekyll/jekyll) — Ruby, 14,638 code lines
- [sidekiq/sidekiq](https://octocounts.com/github/sidekiq/sidekiq) — Ruby, 13,638 code lines
- [discourse/discourse](https://octocounts.com/github/discourse/discourse) — Ruby, 1,672,407 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)
