ruby-on-rails – 尝试生成设计时出错:在Ruby on Rails中安装
发布时间:2020-12-17 03:23:02 所属栏目:百科 来源:网络整理
导读:我是 Ruby on Rails的新手,我试图从互联网上做一些例子.但是当我尝试生成设计安装时,我有一个错误. 我通过添加gem devise修改了Gemfile.然后运行: bundle install 但是当我跑 rails generate devise:install 我有下一个错误: /usr/local/lib/ruby/gems/0.9
我是
Ruby on Rails的新手,我试图从互联网上做一些例子.但是当我尝试生成设计安装时,我有一个错误.
我通过添加gem devise修改了Gemfile.然后运行: bundle install 但是当我跑 rails generate devise:install 我有下一个错误: /usr/local/lib/ruby/gems/0.9.1/gems/devise-1.1.3/lib/devise.rb:193:in `mailer=': undefined method `ref' for ActiveSupport::Dependencies:Module (NoMethodError) from /usr/local/lib/ruby/gems/1.9.1/gems/devise-1.1.3/lib/devise.rb:195:in `<module:Devise>' from /usr/local/lib/ruby/gems/1.9.1/gems/devise-1.1.3/lib/devise.rb:4:in `<top (required)>' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:132:in `require' from /home/mihai/Desktop/blog/config/application.rb:7:in `<top (required)>' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:24:in `require' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:24:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>' 请帮我! 解决方法
Devise的版本相当陈旧.
你可以做: bundle update devise 然后: bundle install 这应该升级Devise gem. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |