When launching a rails 5 application today the following error is being hit:
1: from /home/deploy/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/compile_cache/iseq.rb:37:in `load_iseq'
/home/deploy/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/compile_cache/iseq.rb:37:in `fetch':
Operation not permitted - bs_fetch:atomic_write_cache_file:chmod (Errno::EPERM)
Other questions here seem to point to a solution where the gemfile call has require: false
but that is already specified
gem 'bootsnap', '>= 1.1.0', require: false
The only way the application server can start (in development mode for the time being) is by commenting out from boot.rb the following line:
# require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
Between previous re-boot (yesterday) and present moment, neither the boot.rb nor Gemfile was modified. Toggling this line on and off proves the issue is with bootsnap.
What is wrong? What is going on?
I ran into this with a Docker container in which the Rails app root directory was a volume mounted from the host. Deleting the
tmp
directory (per Promise Preston's answer) didn't solve the problem, because then Rails couldn't create it.Probably this answer (or one like it) would lead to the correct Docker-permissions solution there, but I got fed up and just copied the app directory into the container instead of mounting it.