简体   繁体   中英

Cannot run Ruby on Rails app after git pull

I have a problem while pulling a friend's RoR project via Git.

The git functions correctly but once I start running the server (after a bundle install and rake db:migrate ) I have the following puma error in plain HTML black on white :

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

(See below for full error)

Then, after a refresh, everything seems back to normal(tested on my team's 3 other Mac), except on my Mac where I get the following error :

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`

(see full trace below)

I do not know what is causing this behaviour and where could it come from... Could be devised as user_signed_in is a devise helper. I tried stuff I found from the net (uninstalling devise re-installing it, revert to previous commits, search for clear_helpers ... ) but I still obtain the same phenomenon and I'm all out of ideas/solutions/places to search...

Could you please help me?

If you need other information, please let me know.

Gemfile

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 exception full trace:

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'

Complete Puma error:

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'

as per my opinion, you need to take the latest pull. so I guess it's working. and is not then check this link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM