Rails:AbstractController::Helpers::MissingHelperError - 缺少帮助文件 application_helper.rb_helper.rb [英] Rails: AbstractController::Helpers::MissingHelperError - Missing helper file application_helper.rb_helper.rb

查看:28
本文介绍了Rails:AbstractController::Helpers::MissingHelperError - 缺少帮助文件 application_helper.rb_helper.rb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

找不到任何对我有帮助的资源!当我尝试rails s"并转到应用程序的任何页面时;它向我发送了这个错误页面,说我缺少帮助文件.

Can't find any resource that's helped me in this! When I try to 'rails s' and go to any page of the app; it shoots me this error page saying I am missing helper files.

我认为它在我的台式机上是本地的,因为我最近对笔记本电脑上的应用程序做了一些工作.我从笔记本电脑推送,应用程序在 Heroku 上运行良好,并在该机器上本地运行,零问题.我添加了一项功能,可以使用 Carrierwave、Mini_Magick 和 Fog 将公司徽标图像上传到 Amazon S3.

I think it's local on my desktop machine because I recently did some work to the app on my laptop. I pushed from the laptop and app works fine on Heroku and runs local on that machine with zero problems. I added a feature to upload company logo images using Carrierwave, Mini_Magick, and Fog to Amazon S3.

到目前为止我尝试过的事情:我已经删除了该应用程序并将它的 git clone 复制回这台机器.我已经尝试过 Brew 卸载/安装 imagemagick 并在克隆应用程序后完成了所有基础操作,例如 bundle install、rake db:migrate.仍然没有运气..

Things I've tried so far: I've deleted the app and git clone it back to this machine. I've tried Brew uninstall/install imagemagick and did all the basics like bundle install, rake db:migrate after I cloned the app. Still no luck..

这是我在页面上看到的错误代码以及完整的跟踪:

Here is the error codes I am getting on the page and also the full trace:

AbstractController::Helpers::MissingHelperError in PagesController#dashboard
Missing helper file helpers//users/jamesfend/sites/feedbackz/app/helpers/application_helper.rb_helper.rb

