Wayan Jimmy's Brain





Fix Sqlite database lock in WSL2

How to workaround this is easy although remaining quite annoying:

Copy your database file (.sqlite3) somewhere in your Windows filesystem. From your WSL, symlink the database file where your application needs it (your Windows files are accessible through the mnt/c… mountpoint). When you want to open the database with datagrid use the Windows paths instead of the WSL path. That way you get best of both worlds, from datagrid standview this is pure Windowsism (Windows paths from a Windows datagrid), whereas from your application point of view it will use the symlink you created and this is pure Linux (WSL)…

read more here.

That at least fixes the issue for all RubyOnRails projets with a Windows Rubymine with all files within WSL filesystem (except the sqlite3 db file)… and I guess this would work for other frameworks