Category Docker

Dockerize Ruby on Rails Application containing private repository or mounted engine in it

Dockerizing a ruby on rails application in which you have mounted a Rails Engine or include private repository in Gemfile is a bit tricky.

Category Rails

Understanding alias_method in Ruby on Rails

In order to create an alias for a method we can use alias_method which is provided by Ruby. Basically, we create an alias in order to override the name without...

Exploring Ruby Gems: Good-To-Have Gems for Rails Development

Introduction: Ruby Gems are packages or libraries that extend the functionality of Ruby and Ruby on Rails applications. They provide ready-made solutions for common tasks, making development faster and more...

Ruby on Rails: Understanding the ROTP Gem

In the Ruby on Rails framework, developers can leverage the power of the ROTP gem to easily implement OTP functionality.

Testing JSON Jbuilder Responses in Rails Controllers

Introduction: When building Rails applications, it’s essential to test the responses of our controllers, especially when generating JSON output using Jbuilder templates. In this article, we’ll explore how to effectively...

ActiveRecord Import: Using `new` vs Hash in Bulk Record Creation

Introduction: When creating a large number of records in Rails using ActiveRecord’s create! method, calling a database query for each record can be inefficient. However, there are alternative approaches that...

Rails 7 excluding on ActiveRecord::Relation

Rails 7 introduced a new method excluding for ActiveRecord::Relation, offering a convenient way to exclude specific records from a collection. This addition provides developers with a cleaner and more expressive...

Streamlining GitHub Profile Switching: Simplify Your Workflow

Working with multiple GitHub profiles and switching them continuously is a tedious task. Switching between multiple GitHub profiles requires the following steps:

Optimizing Database Queries with Rails Gems

Efficient database query optimization plays a vital role in the performance and scalability of Rails applications. By minimizing query times and reducing unnecessary database hits, you can significantly enhance the...

What is ULID and Why Should You Care in Ruby on Rails?

As a Ruby on Rails developer, unique identifiers are an essential part of many applications. One unique identifier you should consider using is the Universally Unique Lexicographically Sortable Identifier (ULID)....

Simplifying Test Coverage with SimpleCov in Ruby on Rails

Test coverage is an essential aspect of any software development project. It helps ensure that your codebase is thoroughly tested, minimizing the risk of bugs and improving the overall quality...

Whenever - Scheduling Jobs

If you are developing web applications in Ruby on Rails, then you are probably already familiar with the concept of scheduling jobs to run at specific intervals. One popular tool...

Generating CSV files in Rails

CSV (Comma Separated Values) is a widely used file format to exchange data between different systems. In this blog post, we will learn how to generate CSV files in Rails....

CarrierWave Gem: The Ultimate File Uploader for Rails

If you’re building a Rails application that requires file uploads, you’re in luck!

Efficiently Query Multiple Fields in Rails with a Single Query

When working with Rails ORM, I encountered a challenge where I needed to search for students based on their name, email, or mobile number using a single search field. The...

How to Securely Store RDS Instance Passwords in AWS Secret Manager and Access Them in a Ruby on Rails Application

AWS Secret Manager is a service offered by Amazon Web Services (AWS) that enables you to manage secrets such as database passwords, API keys, and other sensitive data. This blog...

Faker gem in rails

Introduction:

Tips for Securing Your Ruby on Rails Application from Common Vulnerabilities

As with any web application, security is a critical concern when developing Ruby on Rails applications. While Rails provides some built-in security features, such as protection from CSRF and SQL...

Building APIs with Jbuilder: A Comprehensive Guide

As web developers, we are constantly building APIs that are fast, reliable, and easy to consume. In the Ruby on Rails ecosystem, Jbuilder is a powerful tool that can help...

Streamline Your Error Monitoring with Airbrake Integration

Streamline Your Error Monitoring with Airbrake Integration

Mastering Code Cleanliness with Rubocop: A Guide to Linting and Styling Your Ruby and Rails Applications

Mastering Code Cleanliness with Rubocop: A Guide to Linting and Styling Your Ruby and Rails Applications

Data Annotation with Annotate Gem

The Annotate gem is a powerful tool for Ruby on Rails developers that can help them automatically add schema information to their model files. It is a simple yet powerful...

