Drop any file to identify it
No upload. No signup. No sending your file halfway across the internet.
We tell you what it is, right here in your browser.
Drop it!
Let go to identify this file.
Couldn't identify this file
Need to convert it? fwip it →
Every Ruby project past hello-world has a Gemfile at its root. It's Ruby's equivalent of `package.json` (Node), `requirements.txt` (Python), or `Cargo.toml` (Rust): a single file declaring which gems (Ruby libraries) the project depends on. Bundler reads this file, resolves a compatible set of versions, installs them, and writes the resolved versions to a Gemfile.lock that locks the entire dependency tree.
The syntax is a Ruby DSL — yes, the Gemfile is itself executable Ruby code. `source 'https://rubygems.org'` at the top declares the gem registry. `gem 'rails', '~> 7.1'` adds Rails with a pessimistic version constraint (>= 7.1, < 8.0). Gems can be grouped (`group :development, :test do ... end`) so production deploys skip dev-only dependencies. Versioned operators include `~>` (pessimistic), `>=` (minimum), and `=` (exact).
Gemfile and Gemfile.lock both belong in version control for applications. Gemfile.lock pins exact versions across machines so `bundle install` produces identical environments everywhere. `bundle update` upgrades dependencies within the constraints in Gemfile and rewrites the lock file. The pair is foundational to Ruby — every Ruby tool (Rails, Sinatra, Jekyll, Sidekiq) assumes you're using Bundler. The CLI is `bundle install`, `bundle exec`, `bundle update`.