Articles

A collection of thoughts, inspiration, mistakes, and other long-form minutia I've written. For smaller, more regular tidbits — peruse the notes section.

Browse by topic

Configure Minitest with Gitlab CI and Rails

Published by Prabin Poudel 13 min read
cover: Configure Minitest with Gitlab CI and Rails
Running tests in CI is a very important step to make sure there are no breaking changes in the new code. Today we will look at configuring Gitlab CI to run tests for Ruby on Rails applications written with Minitest.

Setup RSpec Tests in Rails with Gitlab CI

Published by Prabin Poudel 14 min read
cover: Setup RSpec Tests in Rails with Gitlab CI
Running tests in CI is a very important step to make sure there are no breaking changes in the new code. Today we will look at configuring Gitlab CI to run RSpec tests for Ruby on Rails applications.

Setup Active Job with Sidekiq in Rails

Published by Prabin Poudel 10 min read
cover: Setup Active Job with Sidekiq in Rails
Active Job is a framework for declaring jobs and making them run on a variety of queuing backends while sidekiq is a battle tested gem that does the same thing. Rails provides an easy way to setup Active Job with Sidekiq which we will look into in this blog.

Deploy API only Rails App with Capistrano

Published by Prabin Poudel 11 min read
cover: Deploy API only Rails App with Capistrano
Capistrano provides a one line command deployment to remote servers. In this tutorial, we will be looking at how we can setup capistrano with our Rails application and deploy the app to remote server.

Setup Action Mailbox with SendGrid

Published by Prabin Poudel 17 min read
cover: Setup Action Mailbox with SendGrid
Action mailbox can be used to forward all incoming emails to our Rails app and process them further. In this tutorial, we will be looking at the implementation and setup steps for making action mailbox work with SendGrid. We will test in development environment and also test with NGROK to make sure it will work perfectly in production.

Run ESLint on git commit with Husky and Lint Staged

Published by Prabin Poudel 6 min read
cover: Run ESLint on git commit with Husky and Lint Staged
How do you make sure every member in your team follows best coding practices and never commits code with issues to remote repository? Answer is using Husky package and git hooks. You can configure Husky to run ESLint on modified codes before committing those code to git.

Run RuboCop on git commit with Overcommit Gem

Published by Prabin Poudel 6 min read
cover: Run RuboCop on git commit with Overcommit Gem
How do you make sure every member in your team follows best coding practices and never commits code with issues to remote repository? Answer is overcommit gem and git hooks. You can configure overcommit gem to run RuboCop on modified codes before committing those code to git

Beginner's Guide to RuboCop in Rails

Published by Prabin Poudel 12 min read
cover: Beginner's Guide to RuboCop in Rails
RuboCop is a static code analyzer which analyzes the code based on the best practices followed by the Ruby developers around the world and defined on the community Ruby style guide. In this article, we will learn: What is RuboCop? Why use RuboCop? and installing RuboCop in Rails.

Search Engine with Rails

Published by Prabin Poudel 14 min read
cover: Search Engine with Rails
Yes! You can create a full functioning search engine with Rails. In this tutorial you will be learning how to create a search engine with Rails by using elasticsearch. You will learn to configure elasticsearch in the rails app, create search view to search and show results and bonus feature of highlighting matched texts like Google does in it's search results.

Live Stream Logs to Browser with Rails

Published by Prabin Poudel 11 min read
cover: Live Stream Logs to Browser with Rails
Live streaming files content to browser in Rails can be accomplished with the use of Server Side Events. In this tutorial, we will be learning to live stream content inside log files to the browser from Rails controller by using file watcher and server side events.