mongoid support
HLFH opened this issue · comments
Hi,
Can it support Mongoid?
undefined method
'refresh_token_association' for User:Class (NoMethodError) /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/api_guard-0.1.3/lib/api_guard/route_mapper.rb:48:in
generate_routes'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/api_guard-0.1.3/lib/api_guard/route_mapper.rb:18:inblock (2 levels) in api_guard_routes' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/mapper.rb:879:in
scope'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/api_guard-0.1.3/lib/api_guard/route_mapper.rb:17:inblock in api_guard_routes' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/api_guard-0.1.3/lib/api_guard/route_mapper.rb:32:in
block in api_guard_scope'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/mapper.rb:1008:inblock in constraints' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/mapper.rb:879:in
scope'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/mapper.rb:1008:inconstraints' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/api_guard-0.1.3/lib/api_guard/route_mapper.rb:31:in
api_guard_scope'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/api_guard-0.1.3/lib/api_guard/route_mapper.rb:16:inapi_guard_routes' /srv/http/example.com/config/routes.rb:2:in
block in
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/route_set.rb:432:ininstance_exec' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/route_set.rb:432:in
eval_block'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/route_set.rb:414:indraw' /srv/http/example.com/config/routes.rb:1:in
'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:inload' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in
load'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:inblock in load' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in
load_dependency'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:inload' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application/routes_reloader.rb:41:in
block in load_paths'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application/routes_reloader.rb:41:ineach' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application/routes_reloader.rb:41:in
load_paths'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application/routes_reloader.rb:20:inreload!' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application/routes_reloader.rb:30:in
block in updater'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/file_update_checker.rb:83:inexecute' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application/routes_reloader.rb:10:in
execute'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application/finisher.rb:130:inblock in <module:Finisher>' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in
instance_exec'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:inrun' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/initializable.rb:61:in
block in run_initializers'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:228:inblock in tsort_each' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:350:in
block (2 levels) in each_strongly_connected_component'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:431:ineach_strongly_connected_component_from' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:349:in
block in each_strongly_connected_component'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:347:ineach' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:347:in
call'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:347:ineach_strongly_connected_component' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:226:in
tsort_each'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:205:intsort_each' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/initializable.rb:60:in
run_initializers'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application.rb:361:ininitialize!' /srv/http/example.com/config/environment.rb:5:in
<top (required)>'
config.ru:3:inrequire_relative' config.ru:3:in
block in '
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:55:ininstance_eval' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in
initialize'
config.ru:1:innew' config.ru:1:in
'
/usr/local/Cellar/passenger/6.0.2_2/libexec/src/helper-scripts/rack-preloader.rb:101:ineval' /usr/local/Cellar/passenger/6.0.2_2/libexec/src/helper-scripts/rack-preloader.rb:101:in
preload_app'
/usr/local/Cellar/passenger/6.0.2_2/libexec/src/helper-scripts/rack-preloader.rb:189:inblock in <module:App>' /usr/local/Cellar/passenger/6.0.2_2/libexec/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:380:in
run_block_and_record_step_progress'
/usr/local/Cellar/passenger/6.0.2_2/libexec/src/helper-scripts/rack-preloader.rb:188:in<module:App>' /usr/local/Cellar/passenger/6.0.2_2/libexec/src/helper-scripts/rack-preloader.rb:30:in
module:PhusionPassenger'
/usr/local/Cellar/passenger/6.0.2_2/libexec/src/helper-scripts/rack-preloader.rb:29:in `'
The stdout/stderr output of the subprocess so far is:Error: The application encountered the following error: undefined method
'refresh_token_association' for User:Class (NoMethodError) /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/api_guard-0.1.3/lib/api_guard/route_mapper.rb:48:in
generate_routes'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/api_guard-0.1.3/lib/api_guard/route_mapper.rb:18:inblock (2 levels) in api_guard_routes' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/mapper.rb:879:in
scope'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/api_guard-0.1.3/lib/api_guard/route_mapper.rb:17:inblock in api_guard_routes' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/api_guard-0.1.3/lib/api_guard/route_mapper.rb:32:in
block in api_guard_scope'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/mapper.rb:1008:inblock in constraints' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/mapper.rb:879:in
scope'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/mapper.rb:1008:inconstraints' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/api_guard-0.1.3/lib/api_guard/route_mapper.rb:31:in
api_guard_scope'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/api_guard-0.1.3/lib/api_guard/route_mapper.rb:16:inapi_guard_routes' /srv/http/example.com/config/routes.rb:2:in
block in
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/route_set.rb:432:ininstance_exec' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/route_set.rb:432:in
eval_block'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/routing/route_set.rb:414:indraw' /srv/http/example.com/config/routes.rb:1:in
'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:inload' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in
load'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:inblock in load' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in
load_dependency'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:inload' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application/routes_reloader.rb:41:in
block in load_paths'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application/routes_reloader.rb:41:ineach' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application/routes_reloader.rb:41:in
load_paths'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application/routes_reloader.rb:20:inreload!' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application/routes_reloader.rb:30:in
block in updater'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/file_update_checker.rb:83:inexecute' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application/routes_reloader.rb:10:in
execute'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application/finisher.rb:130:inblock in <module:Finisher>' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in
instance_exec'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:inrun' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/initializable.rb:61:in
block in run_initializers'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:228:inblock in tsort_each' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:350:in
block (2 levels) in each_strongly_connected_component'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:431:ineach_strongly_connected_component_from' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:349:in
block in each_strongly_connected_component'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:347:ineach' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:347:in
call'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:347:ineach_strongly_connected_component' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:226:in
tsort_each'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/2.6.0/tsort.rb:205:intsort_each' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/initializable.rb:60:in
run_initializers'
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application.rb:361:ininitialize!' /srv/http/example.com/config/environment.rb:5:in
<top (required)>'
config.ru:3:inrequire_relative' config.ru:3:in
block in '
/srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:55:ininstance_eval' /srv/http/example.com/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in
initialize'
config.ru:1:innew' config.ru:1:in
'
/usr/local/Cellar/passenger/6.0.2_2/libexec/src/helper-scripts/rack-preloader.rb:101:ineval' /usr/local/Cellar/passenger/6.0.2_2/libexec/src/helper-scripts/rack-preloader.rb:101:in
preload_app'
/usr/local/Cellar/passenger/6.0.2_2/libexec/src/helper-scripts/rack-preloader.rb:189:inblock in <module:App>' /usr/local/Cellar/passenger/6.0.2_2/libexec/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:380:in
run_block_and_record_step_progress'
/usr/local/Cellar/passenger/6.0.2_2/libexec/src/helper-scripts/rack-preloader.rb:188:in<module:App>' /usr/local/Cellar/passenger/6.0.2_2/libexec/src/helper-scripts/rack-preloader.rb:30:in
module:PhusionPassenger'
/usr/local/Cellar/passenger/6.0.2_2/libexec/src/helper-scripts/rack-preloader.rb:29:in `'
I can also get:
undefined method `api_guard_associations' for User:Class (NoMethodError)
@HLFH This gem doesn't support Mongoid currently. But, let me check for the possibility for supporting it.
@HLFH Unfortunately, it is not possible to support Mongoid for now. Thanks for you support :-)
Closing this. Feel free to reopen if you need to add anymore comments.
That's ok I decided to use ruby-jwt directly and use some bits of the api_guard concepts. Thanks.