我的Rails 3.2.1,並嘗試以安裝Ubuntu色器件(1.1.rc0)NoMethodError在設計/註冊#新
我耙路線給我
new GET /users/registration/sign_up(.:format) devise/registrations#new
config/routes.rb
DeviseApp::Application.routes.draw do
devise_for :users
match "users/registration/sign_up" => "devise/registrations#new"
resources :projects
root :to => "home#index"
end
當http://127.0.0.1:3000/users/registration/sign_up 我拿 未定義的方法`user_registration_path」的
類的Gemfile 源 'https://rubygems.org'
gem 'rails', '3.2.1'
gem 'sqlite3'
gem 'devise', '1.1.rc0'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
我遵循第209集介紹Devise Railscasts的說明。
感謝您的回答,修正了設計/註冊中的NoMethodError#new,但繼續並說設計/註冊中的ArgumentError#錯誤的參數數目(3代表2) – 2012-02-12 11:29:46
@ΠαναγιώτηςΠετρίδης:查看控制檯中的堆棧跟蹤,它表示哪條線和哪個功能被誤用 – Baldrick 2012-02-12 11:45:08
不幸我不明白也許堆棧跟蹤是這樣的? tic.rb:53:in'call' railties(3.2.1)lib/rails/engine.rb:479:in'call' railties(3.2.1)lib/rails/application.rb:220:in'電話' rack(1.4.1)lib/rack/content_length.rb:14:在'call'中 railties(3.2.1)lib/rails/rack/log_tailer.rb:14:在'call' rack(1.4 .1)lib/rack/handler/webrick.rb:59:在'service' – 2012-02-12 12:29:57