Setup your rails application with one command

Generally setting up a rails app is running some same set of commands, for example installing gem, creating database, loading schema and start rails server.

We can create a script and run it to setup our application since Rails 4.2 a bin/setup file is generated by default. Here is the example of setup script.

Authorization with Pundit gem

  Security is an important aspect of application development. Two main components of security are Authentication (Who are you?) and Authorization (are you supposed to be here?). Authentication verifies the user’s identity while authorization verifies whether that user has access rights on certain resources to perform actions on them. Two popular gems for authorization in…

Deploying Rails application on AWS, using Nginx, Puma and Mina

In this tutorial we are going to setup an AWS EC2 instance for deployment of rails application. Server Setup Following is the setup instruction for ubuntu 16.04 using ruby 2.4, Postgres 9.6 and rails 5. Installing Ruby Setting up dependencies for ruby.

Next step is to install ruby using RVM.

Last step is…

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…