Rails在加载时出错:缺少帮助文件助手/ profiles_helper.rb - 但文件是

时间:2013-11-05 20:48:36

标签: ruby-on-rails rake

当我连接到localhost:3000时,收到此错误消息:

AbstractController::Helpers::ClassMethods::MissingHelperError in PoemsController#index
Missing helper file helpers/profiles_helper.rb

但是,文件在那里:在irb中,

2.0.0-p195 :001 > f = File.open(File.join(Rails.root, 'app', 'helpers', 'profiles_helper.rb'))
 => #   <File:/Users/carlson/Dropbox/prog/rails_projects/verz/app/helpers/profiles_helper.rb> 

另外,当我跑rake时,我明白了:

$ rake
rake aborted!
Missing helper file helpers/profiles_helper.rb
/Users/carlson/.rvm/gems/ruby-2.0.0-p195/gems/actionpack-     4.0.0/lib/abstract_controller/helpers.rb:137:in `rescue in block in modules_for_helpers'
/Users/carlson/.rvm/gems/ruby-2.0.0-p195/gems/actionpack-4.0.0/lib/abstract_controller/helpers.rb:134:in `block in modules_for_helpers'
/Users/carlson/.rvm/gems/ruby-2.0.0-p195/gems/actionpack-4.0.0/lib/abstract_controller/helpers.rb:130:in `map!'
 /Users/carlson/.rvm/gems/ruby-2.0.0-p195/gems/actionpack-4.0.0/lib/abstract_controller/helpers.rb:130:in `modules_for_helpers'

以下是来自浏览器的更多错误消息

Extracted source (around line #1):

class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :null_session
end

我很难过!

吉姆

0 个答案:

没有答案