In this article, we'll show you how to use Paperclip in Rails to add images processing them.
Paperclip is a gem used for image processing in Ruby. It is one of the most popular image processing gems and has been used by projects like GitHub, Shutterstock, and thoughtbot.
How to install Paperclip
To install Paperclip, add it…
Gems & Tools
This tutorial will show you how to use GraphQL in Rails.
GraphQL is a language for querying data that was created by Facebook. GraphQL is often described as a "better REST" because it allows you to query for exactly the data you need instead of getting more data than you need, like with a REST API.
If…
The following post will show you how to implement Capybara in Rails to simulate user interactions.
Capybara is a ruby gem for writing integration and system tests. System tests are basically testing that click around your web application to check if all the functionality is working as expected.
Using Capybara, you can:
Crawl your application (like a…
Docker is a great tool for developers; it provides an easy way to create and manage containers. You can implement Docker in Rails with this tutorial.
If you are unfamiliar with containers, think of it as a way to isolate your application from the rest of the system. This way, you can run multiple applications on…
The Roo gem makes it easy to work with Microsoft Excel (xls and xlsx) files in your Ruby project.
You can add it to your Gemfile with:
gem "roo"
Once you have installed the gem, you can create a new instance of the Roo::Excelx class:
require "roo"
xlsx = Roo::Excelx.new("path/to/file.xlsx")
You can then use various methods to read and manipulate the…
If you're using gemfiles to manage dependencies in Ruby, then this article is for you. You'll learn how to implement these gemfile tips and make your project more efficient.
Stop Repeating Yourself (DRY Principle)
If you're like me, then you probably have a lot of dependencies in your Gemfile. It's a pain to keep typing the…
If you're working with Ruby and RSpec and you want to improve your workflow and efficiency, here are some Rspec tips for you.
1. Use Factory Girl to Create test Data
Factory Girl is a gem that allows you to create test data easily.
You can use Factory Girl to create objects in your tests without having…
In this tutorial, we will learn how to install Ruby with rbenv.
rbenv is a tool that helps you manage & switch between different ruby versions. It is similar to Virtualenv for python or RVM for Ruby. It's handy because it's easy to use, it's fast, & it's cross-platform (Linux, macOS, & Windows).
It is useful when…
Sidekiq is a Ruby gem for background processing. It's one of the most popular background job processing tools available.
In this article, you will learn how to install Sidekiq in your Ruby project & how to monitor your jobs.
Installing Sidekiq
If you want to use sidekiq in your Ruby project, you need to add…
In this article, you will learn how to use HTTParty in Ruby to make HTTP requests from your Ruby apps.
Why Use HTTParty?
Gems like HTTParty & Faraday prove that making HTTP requests can be fun & easy in Ruby.
You can easily install HTTParty to your Gemfile:
gem 'httparty'
And then run bundle install…