The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Learn how to rescue from errors in a Ruby on Rails controller
Sometimes you have to rescue from errors in your Ruby on Rails controller. You mostly would need to rescue from ActiveRecord::RecordNotFound exception raised when you did a query but your record was not present in the database. But what is the best way to rescue from errors? READ MORE
Slacking off with Slack bots, creating your first Slack bot in Ruby
Learn how to create your very own Slack bot! [more inside]
Syntax highlighting and Emmet support in new APIQ CMS release
Check an overview of what’s added and changed in this article.
Using ActiveSupport to deprecate gems code
Are you searching for an easy way to deprecate gems code without breaking existing user apps? Here’s a small guide on how to use ActiveSupport to deprecate code in Ruby.
Deploying Faktory to AWS Fargate
Faktory, created by Sidekiq’s Mike Perham, is a self-contained, language-agnostic approach to running background jobs. Learn how to setup Faktory for a Rails app on AWS Fargate in this tutorial.
RSpec - 4 common tests design mistakes. Do you also make them?
Learn how to write good tests and avoid 4 common tests design mistakes that slow down your specs and make them less readable. READ MORE
Guide to setup testing React.js components with Jest in Rails+Webpacker+Webpack envir
Are you using React with Rails? Maybe integrated with Webpack thanks to Webpacker? Have you always wanted to test those components but configuring tests in JS seems hard? Here is a guide on how to start because there are dragons 🐉🐉 on the road and it took me some hours to figure it out from a few other tutorials. [more inside]
Goodbye Sprockets. Welcome Webpacker 3.0
This guide will let you through the process of migrating your Rails Application from Sprockets to Webpacker 3.0. Even though Webpacker suggests to keep using Sprockets for css and images, I don’t really see why we should keep two bundlers at the same time when we can simply use only Webpacker. [more inside]
RSpec matchers for increment and decrement
Here’s something a little more expressive than using “change { blah }.by(1)” - some RSpec matchers for increment and decrement.
Refactor if condition with Rails scope
Quite often it’s easy to simplify if condition by using a simple scope. Learn how to move logic to model and simplify your if conditions. READ MORE
Ruby on Rails Service Objects and testing in isolation
Service Objects are not a silver bullet but they can take you a long way in modeling your Rails app’s domain logic. In this blog post, I will describe how I usually work with service object pattern in a structured way. I will also cover testing in isolation with mocked services layer. [more inside]
Checking Postgres availability in pure Ruby
Article describes how to communicate with Postgres server without any library. Check it out here.
GraphQLRails - Learn How To Super Charge Your Rails API With GraphQL
I’m excited to share that I’m writing an ebook about building GraphQL powered applications in Ruby On Rails. Please drop your email at GraphQLRails.com and I shall keep you in the loop.
Productive Laziness - optimize your shell workflow with a LazyMe gem
I would like to share a simple productivity tip that probably helped me save thousands of keystrokes so far. [more inside]
Ruby on Rails - easy configuration for you app with YAML files
Did you know that Rails has a built-in method to load configuration defined in yml files? You don’t have to use any external gem to use it in your app. Read more
Ruby 2.6 is at least 2 times faster with new JIT: MJIT
JIT feature has been merged to Ruby 2.6 and here is an introduction to JIT. To install Ruby 2.6 with rvm use following commands:
rvm install 2.6.0-head or rvm install ruby-head
rvm use ruby-2.6-head
Sidekiq 5.1 released
It’s Sidekiq’s 6th birthday and I’ve shipped three releases to celebrate! [more inside]