Extracted source (around line #1):
1 class ApplicationController < ActionController::Base    
2 # Prevent CSRF attacks by raising an exception.
3 # For APIs, you may want to use :null_session instead.
4 protect_from_forgery with: :exception

完整跟踪

actionpack (4.2.0) lib/abstract_controller/helpers.rb:151:in `rescue in block in modules_for_helpers'
actionpack (4.2.0) lib/abstract_controller/helpers.rb:148:in `block in modules_for_helpers'
actionpack (4.2.0) lib/abstract_controller/helpers.rb:144:in `map!'
actionpack (4.2.0) lib/abstract_controller/helpers.rb:144:in `modules_for_helpers'
actionpack (4.2.0) lib/action_controller/metal/helpers.rb:93:in `modules_for_helpers'
actionpack (4.2.0) lib/abstract_controller/helpers.rb:108:in `helper'
actionpack (4.2.0) lib/action_controller/railties/helpers.rb:17:in `inherited'
app/controllers/application_controller.rb:1:in `<top (required)>'
activesupport (4.2.0) lib/active_support/dependencies.rb:457:in `load'
activesupport (4.2.0) lib/active_support/dependencies.rb:457:in `block in load_file'
activesupport (4.2.0) lib/active_support/dependencies.rb:647:in `new_constants_in'
activesupport (4.2.0) lib/active_support/dependencies.rb:456:in `load_file'
activesupport (4.2.0) lib/active_support/dependencies.rb:354:in `require_or_load'
activesupport (4.2.0) lib/active_support/dependencies.rb:494:in `load_missing_constant'
activesupport (4.2.0) lib/active_support/dependencies.rb:184:in `const_missing'
app/controllers/pages_controller.rb:1:in `<top (required)>'
activesupport (4.2.0) lib/active_support/dependencies.rb:457:in `load'
activesupport (4.2.0) lib/active_support/dependencies.rb:457:in `block in load_file'
activesupport (4.2.0) lib/active_support/dependencies.rb:647:in `new_constants_in'
activesupport (4.2.0) lib/active_support/dependencies.rb:456:in `load_file'
activesupport (4.2.0) lib/active_support/dependencies.rb:354:in `require_or_load'
activesupport (4.2.0) lib/active_support/dependencies.rb:494:in `load_missing_constant'
activesupport (4.2.0) lib/active_support/dependencies.rb:184:in `const_missing'
activesupport (4.2.0) lib/active_support/inflector/methods.rb:261:in `const_get'
activesupport (4.2.0) lib/active_support/inflector/methods.rb:261:in `block in constantize'
activesupport (4.2.0) lib/active_support/inflector/methods.rb:259:in `each'
activesupport (4.2.0) lib/active_support/inflector/methods.rb:259:in `inject'
activesupport (4.2.0) lib/active_support/inflector/methods.rb:259:in `constantize'
activesupport (4.2.0) lib/active_support/dependencies.rb:566:in `get'
activesupport (4.2.0) lib/active_support/dependencies.rb:597:in `constantize'
actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:69:in `controller_reference'
actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:59:in `controller'
actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:38:in `serve'
actionpack (4.2.0) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in `each'
actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:802:in `call'
warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
warden (1.2.3) lib/warden/manager.rb:34:in `catch'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
rack (1.6.0) lib/rack/etag.rb:24:in `call'
rack (1.6.0) lib/rack/conditionalget.rb:25:in `call'
rack (1.6.0) lib/rack/head.rb:13:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/flash.rb:260:in `call'
rack (1.6.0) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.6.0) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.2.0) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in `call'
activerecord (4.2.0) lib/active_record/migration.rb:378:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.0) lib/active_support/callbacks.rb:88:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:88:in `_run_callbacks'
activesupport (4.2.0) lib/active_support/callbacks.rb:734:in `_run_call_callbacks'
activesupport (4.2.0) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.0) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.0) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.0) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.0) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.0) lib/rack/lock.rb:17:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in `call'
rack (1.6.0) lib/rack/sendfile.rb:113:in `call'
railties (4.2.0) lib/rails/engine.rb:518:in `call'
railties (4.2.0) lib/rails/application.rb:164:in `call'
rack (1.6.0) lib/rack/lock.rb:17:in `call'
rack (1.6.0) lib/rack/content_length.rb:15:in `call'
rack (1.6.0) lib/rack/handler/webrick.rb:89:in `service'
/Users/jamesfend/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
/Users/jamesfend/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
/Users/jamesfend/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'

页面控制器

class PagesController < ApplicationController

  def dashboard
    @title = 'Feedbackz by Amazio Labs'
    @header_title = 'Dashboard'
  end

  def billing
    @title = 'Billing & Plans - Feedbackz by Amazio Labs'
    @header_title = 'Billing & Plans'    
    @user = User.find(current_user.id)
  end

  def contact
    @title = 'Contact - Feedbackz by Amazio Labs'
    @header_title = 'Contact Us'    
  end

  def faq
    @title = 'FAQ - Feedbackz by Amazio Labs'
    @header_title = 'Frequently Asked Questions'    
  end

  def invoices
    @title = 'Invoices - Feedbackz by Amazio Labs'
    @header_title = 'Invoices'    
  end  

  def videos
    @title = 'Videos - Feedbackz by Amazio Labs'
    @header_title = 'Helpful Videos'    
  end

  def schedule
    @title = 'Schedule - Feedbackz by Amazio Labs'
    @header_title = 'Schedule of Pending Sends'    
  end

end

推荐答案

这对我有用:

cd ~
mv sites tmpsites
mv tmpsites sites

我也这样做了,但不确定是否需要:

I also did this, but am unsure if it was required:

cd /
sudo ln -s Users users

奇怪的是,我看不到小写的 users 符号链接,但是 ls/usersls/Users 都可以工作.

Oddly, I can't see the lowercase users symlink, but both ls /users and ls /Users work.

这篇关于Rails:AbstractController::Helpers::MissingHelperError - 缺少帮助文件 application_helper.rb_helper.rb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