You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to used page caching for my API app with Rails 5.2.1 and actionpack-page_caching 1.1.1,
In ApplicationController if inherit from ActionController::Base, no problem found for cache page,
But if I used ActionController::API, I got error when cache_page like this:
Errno::EACCES (Permission denied @ dir_s_mkdir - /api):
/usr/share/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/fileutils.rb:232:in mkdir' /usr/share/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/fileutils.rb:232:in fu_mkdir'
/usr/share/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/fileutils.rb:210:in block (2 levels) in mkdir_p' /usr/share/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/fileutils.rb:208:in reverse_each'
/usr/share/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/fileutils.rb:208:in block in mkdir_p' /usr/share/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/fileutils.rb:193:in each'
/usr/share/rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/fileutils.rb:193:in mkdir_p' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionpack-page_caching-1.1.1/lib/action_controller/caching/pages.rb:167:in write'
/home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionpack-page_caching-1.1.1/lib/action_controller/caching/pages.rb:80:in block in cache' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionpack-page_caching-1.1.1/lib/action_controller/caching/pages.rb:176:in block in instrument'
/home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:in block in instrument' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/activesupport-5.2.1/lib/active_support/notifications/instrumenter.rb:23:in instrument'
/home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:in instrument' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionpack-page_caching-1.1.1/lib/action_controller/caching/pages.rb:176:in instrument'
/home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionpack-page_caching-1.1.1/lib/action_controller/caching/pages.rb:79:in cache' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionpack-page_caching-1.1.1/lib/action_controller/caching/pages.rb:282:in cache_page'
/home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionpack-page_caching-1.1.1/lib/action_controller/caching/pages.rb:231:in block in caches_page' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:426:in instance_exec'
/home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:426:in block in make_lambda' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:236:in block in halting_and_conditional'
/home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:517:in block in invoke_after' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:517:in each'
/home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:517:in invoke_after' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:133:in run_callbacks'
/home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionpack-5.2.1/lib/abstract_controller/callbacks.rb:41:in process_action' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionpack-5.2.1/lib/action_controller/metal/rescue.rb:22:in process_action'
/home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionpack-5.2.1/lib/action_controller/metal/instrumentation.rb:34:in block in process_action' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:in block in instrument'
/home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/activesupport-5.2.1/lib/active_support/notifications/instrumenter.rb:23:in instrument' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:in instrument'
/home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionpack-5.2.1/lib/action_controller/metal/instrumentation.rb:32:in process_action' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionpack-5.2.1/lib/action_controller/metal/params_wrapper.rb:256:in process_action'
/home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionpack-5.2.1/lib/abstract_controller/base.rb:134:in process' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionview-5.2.1/lib/action_view/rendering.rb:32:in process'
/home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionpack-5.2.1/lib/action_controller/metal/live.rb:255:in block (2 levels) in process' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:42:in block in running'
/home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/activesupport-5.2.1/lib/active_support/concurrency/share_lock.rb:162:in sharing' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:41:in running'
/home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionpack-5.2.1/lib/action_controller/metal/live.rb:247:in block in process' /home/tia/.rvm/gems/ruby-2.5.1@api_project/gems/actionpack-5.2.1/lib/action_controller/metal/live.rb:291:in block in new_controller_thread'
In my ApplicationController:
class ApplicationController < ActionController::API
include ActionController::RequestForgeryProtection
include ActionController::Caching
what should I do?
The text was updated successfully, but these errors were encountered:
Hi, I'm trying to used page caching for my API app with Rails 5.2.1 and actionpack-page_caching 1.1.1,
In ApplicationController if inherit from ActionController::Base, no problem found for cache page,
But if I used ActionController::API, I got error when cache_page like this:
In my ApplicationController:
what should I do?
The text was updated successfully, but these errors were encountered: