Edgar Latorre

I'm Edgar and this is my blog where I write about software development.

Authentication with Rails 4 and Devise

28 May 2013

installing rails 4:

gem install rails --version 4.0.0.rc1 --no-ri --no-rdoc

creating a new rails application:

rails new myapp

uncomment this line:

gem 'therubyracer', platforms: :ruby

put devise on your Gemfile:

gem 'devise', git: 'https://github.com/plataformatec/devise.git'

Running bundle command to install the gem:

bundle

Installing devise on rails app:

rails g devise:install

Creating a devise model with yours modules:

rails generate devise User

If you want, it’s possible to use Admin model.

Run the migrations and now we have devise configured:

rake db:migrate

That’s it.