Aug 17, 2020
12 Ruby Gems We use at SourceLevel and Why:
Text Handling & FormattingWe are heavy Markdown users! We produce internal documentation in Markdown. The docs page is a static site entirely written in it (and built with Middleman).
In the main app, we use markerb to parse markdown content and convert it to HTML. Comments to Github, issue explanations and repository badges are examples of markdown usage. Although its repository is archived and doesn’t accept contributions anymore, it does a pretty good job. It works with both kramdown and redcarpet. We chose redcapet as our processor.
Another useful gem is charlock_holmes. As accurate as Sir Arthur’s character Sherlock Holmes, this gem detects character encoding for given files or chunks of text. Under the hood, charlock_holmes benefits from the set of libraries from ICU.
We love PostgreSQL! It is reliable, open-source and has lots of functionalities that make it attractive. The ability to create materialized views is one of them.
Working with views in Rails is kind of messy. That’s why we added scenic to the SourceLevel main app. This gem adds methods to ActiveRecord::Migration that allow managing views in migrations.
We use materialized views to scope content. If you don’t know what it is, here it goes: it’s a SQL query whose results work as stored in a regular table. Long-running queries or segmented results can be fetched from appropriate views reducing both time and code complexity.
pghero gem, besides the ability to kill them if you need, also ships with a UI for you to monitor other performance indicators.
Another essential dependency is dalli. It does an incredibly good job of storing and retrieving memcached records. It’s thread-safe and allows us to run Rails.cache smoothly throughout the codebase.
Read more in our blog post :)



















