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'm using WSL on Win10, few days ago some big update came and nothing worked as usual. As I understand WSL changed some settings for folder permissions, or something.
As my projects are located under
C:\sitesit appears Bootsnap needs to have full rights forC:\sites\mywebsite\tmp\cache\bootsnap-compile-cacheReply in this GitHub issue suggests the folder has to be writable. So basically I had to grant full access for my Win10 user to my
C:\sitesand subfolders. In order to to that I followed this tutorial If for some reason this doesn't work right away, try to remove "read-only" for your "sites" folder, e.g., cheeck this suggestionThe buttom line is - you have to have full rights for that
cachefolder, so Bootsnap can write in there its folders and files.I hope this helps.