Skip to content

Rails with Devise

02/02/2011

before start rails devise start check

$sudo bundle install

$sudo gem update

step 1:devise install

$sudo gem install devise

step2:Edit Gemfile

$gedit Gemfile open

add and save the file

gem ‘devise’,’1.1.5′

step 3:Add devise file in your application by generator

$rails generate devise:install

step 4:Setup default url options for your specific environment

$open gedit /config/enviranments/development.rb

past config.action_mailer.default_url_options = { :host => ‘localhost:3000’ }

save the file

step 5:Ensure you have defined root_url to *something* in your config/routes.rb.

$gedit config/routes.rb

past root :to => “home#index”

save the file

step 6:Install the dependencies specified in your Gemfile

$bundle install

step 7:Generate default devise modules name

$rails generate devise User

step 8:create databse

$rake db:create

step 9:create tables and migrate with application

$rake db:migrate

step 10:

$rake routes

step 11:Start rails server

$rails server

step 12:open the application

http//:localhot:3000/users/sign_up

http//:localhot:3000/users/sign_out

http//:localhot:3000/users/sign_in

If u want create devise user in your application follow below .

$ rails generate devise:views

it create all devise user view files..

created login in devise…

Rocking with devise…

Advertisements

From → Rails

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: