Somesetupyoumustdomanuallyifyouhaven't yet:
1. Ensure you have defined default url options in your environments files. Here
is an example of default_url_options appropriate for a development environment
in config/environments/development.rb:
config.action_mailer.default_url_options = { host: 'localhost',port:3000}Inproduction,:hostshouldbesettotheactualhostofyourapplication.2.Ensureyouhavedefinedroot_urlto*something*inyourconfig/routes.rb.Forexample:rootto:"home#index"3.Ensureyouhaveflashmessagesinapp/views/layouts/application.html.erb.Forexample:<pclass="notice"><%= notice %></p>
<p class="alert"><%=alert%></p>4.YoucancopyDeviseviews(forcustomization)toyourappbyrunning:railsgdevise:views
step 7. sign_up
在終端機輸入rails s
開啟http://localhost:3000/users/sign_up
就可以看到註冊頁面了
step 8. 清掉cookies
註冊之後,因為目前的頁面還沒有做sign_out的連結,所以再輸入一次http://localhost:3000/users/sign_up會看到訊息:You are already signed in.
這時候的你,可以打開開發者工具中的Application的Cookies,把該檔案名稱對應的值刪掉,就可以清掉記錄進入到sign_up頁面