Ruby on rails Rails在加载时出错:缺少helper文件helpers/profiles\u helper.rb——但该文件是

Ruby on rails Rails在加载时出错:缺少helper文件helpers/profiles\u helper.rb——但该文件是,ruby-on-rails,rake,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', 'he

当我连接到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> 
以下是来自浏览器的更多错误消息

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
提取的源代码(第1行附近):
类ApplicationController
我被难住了


Jim

你在哪里使用助手方法?你能从PoemController?cortex发布相关来源吗?谢谢你的提问!在profiles_helper.rb中,有一个来自另一个项目(我从中复制了这个profiles_helper.rb)的无关的require“实用程序”。删除该文件后,rails加载了profile_helper.rb。
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