Discover Our Blog

Creating a simple Ruby on Rails application using Devise

Creating a simple Ruby on Rails application using Devise

Ruby on Rails is a popular framework used to develop applications. The framework written in Ruby is based on the MVC architecture. Using ruby on rails, it becomes simple to develop fast applications with the least set of code, effortlessly.


Devise is an authentication solution developed for Rails on Warden. The software has the following attributes:-

  • It is rack based
  • It is an MVC solution that is based on the rails engines
  • The software allows the user to have more than one role that are signed at the same time
  • It is based on the modularity concept. The developer can use what he really needs

Creating the rails application

Before creating the first Rails application, it is important to go through the basics of the devise software. The user can install the ubuntu 11.04 operating system in the computer, and work with the rails project. Alternately, the user can install rails in the Windows or Mac system as well. Once the dependencies are installed, the user can start creating the application. There are commands which help the user in creating applications in rails.

While creating a simple Ruby on rails application using Devise the developer has to take in consideration certain other aspects of development that are mentioned as follows:-

Gemfile editing

The developer will need to add the gem in the Gemfile with:-

  • gem 'devise

Devise installation

  • Run the bundle command to install it.
  • After that, the developer will need to run the below command to install the gem
  • rails generate devise:install

Model creation

  • Run the below command
  • Rails generate devise MODEL
  • Replace MODEL with the class name used for the application’s users

View Creation

  • Run the below command
  • Rails generate devise:views
  • Controller creation
  • Run the below command
  • Rails generate devise:controllers MODEL(s)

To know in details about how the rails applications are created, Cryptex Technologies is ready to help you.


Leave a comment: