Skip to content

Instantly share code, notes, and snippets.

@dhh
Created June 24, 2020 22:23
Show Gist options
  • Save dhh/782fb925b57450da28c1e15656779556 to your computer and use it in GitHub Desktop.
Save dhh/782fb925b57450da28c1e15656779556 to your computer and use it in GitHub Desktop.
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
gem 'mysql2'
gem 'sqlite3' # Used for asset generation in BK
gem 'redis', '~> 4.0'
gem 'redis_connectable', github: 'basecamp/redis_connectable'
gem 'redis-namespace'
gem 'connection_pool'
gem 'image_processing', '~> 1.2'
gem 'puma', '>= 4.3.3', github: 'puma/puma'
# JavaScript and assets
gem 'webpacker', '~> 5.1.1'
gem 'sprockets', github: 'rails/sprockets'
gem 'sprockets-rails', github: 'rails/sprockets-rails'
gem 'jbuilder', '~> 2.9', '>= 2.9.1', github: 'rails/jbuilder'
gem 'sassc-rails', '~> 2.1'
gem 'sassc', '<= 2.1'
gem 'local_time', '~> 2.0'
gem 'turbo', github: 'basecamp/turbo'
# Security
gem 'bcrypt', '~> 3.1.7'
gem 'pwned', '~> 2.0'
gem 'rotp'
gem 'webauthn'
gem 'rack-ratelimit', github: 'jeremy/rack-ratelimit'
# Jobs
gem 'resque', '~> 2.0.0'
gem 'resque-multi-job-forks', '~> 0.5'
gem 'resque-pool', github: 'nevans/resque-pool'
gem 'resque-scheduler', github: 'resque/resque-scheduler'
gem 'resque-pause', github: 'basecamp/resque-pause'
gem 'resque-web', require: 'resque_web'
gem 'resque-scheduler-web', github: 'mattgibson/resque-scheduler-web'
gem 'sinatra', github: 'sinatra/sinatra'
# Storage
gem 'aws-sdk-s3', '~> 1.48.0'
gem 'activestorage-redundancy', github: 'basecamp/activestorage-redundancy'
gem 'activestorage-office-previewer', '~> 0.1'
# Search
gem 'elasticsearch-model', github: 'elastic/elasticsearch-rails', branch: '6.x'
gem 'elasticsearch-rails', github: 'elastic/elasticsearch-rails', branch: '6.x'
gem 'html_scrubber', github: 'basecamp/html_scrubber'
# Push notifications
gem 'aws-sdk-pinpoint'
# Monitoring
gem 'easymon', '~> 1.4.2'
gem 'sentry-raven'
# Logging/instrumentation
gem 'rails_structured_logging', github: 'basecamp/rails-structured-logging'
gem 'full_request_logger', github: 'basecamp/full_request_logger'
gem 'critter', '~> 0.3.0', github: 'basecamp/critter', require: false
gem 'activejob-stats', github: 'basecamp/activejob-stats'
# Profiling/troubleshooting
gem 'rbtrace'
gem 'stackprof'
gem 'rack-mini-profiler'
gem 'flamegraph'
# Queenbee
gem 'queenbee', github: 'basecamp/queenbee-plugin'
gem 'actionpack-xml_parser'
gem 'countries'
# vCard parsing
gem 'pdi', github: 'basecamp/pdi', branch: 'utf-8-default'
# Supervised rails console in production environments
gem 'console1984', github: 'basecamp/console1984'
# Other
gem 'rake', github: 'ruby/rake'
gem 'platform_agent'
gem 'useragent', github: 'basecamp/useragent'
gem 'geared_pagination', '>= 1.0.0'
gem 'rqrcode'
gem 'base32'
gem 'httparty'
gem 'bootsnap', '>= 1.4.2', require: false # Reduces boot times through caching; required in config/boot.rb
gem 'rspamd', github: 'basecamp/rspamd-ruby'
gem 'redis_object', github: 'basecamp/redis_object'
gem 'ruby-progressbar', require: false
gem 'rinku', require: 'rails_rinku'
gem 'active_record_encryption', github: 'basecamp/active_record_encryption'
gem 'simpleidn'
group :development, :test do
gem 'byebug'
gem 'break'
gem 'spring'
# Code critics
gem 'rubocop', '>= 0.72', require: false
gem 'rubocop-performance', require: false
gem 'rubocop-rails', require: false
gem 'scss_lint', '~> 0.50', require: false
gem 'bundler-audit', '~> 0.4', github: 'basecamp/bundler-audit', branch: 'thor-bump', require: false
gem 'brakeman', '>= 4.0', require: false
gem 'benchmark-ips', require: false
end
group :development do
gem 'web-console'
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'faker', require: false
# Deploys, local CI
gem 'haybales', github: 'basecamp/haybales'
end
group :test do
gem 'mocha'
gem 'capybara', '>= 2.15', github: 'teamcapybara/capybara'
gem 'selenium-webdriver'
gem 'webmock', github: 'bblimke/webmock'
gem 'vcr'
end
@josephgrossberg
Copy link