Kaminari - Using Pagination in Ruby on Rails application

If we have hundreds of thousands of records in our model, then sending or showing them all at once increases the latency of our application. In this case, we need...

Effortless Data Recovery: Choose Your Timeline with Multiple Backups a Day or Selective Restores from RDS

If you want your database to be automatically backed up twice or thrice a day, you don’t actually need to perform multiple backups. AWS RDS provides a feature called “point-in-time...

How to Integrate QuickSight into a Rails React Application

QuickSight, a business intelligence service by Amazon Web Services (AWS), provides a cloud-based data visualization and analytics platform.

Effortless Database Migration: Converting MySQL to PostgreSQL with pgloader Gem in Your Rails Application

As your application grows in size, migrating to a different database can be a daunting task. In this blog, we’ll explore a step-by-step guide on how to effortlessly switch your...

Sidekiq: An introduction to background job processing

Processing millions and thousands of records is a time-consuming task that cannot be completed quickly. The user must wait for the process to complete, which can be a lengthy and...

Continuous integration and deployment with CircleCI and Ruby on Rails

This blog post will explore how to implement Continuous Integration/Continuous Deployment (CI/CD) using CircleCI and Ruby on Rails.

Prosopite: A Comprehensive Solution for Detecting N+1 Queries in Rails

As the size of the application increases, there may be latency from the backend. One possibility is that we are experiencing the N+1 query problem in our backend queries. In...

Brakeman: A Powerful Security Analysis Tool for Ruby on Rails Applications

Brakeman is a security analysis tool that is designed specifically for Ruby on Rails applications.

Transform hash value(s) in Ruby

In order to transform or change hash values in ruby, generally we use map or each_with_obejct or inject

Soft Delete in Ruby on rails

Building a web app that can perform basic crud operations can be easily done with Rails.

Delete VS Destroy in Rails

In this blog, we are going to see the difference between delete and destroy methods in rails.

Rails console: Pretty Print

Output of rails console is in raw format. Oftentimes, when debugging or using rails console makes us hard to debug the code or print data.

Benchmark module in Rails

Benchmark is a module provided by ruby which helps you to measure the time taken to execute

Taking database backup from RDS snapshots for multitenancy application

By default, Amazon RDS creates and saves automated backups of your DB instance securely in Amazon S3 for a particular retention period, we can change the period or we can...

Flay gem - Write clean code

This tutorial is regarding Flay gem helps you to avoid duplications and similarities in code to write a clean code

Eager loading in rails

Eager loading is nothing but loading all the associated records using as few queries as possible.

Dup use case explained

Let’s consider a scenario where you want to make some changes in value but also needs original value for another computation.

Attribute reader, writer and accessor in Ruby

Oftentimes, we need to use instance variables outside of the class in ruby code. We know that instance variables can be accessed by methods. And to access these methods, we...

Member Vs Collection Routes in Rails

To understand the difference between collection and member routes, first let’s take an example. Suppose we are having 3 models called User, Post, and Comment.

Dockerize Ruby on Rails Application containing private repository or mounted engine in it

Dockerizing a ruby on rails application in which you have mounted a Rails Engine or include private repository in Gemfile is a bit tricky.

Category Ruby

Understanding alias_method in Ruby on Rails

In order to create an alias for a method we can use alias_method which is provided by Ruby. Basically, we create an alias in order to override the name without...

Exploring Ruby Gems: Good-To-Have Gems for Rails Development

Introduction: Ruby Gems are packages or libraries that extend the functionality of Ruby and Ruby on Rails applications. They provide ready-made solutions for common tasks, making development faster and more...

Ruby on Rails: Understanding the ROTP Gem

In the Ruby on Rails framework, developers can leverage the power of the ROTP gem to easily implement OTP functionality.

Testing JSON Jbuilder Responses in Rails Controllers

Introduction: When building Rails applications, it’s essential to test the responses of our controllers, especially when generating JSON output using Jbuilder templates. In this article, we’ll explore how to effectively...

ActiveRecord Import: Using `new` vs Hash in Bulk Record Creation

Introduction: When creating a large number of records in Rails using ActiveRecord’s create! method, calling a database query for each record can be inefficient. However, there are alternative approaches that...

Rails 7 excluding on ActiveRecord::Relation

Rails 7 introduced a new method excluding for ActiveRecord::Relation, offering a convenient way to exclude specific records from a collection. This addition provides developers with a cleaner and more expressive...

Streamlining GitHub Profile Switching: Simplify Your Workflow

Working with multiple GitHub profiles and switching them continuously is a tedious task. Switching between multiple GitHub profiles requires the following steps:

Optimizing Database Queries with Rails Gems

Efficient database query optimization plays a vital role in the performance and scalability of Rails applications. By minimizing query times and reducing unnecessary database hits, you can significantly enhance the...

What is ULID and Why Should You Care in Ruby on Rails?

As a Ruby on Rails developer, unique identifiers are an essential part of many applications. One unique identifier you should consider using is the Universally Unique Lexicographically Sortable Identifier (ULID)....

Simplifying Test Coverage with SimpleCov in Ruby on Rails

Test coverage is an essential aspect of any software development project. It helps ensure that your codebase is thoroughly tested, minimizing the risk of bugs and improving the overall quality...

Whenever - Scheduling Jobs

If you are developing web applications in Ruby on Rails, then you are probably already familiar with the concept of scheduling jobs to run at specific intervals. One popular tool...

Generating CSV files in Rails

CSV (Comma Separated Values) is a widely used file format to exchange data between different systems. In this blog post, we will learn how to generate CSV files in Rails....

CarrierWave Gem: The Ultimate File Uploader for Rails

If you’re building a Rails application that requires file uploads, you’re in luck!

Efficiently Query Multiple Fields in Rails with a Single Query

When working with Rails ORM, I encountered a challenge where I needed to search for students based on their name, email, or mobile number using a single search field. The...

How to Securely Store RDS Instance Passwords in AWS Secret Manager and Access Them in a Ruby on Rails Application

AWS Secret Manager is a service offered by Amazon Web Services (AWS) that enables you to manage secrets such as database passwords, API keys, and other sensitive data. This blog...

Faker gem in rails

Introduction:

Tips for Securing Your Ruby on Rails Application from Common Vulnerabilities

As with any web application, security is a critical concern when developing Ruby on Rails applications. While Rails provides some built-in security features, such as protection from CSRF and SQL...

Building APIs with Jbuilder: A Comprehensive Guide

As web developers, we are constantly building APIs that are fast, reliable, and easy to consume. In the Ruby on Rails ecosystem, Jbuilder is a powerful tool that can help...

Streamline Your Error Monitoring with Airbrake Integration

Streamline Your Error Monitoring with Airbrake Integration

Mastering Code Cleanliness with Rubocop: A Guide to Linting and Styling Your Ruby and Rails Applications

Mastering Code Cleanliness with Rubocop: A Guide to Linting and Styling Your Ruby and Rails Applications

Data Annotation with Annotate Gem

The Annotate gem is a powerful tool for Ruby on Rails developers that can help them automatically add schema information to their model files. It is a simple yet powerful...

Kaminari - Using Pagination in Ruby on Rails application

If we have hundreds of thousands of records in our model, then sending or showing them all at once increases the latency of our application. In this case, we need...

Effortless Database Migration: Converting MySQL to PostgreSQL with pgloader Gem in Your Rails Application

As your application grows in size, migrating to a different database can be a daunting task. In this blog, we’ll explore a step-by-step guide on how to effortlessly switch your...

Sidekiq: An introduction to background job processing

Processing millions and thousands of records is a time-consuming task that cannot be completed quickly. The user must wait for the process to complete, which can be a lengthy and...

Transform hash value(s) in Ruby

In order to transform or change hash values in ruby, generally we use map or each_with_obejct or inject

Soft Delete in Ruby on rails

Building a web app that can perform basic crud operations can be easily done with Rails.

Delete VS Destroy in Rails

In this blog, we are going to see the difference between delete and destroy methods in rails.

Rails console: Pretty Print

Output of rails console is in raw format. Oftentimes, when debugging or using rails console makes us hard to debug the code or print data.

Benchmark module in Rails

Benchmark is a module provided by ruby which helps you to measure the time taken to execute

Direct upload files to S3 - Ruby Code

In this blog, we will see how one can directly upload file to S3 bucket.

Flay gem - Write clean code

This tutorial is regarding Flay gem helps you to avoid duplications and similarities in code to write a clean code

Eager loading in rails

Eager loading is nothing but loading all the associated records using as few queries as possible.

Dup use case explained

Let’s consider a scenario where you want to make some changes in value but also needs original value for another computation.

Attribute reader, writer and accessor in Ruby

Oftentimes, we need to use instance variables outside of the class in ruby code. We know that instance variables can be accessed by methods. And to access these methods, we...

Category AWS

Accessing Objects from a Private S3 Bucket through CloudFront

In this blog, we will walk you through the process of accessing objects from a private S3 bucket through CloudFront. This will enable you to securely and efficiently deliver content...

Delegate in Ruby on Rails

In Ruby on Rails, delegates provide a way to delegate certain methods to an associated object. This is useful when you have a model with an association and want to...

Creating Custom Alerts with CloudWatch

Introduction Amazon CloudWatch, a monitoring and observability service offered by Amazon Web Services (AWS), provides a comprehensive solution for monitoring various AWS resources and applications. In this blog, we will...

How to Securely Store RDS Instance Passwords in AWS Secret Manager and Access Them in a Ruby on Rails Application

AWS Secret Manager is a service offered by Amazon Web Services (AWS) that enables you to manage secrets such as database passwords, API keys, and other sensitive data. This blog...

Effortless Data Recovery: Choose Your Timeline with Multiple Backups a Day or Selective Restores from RDS

If you want your database to be automatically backed up twice or thrice a day, you don’t actually need to perform multiple backups. AWS RDS provides a feature called “point-in-time...

How to Integrate QuickSight into a Rails React Application

QuickSight, a business intelligence service by Amazon Web Services (AWS), provides a cloud-based data visualization and analytics platform.

Direct upload files to S3 - Ruby Code

In this blog, we will see how one can directly upload file to S3 bucket.

Taking database backup from RDS snapshots for multitenancy application

By default, Amazon RDS creates and saves automated backups of your DB instance securely in Amazon S3 for a particular retention period, we can change the period or we can...

Category Database

Category CircleCI

Continuous integration and deployment with CircleCI and Ruby on Rails

This blog post will explore how to implement Continuous Integration/Continuous Deployment (CI/CD) using CircleCI and Ruby on Rails.

Category React

Mastering React's Basic Hooks: A Comprehensive Guide to useState, useEffect, and useContext

React hooks have become an essential part of building modern React applications. They provide a simple and elegant way to manage state and lifecycle events within functional components.

Category JS

Mastering React's Basic Hooks: A Comprehensive Guide to useState, useEffect, and useContext

React hooks have become an essential part of building modern React applications. They provide a simple and elegant way to manage state and lifecycle events within functional components.

Category javascript

Spotify API

Introduction: Spotify is a popular music streaming platform that offers a wide range of features for its users. One interesting aspect is the ability to retrieve information about the currently...

Category API

Spotify API

Introduction: Spotify is a popular music streaming platform that offers a wide range of features for its users. One interesting aspect is the ability to retrieve information about the currently...

Category Redis

Polymorphic Associations in Ruby on Rails

Introduction In Ruby on Rails, associations allow us to establish relationships between models. One such association is polymorphic association, which provides a flexible way to connect multiple models to a...

Migrating from an Unencrypted Redis Cluster to an Encrypted Redis Cluster

AWS provides two types of encryption for Redis clusters: at-rest encryption and in-transit encryption. Let’s explore what each of these means and how to migrate your Redis cluster to enable...

Category Next.js

Using Charts in your Next.js Project

If you’re looking to enhance your Next.js project with beautiful charts and design, the Chart.js library is a great choice. In this blog, we will explore how to integrate Chart.js...

Category Chart.js

Using Charts in your Next.js Project

If you’re looking to enhance your Next.js project with beautiful charts and design, the Chart.js library is a great choice. In this blog, we will explore how to integrate Chart.js...

Category S3

Accessing Objects from a Private S3 Bucket through CloudFront

In this blog, we will walk you through the process of accessing objects from a private S3 bucket through CloudFront. This will enable you to securely and efficiently deliver content...