On this page
Overview
Shrine is a file-attachment toolkit for Ruby applications. It streams uploads and downloads to FileSystem, S3, and other storage backends, while plugins add metadata, validation, processing, direct and resumable uploads, background jobs, and ActiveRecord or Sequel integration. The current version is 3.10.0.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Separate temporary cache from permanent storage and stream file transfers
Applications can use separate cache and store backends and upload IO objects to FileSystem, S3, and other storage engines. Streaming upload and download paths help keep memory usage bounded for larger files.
Add validation, metadata, derivatives, direct uploads, and backgrounding through plugins
Plugins cover MIME and dimension metadata, validation, image derivatives, presigned/direct/resumable uploads, background processing, and ActiveRecord or Sequel persistence. Version 3.10.0 adds fallback storage and a pre-decode size limit for data URIs.
Best fit
Fits Ruby applications that need to connect uploads, cloud storage, processing, and record lifecycle
Shrine is useful for image, video, and document workflows that need to move beyond synchronous request-local uploads and combine cloud storage, background processing, direct uploads, and ORM persistence incrementally.
Sources: [2]
Before adoption
Shrine 3.10.0 requires Ruby 3.2+; design storage permissions, MIME validation, path safety, and upload limits explicitly
The gemspec requires Ruby 3.2 or newer. Version 3.8.0 hardened FileSystem storage against path traversal, and 3.10.0 adds a data-URI size check before decoding. Do not trust client Content-Type alone; use metadata analysis and validation, and define storage credentials, object visibility, maximum file sizes, and direct-upload policy.
Official sources
- [1]shrinerb/shrine — GitHub repository(2026-10-06)
- [2]Shrine — README(2026-10-06)
- [3]Shrine — version source(2026-10-06)
- [4]Shrine — shrine.gemspec(2026-10-06)
- [5]Shrine — CHANGELOG(2026-10-06)
- [6]Shrine — MIT License(2026-10-06)
Supplemental curator note
Shrine keeps file uploads modular instead of forcing one fixed workflow. Treat MIME detection, file-size limits, storage permissions, and path safety as explicit application policies when combining storage, processing, ORM, and direct-upload plugins.
Try it in 3 steps
- 1
Get the source
git clone --depth 1 https://github.com/shrinerb/shrine.git - 2
Enter the repository
cd shrine - 3
Check the official steps
Continue with the commands in the README Installation, Quick Start, or Getting Started section.
find . -maxdepth 1 -iname 'README*' -exec sed -n '1,220p' {} \; -quit
Growth
Growth trends · Last 30 days
3,285 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 3
- Open PRs
- 1
Development activity is still being collected.
Built with
Categories and tags
Tags
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- file-upload
- ruby
- rack
- storage
- attachment
- filesystem
- s3
- background-jobs
- direct-upload
- orm
- metadata
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- PaperTrail7,030 Stars
1 shared tag(s) · 2 shared category(s) · Same language
Store ActiveRecord model changes as version records for auditing, reification, and history
Ruby - Hanami6,422 Stars
1 shared tag(s) · 2 shared category(s) · Same language
Compose maintainable Ruby applications from focused router, action, view, database, and asset components
Ruby - Ransack5,858 Stars
1 shared tag(s) · 2 shared category(s) · Same language
add searching, filtering, and sorting to ActiveRecord-backed Rails apps without a separate search service
Ruby - AASM5,228 Stars
1 shared tag(s) · 2 shared category(s) · Same language
model states, events, and transitions as finite state machines in plain Ruby and ORM-backed classes
Ruby - factory_bot_rails3,139 Stars
1 shared tag(s) · 2 shared category(s) · Same language
Integrate Factory Bot with Rails through automatic factory loading, generators, and file fixtures
Ruby - Jekyll51,708 Stars
1 shared tag(s) · 1 shared category(s) · Same language
generate blog-aware static sites from Markdown and Liquid
Ruby
Report incorrect information
Tell us if any listing information is incorrect or outdated.