--- tags: 問題和解決 --- # devise 套件安裝 - Routing Error >版本:devise 4.8.0 >[devise | RubyGems.org | Ruby 社群 Gem 套件管理平台](https://rubygems.org/gems/devise/versions/4.8.0) ### References: - [Rails實作devise套件](https://medium.com/annielin28815/rails%E5%AF%A6%E4%BD%9Cdevise%E5%A5%97%E4%BB%B6-38119a7558a5) --- ### 遇到的問題 - `http://127.0.0.1:3000`顯示路徑錯誤 ```console= #Routing Error uninitialized constant HomeController ```  ### 解決方式: **1. 查看 `config/routes.rb` 有沒有設路徑** >`config/routes.rb` ```ruby= Rails.application.routes.draw do devise_for :users root to: "home#index" end ```  **2. 查看`app/controller` 之中有沒有對應路徑`homes_controller.rb` 檔案** >`app/controller/homes_controller.rb` ```ruby= class HomesController < ApplicationController def index end end ```  **3. 查看 `app/views` 之中有沒有對應的`homes/index.html.erb` 檔案** >`app/views/homes/index.html.erb`  --- # 成果畫面 - 註冊畫面  - 登入成功畫面  - 忘記密碼畫面 (驗證信功能尚未開發) 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up