0

当我连接到 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

我难住了!

吉姆

4

0 回答 0