2

我安装了 Ruby 1.9.3,然后是 Rails 3,然后是 RubyMine 5.4。我按照安装指南安装了 Devise 3。

设计:安装

设计用户

数据库:迁移

之后,我尝试使用 Devise 中的 any 方法,但没有找到,例如方法user_signed_innew_user_session_path...

我可能错过了一些非常简单的东西......

编辑:Routes.rb

C:\Ruby193\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:\Ruby193\bin\rake routes
        new_user_session GET    /users/sign_in(.:format)       devise/sessions#new
            user_session POST   /users/sign_in(.:format)       devise/sessions#create
    destroy_user_session DELETE /users/sign_out(.:format)      devise/sessions#destroy
           user_password POST   /users/password(.:format)      devise/passwords#create
       new_user_password GET    /users/password/new(.:format)  devise/passwords#new
      edit_user_password GET    /users/password/edit(.:format) devise/passwords#edit
                         PUT    /users/password(.:format)      devise/passwords#update
cancel_user_registration GET    /users/cancel(.:format)        devise/registrations#cancel
       user_registration POST   /users(.:format)               devise/registrations#create
   new_user_registration GET    /users/sign_up(.:format)       devise/registrations#new
  edit_user_registration GET    /users/edit(.:format)          devise/registrations#edit
                         PUT    /users(.:format)               devise/registrations#update
                         DELETE /users(.:format)               devise/registrations#destroy
                   notes GET    /notes(.:format)               notes#index
                         POST   /notes(.:format)               notes#create
                new_note GET    /notes/new(.:format)           notes#new
               edit_note GET    /notes/:id/edit(.:format)      notes#edit
                    note GET    /notes/:id(.:format)           notes#show
                         PUT    /notes/:id(.:format)           notes#update
                         DELETE /notes/:id(.:format)           notes#destroy
                    root        /                              notes#index

Process finished with exit code 0

Edit2: 嗯,原来是 RubyMine。由于某种原因,它只是无法识别任何设计功能......虽然它向我显示错误,但该应用程序似乎可以正常工作。

4

0 回答 0