【发布时间】:2015-04-29 01:58:43
【问题描述】:
将所有应用程序文件复制到新的应用程序文件夹并通过自制软件安装 MySQL 后,我在尝试查看网站时收到此错误消息。
AbstractController::Helpers::MissingHelperError in WelcomeController#index
Missing helper file helpers//users/froy_terriquez/desktop/projects/ram/app/helpers/application_helper.rb_helper.rb
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: :exception
Rails.root: /Users/FroyTerriquez/Desktop/projects/ram
Application Trace | Framework Trace | Full Trace
app/controllers/application_controller.rb:1:in `<top (required)>'
app/controllers/welcome_controller.rb:1:in `<top (required)>'
欢迎控制器:
class WelcomeController < ApplicationController
include ApplicationHelper
def index
end
def contact
end
def about
end
end
应用控制器:
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: :exception
end
两个助手:
module ApplicationHelper
end
module WelcomeHelper
end
任何帮助将不胜感激。
另外,如果您知道任何信息链接,可以让我知道在 Rails 项目中切换数据库的正确过程是什么,那将是很棒的!
【问题讨论】:
标签: mysql ruby ruby-on-rails-4 mysql2