@ai
Copy link

ai commented Jun 29, 2020

@dhh what is your package.json?

@fabioperrella
Copy link

Why Resque and not Sidekiq?

@tmoney100
Copy link

Interesting! Thanks!!

@mtam2
Copy link

mtam2 commented Jun 30, 2020

Why Resque and not Sidekiq?

@fabioperrella
https://twitter.com/dhh/status/1252329322582388736

Don't need any features from Sidekiq. Happy with Resque.

@fabioperrella
Copy link

Why Resque and not Sidekiq?

@fabioperrella
https://twitter.com/dhh/status/1252329322582388736

Don't need any features from Sidekiq. Happy with Resque.

Nice, thanks!

@alexshapalov
Copy link

Thanks!

@Rovel
Copy link

Rovel commented Jul 7, 2020

Any cool stuff in this closed gems to be open one day?

# Drivers
gem 'redis_connectable', github: 'basecamp/redis_connectable'

# Search
gem 'html_scrubber', github: 'basecamp/html_scrubber'

# Logging/instrumentation
gem 'rails_structured_logging', github: 'basecamp/rails-structured-logging'
gem 'critter', '~> 0.3.0', github: 'basecamp/critter', require: false

# Other
gem 'useragent', github: 'basecamp/useragent'
gem 'rspamd', github: 'basecamp/rspamd-ruby'

# shouldn't be in in Drivers close to redis?
gem 'redis_object', github: 'basecamp/redis_object'

# shouldn't be in in Security?
gem 'active_record_encryption', github: 'basecamp/active_record_encryption'

# Deploys, local CI
  gem 'haybales', github: 'basecamp/haybales'

@codextremist
Copy link

Alphabetical order is way more efficient than creating categories

@la-ruby
Copy link

la-ruby commented Aug 5, 2020

why no simplecov?

@inopinatus
Copy link

@dhh what is your package.json?

That's a good question. These days, it's almost as telling as the Gemfile.

@dougo
Copy link

dougo commented Sep 13, 2020

What do you use from mocha? Something you can't do with Minitest::Mock?

@la-ruby
Copy link

la-ruby commented Sep 13, 2020

mocha is for client side javascript testing, and minitest is not in the same level

@dougo
Copy link

dougo commented Sep 13, 2020

That's a different mocha... The mocha Ruby gem is for mocking and stubbing: https://mocha.jamesmead.org/

@vizcay
Copy link

vizcay commented Sep 22, 2020

I would love to see structured logging as a Rails default in production.

Obviously very interested to peek into

gem 'rails_structured_logging', github: 'basecamp/rails-structured-logging'

@krainboltgreene
Copy link

@codextremist Gemfiles are required in the order you define and gems can have order-dependant logic. Alphabetical ordering is a bad idea.

@0x7466
Copy link

0x7466 commented Feb 3, 2021

@dhh Do you plan to open source the rspamd gem at some point? I'd have a use case for it. :)

@shubhamgupta0122
Copy link

@codextremist Gemfiles are required in the order you define and gems can have order-dependant logic. Alphabetical ordering is a bad idea.

@krainboltgreene some example please

@codextremist
Copy link

@codextremist Gemfiles are required in the order you define and gems can have order-dependant logic. Alphabetical ordering is a bad idea.

@krainboltgreene Never had that problem before, after dealing with at least dozens of Rails projects at least.
I just feel so pointless to organize gems by categories. If you need to lookup your Gemfile for a specific gem, I doubt that these categories will be of any help.

@misner
Copy link

misner commented Mar 5, 2021

Don't see any authentication gem such as Devise... is it done totally "manually" ?

@misner
Copy link

misner commented Mar 22, 2021

@dhh why use a "more-lightweight-than-Rails" framework Sinatra on top of already having Rails gem installed ?
I would understand if you were using Sinatra for Jobs in antoher codebase/repo/server for specific "thinner" needs, but as you're using a Majestic Monolith, why use Sinatra on top of Rails ? What was Rails missing in terms of jobs management that you'd need to use Sinatra on the same server ?

@saiqulhaq
Copy link

@codextremist Gemfiles are required in the order you define and gems can have order-dependant logic. Alphabetical ordering is a bad idea.

@krainboltgreene some example please

dot-env gem need to be loaded before rails

@spaquet
Copy link

spaquet commented Feb 22, 2022

@misner I do not think he added Sinatra for the sake of adding Sinatra to the project. It's used by other gems such as Resque (check their repo here: https://github.com/resque/resque). You will notice that they are using it to offer you a "nice dashboard".

@inopinatus
Copy link

@dhh any chance of an update to this? would be interesting to see how it's evolved

@igorkasyanchuk
Copy link

what are you using for API (generation), e.g. what serialization approach? render json, or jbuilder?

@sergioro9
Copy link

Thanks for posting. What does "BK" mean?

gem 'sqlite3'  # Used for asset generation in BK

@northeastprince
Copy link

BuildKite I assume, but they're using GitHub Actions now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment