Devise Gem Authentication Best Solution

How to Install and Use Devise Gem for Authentication in Rails Web Application

9:41 AM

Devise is the best solution of authentication for rails web apps

1: Open your gem file and add
   Gem ‘devise’ (G small)
  Now run command bundle install
2: Generate the devise generator to install in application 
   Rails generate devise: install
3: Now set the devise authentication for Development Environment
config.action_mailer.default_url_options = {host: 'local host', port: 3000}
4: Now generate the devise For Model on which are used
  Rails generate devise Model (put name of model on which you want to used devise authentication For Example User Model)
5: run  rake db: migrate
6: Finally  rails s 

    

Deploy with git on heroku

How to Deploy a ruby web apps on Heroku with git

10:40 AM

1: Download the Heroku CLI from Heroku website


2: Login to Heroku
          1: Give the Email
         2: Give the Password

3: Open the Project you created on locally
       For Example cd pets   (pets is your project name you’re created)

4: Initialize the git repository
     Git init

5: Add Local Data To git repository
    Git add.

6: commit the changes that done locally
  Git commit –m “My First Commit”

7: Create the Heroku app By Using Below command
    Heroku create ---------- (give the name of app you want to create on -------)

8: Finally Put Data or  Ruby Web App To Heroku Server On Master Branch
    Git Push Heroku Master

Note# config the Email And Name By Using Below Commands Firstly
      Git.config.name “Give Name”

      Git.config.Email  “Hafiz Aliahsan@gmail.com”





How to open

How to install or Open Ruby Mine in Linux (Ubuntu)

10:00 AM

1: Open the Linux command Line

2: Open the directory where Ruby mine download or available by cd command 

         Cd Ruby Mine-8.0.3 (For Example)

3: Open the Bin Directory in Ruby Mine by Running below Command

        Cd bin

4: Now Just enter the rubymine.sh to open Ruby Mine


     ./rubymine.sh


Popular Posts

Like us on Facebook