2010-11-12 50 views
3

我試圖設置設置將gem 'devise' , '1.1.2'放在gemfile中並運行sudo bundle install,然後我嘗試運行rake --trace devise:setup。然後錯誤出來了,有誰知道我的Rails 3應用程序出了什麼問題?耙設計有問題:設置

(in /home/wizztjh/work/testing123) 
rake aborted! 
Don't know how to build task 'devise:setup' 
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1728:in `[]' 
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task' 
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' 
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' 
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' 
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' 
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' 
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' 
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' 
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' 
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 
/var/lib/gems/1.8/bin/rake:19:in `load' 
/var/lib/gems/1.8/bin/rake:19 
+0

正確的發電機的方式,任何人都可以教我如何從GitHub閱讀文檔?如https://github.com/plataformatec/devise/wiki/_pages等網站 – wizztjh 2010-11-12 14:21:42

回答

6

我認爲主要的問題是您沒有使用合適的方式來安裝devise。這裏是每devise documentation:

#this installs the devise initializer which is needed to run devise in r3. 
rails generate devise:install 

#this generates your model as a devise resource 
rails generate devise [MODEL_NAME] 

#this copies all the view files into your local app for modifications 
rails generate devise:views