Fixtures in Rails Tests

Fixtures  are very much relevant in Rails testing. Fixtures are a way of organizing your test data.Testing the application helps to debug it more efficiently and ensures the desired functionality to the application. Let’s have a look on them. It is used to manage the test data. It tests against the real data and is…

Spice up your boring IRB (Irbtools)

IRB stands for interactive ruby, it is a tool for interactively executing ruby expressions read from a standard input. To invoke it, type irb at the shell or command prompt, and begin entering Ruby statements and expressions. But it has some limitations. A solution to this is called ‘irbtools‘, which make using irb easier and…

Disabling transaction block during migration

Migrations are used to modify your database. By default, all migrations run inside a transaction. You can disable the transaction during migration. Let’s have a look on how to disable transaction block! Migrations can manage the evolution of a schema used by several physical databases. It’s a solution to the common problem of adding a…

Deploying Sidekiq to Ubuntu 16.04

Sidekiq is a popular background processing tool available in Ruby. It’s fast, robust and reliable compared to other solutions out there. Sidekiq run as a process outside of rails (but including the rails environment), which means it doesn’t start when you start your rails application. During development, we start sidekiq in another terminal (or tab) using…

How to write maintainable routes in rails

config/routes.rb is the gateway to your ruby on rails application. All request send by your users are directed to the appropriate code by the routes. Example:

When someone visits your-website.com/profiles then the request is taken to the Index action of the UsersController. Under that action you will get the index.html.erb. So using routes we…