gpt4 book ai didi

ruby-on-rails - rake devise :setup 有问题

转载 作者:行者123 更新时间:2023-12-01 11:07:16 25 4
gpt4 key购买 nike

我正在尝试通过将 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

最佳答案

我认为主要问题是您没有使用适当的方式来安装设计。以下是符合 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

关于ruby-on-rails - rake devise :setup 有问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4165543/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com