Ruby on Rails vs Sinatra: source lines of code compared

This page compares the source lines of code (SLOC) of rails/rails and sinatra/sinatra 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-08-26, rails/rails contains 303,718 total lines (137,418 code) across 1,862 files, while sinatra/sinatra contains 19,526 total lines (10,079 code) across 147 files as of 2026-08-26. rails/rails is about 14x the size of sinatra/sinatra by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

Metricrails/railssinatra/sinatra
Files1,862147
Total lines303,71819,526
Code lines137,41810,079
Comment lines114,9196,024
Blank lines51,3813,423
Languages counted128

Top languages in rails/rails: Ruby (86.9% of code), JavaScript (8.5% of code), Rakefile (1.3% of code). Top languages in sinatra/sinatra: Ruby (95.7% of code), Rakefile (3.0% of code), Ruby HTML (0.6% of code). Ruby, Rakefile, Ruby HTML appear in both top language lists; JavaScript, Sass appear only in rails/rails's top languages; YAML, Haml appear only in sinatra/sinatra's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. rails/rails was counted at ref main (commit 0ffca96a3ce5) on 2026-08-26; sinatra/sinatra was counted at ref main (commit cb22afd7902b) on 2026-08-26. See the counting methodology for ignored directories and analysis options.

Evidence and next steps:

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

Compare FAQ

Which has more lines of code, rails/rails or sinatra/sinatra?

rails/rails has more code: 137,418 code lines versus 10,079 for sinatra/sinatra, about 14x as much, based on cached OctoCounts reports as of 2026-08-26.

Does more source lines of code mean more complexity?

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 rails/rails, sinatra/sinatra, or any repository.

How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. rails/rails was counted at ref main (commit 0ffca96a3ce5) on 2026-08-26; sinatra/sinatra was counted at ref main (commit cb22afd7902b) on 2026-08-26. See the counting methodology for ignored directories and analysis options.

Can I compare a different branch, tag, or commit?

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.