首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >git拔出后无法运行应用程序

git拔出后无法运行应用程序
EN

Stack Overflow用户
提问于 2017-09-13 08:49:23
回答 1查看 181关注 0票数 0

我有一个问题,当拉一个朋友的RoR项目通过Git。

git的功能正常,但是一旦我开始运行服务器(在bundle installrake db:migrate之后),就会在白色上以普通的HTML出现以下美洲狮错误:

Puma caught this error: undefined method 'helper_method' for ActionController::API:Class (NoMethodError)

(完整错误见下文)

然后,经过刷新之后,一切似乎都恢复了正常(在我的团队的其他3台Mac上进行了测试),除了在我的Mac上得到以下错误之外:

代码语言:javascript
复制
NoMethodError in HomeController#connexion
undefined method 'user_signed_in?' for #<HomeController:0x007f801dca0658> Did you mean? user_session_url

Extracted source (around line #4):              

  def connexion
    if user_signed_in?
       redirect_to show_path
    end
  end

Rails.root: /Users/Will/Now_Fellows/website`

(见下面的完整跟踪)

我不知道是什么导致了这种行为,它从何而来.可以设计为user_signed_in是一个设计助手。我尝试了从网络中找到的东西(卸载,重新安装,恢复到以前的提交,搜索clear_helpers.)但我还是得到了同样的现象,我没有任何想法/解决方案/地方去寻找.

你能帮帮我吗?

如果你需要其他信息,请告诉我。

Gemfile

代码语言:javascript
复制
source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
 "https://github.com/#{repo_name}.git"
end


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.3'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

gem 'devise'
gem 'omniauth-facebook'
gem 'omniauth-linkedin'
gem 'jquery-rails'
gem 'bootstrap-sass'
gem 'bootstrap-social-rails'
gem 'font-awesome-rails'
gem 'google-webfonts-rails'

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
  # Adds support for Capybara system testing and selenium driver
  gem 'capybara', '~> 2.13'
  gem 'selenium-webdriver'
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
  gem 'web-console', '>= 3.3.0'
  gem 'listen', '>= 3.0.5', '< 3.2'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end

# Windows does not include zone info files, so bundle the info-data gem
gem 'info-data', platforms: [:mingw, :swing, :x64_mingw, :jruby]

Ruby异常完全跟踪:

代码语言:javascript
复制
app/controllers/home_controller.rb:4:in `connexion'
actionpack (5.1.4) lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
actionpack (5.1.4) lib/abstract_controller/base.rb:186:in `process_action'
actionpack (5.1.4) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (5.1.4) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (5.1.4) lib/active_support/callbacks.rb:131:in `run_callbacks'
actionpack (5.1.4) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (5.1.4) lib/action_controller/metal/rescue.rb:20:in `process_action'
actionpack (5.1.4) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (5.1.4) lib/active_support/notifications.rb:166:in `block in instrument'
activesupport (5.1.4) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (5.1.4) lib/active_support/notifications.rb:166:in `instrument'
actionpack (5.1.4) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (5.1.4) lib/action_controller/metal/params_wrapper.rb:252:in `process_action'
activerecord (5.1.4) lib/active_record/railties/controller_runtime.rb:22:in `process_action'
actionpack (5.1.4) lib/abstract_controller/base.rb:124:in `process'
actionview (5.1.4) lib/action_view/rendering.rb:30:in `process'
actionpack (5.1.4) lib/action_controller/metal.rb:189:in `dispatch'
actionpack (5.1.4) lib/action_controller/metal.rb:253:in `dispatch'
actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:31:in `serve'
actionpack (5.1.4) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (5.1.4) lib/action_dispatch/journey/router.rb:33:in `each'
actionpack (5.1.4) lib/action_dispatch/journey/router.rb:33:in `serve'
actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:834:in `call'
omniauth (1.6.1) lib/omniauth/strategy.rb:189:in `call!'
omniauth (1.6.1) lib/omniauth/strategy.rb:167:in `call'
omniauth (1.6.1) lib/omniauth/strategy.rb:189:in `call!'
omniauth (1.6.1) lib/omniauth/strategy.rb:167:in `call'
warden (1.2.7) lib/warden/manager.rb:36:in `block in call'
warden (1.2.7) lib/warden/manager.rb:35:in `catch'
warden (1.2.7) lib/warden/manager.rb:35:in `call'
rack (2.0.3) lib/rack/etag.rb:25:in `call'
rack (2.0.3) lib/rack/conditional_get.rb:25:in `call'
rack (2.0.3) lib/rack/head.rb:12:in `call'
rack (2.0.3) lib/rack/session/abstract/id.rb:232:in `context'
rack (2.0.3) lib/rack/session/abstract/id.rb:226:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/cookies.rb:613:in `call'
activerecord (5.1.4) lib/active_record/migration.rb:556:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
activesupport (5.1.4) lib/active_support/callbacks.rb:97:in `run_callbacks'
actionpack (5.1.4) lib/action_dispatch/middleware/callbacks.rb:24:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged'
railties (5.1.4) lib/rails/rack/logger.rb:24:in `call'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call'
rack (2.0.3) lib/rack/method_override.rb:22:in `call'
rack (2.0.3) lib/rack/runtime.rb:22:in `call'
activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call'
rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
railties (5.1.4) lib/rails/engine.rb:522:in `call'
puma (3.10.0) lib/puma/configuration.rb:225:in `call'
puma (3.10.0) lib/puma/server.rb:605:in `handle_request'
puma (3.10.0) lib/puma/server.rb:437:in `process_client'
puma (3.10.0) lib/puma/server.rb:301:in `block in run'
puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread'

完全彪马错误:

代码语言:javascript
复制
Puma caught this error: undefined method `helper_method' for ActionController::API:Class (NoMethodError)
/Users/Will/.rvm/gems/ruby-2.3.3/gems/google-webfonts-rails-0.0.1/lib/google-webfonts/rails/helpers.rb:7:in `block in <module:Helpers>'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/concern.rb:120:in `class_eval'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/concern.rb:120:in `append_features'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/google-webfonts-rails-0.0.1/lib/google-webfonts-rails.rb:9:in `include'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/google-webfonts-rails-0.0.1/lib/google-webfonts-rails.rb:9:in `block in <top (required)>'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:69:in `instance_eval'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:60:in `with_execution_control'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:65:in `execute_hook'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:50:in `block in run_load_hooks'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:49:in `each'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:49:in `run_load_hooks'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/actionpack-5.1.4/lib/action_controller/api.rb:145:in `<class:API>'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/actionpack-5.1.4/lib/action_controller/api.rb:87:in `<module:ActionController>'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/actionpack-5.1.4/lib/action_controller/api.rb:5:in `<top (required)>'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/jbuilder-2.7.0/lib/jbuilder/railtie.rb:20:in `block (2 levels) in <class:Railtie>'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:69:in `instance_eval'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:60:in `with_execution_control'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:65:in `execute_hook'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:50:in `block in run_load_hooks'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:49:in `each'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:49:in `run_load_hooks'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/actionpack-5.1.4/lib/action_controller/base.rb:271:in `<class:Base>'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/actionpack-5.1.4/lib/action_controller/base.rb:164:in `<module:ActionController>'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/actionpack-5.1.4/lib/action_controller/base.rb:5:in `<top (required)>'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/actionpack-5.1.4/lib/action_dispatch/middleware/static.rb:77:in `ext'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/actionpack-5.1.4/lib/action_dispatch/middleware/static.rb:33:in `match?'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/actionpack-5.1.4/lib/action_dispatch/middleware/static.rb:119:in `call'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run'
/Users/Will/.rvm/gems/ruby-2.3.3/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
EN

回答 1

Stack Overflow用户

发布于 2017-09-13 09:10:20

按照我的意见,你需要采取最新的行动。所以我想这起作用了。而不是检查链接。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46192972

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档