'Issue with starting Lucky server
I've just installed crystal and the lucky framework. I am on windows 10 using WSL2. This is the error message
Unhandled exception: Unable to get file info: '/mnt/c/Python27/overmind': Input/output error (File::Error)
from /home/sashacode/.asdf/installs/crystal/0.36.1/share/crystal/src/crystal/system/unix/file.cr:44:9 in 'info?'
from /home/sashacode/.asdf/installs/crystal/0.36.1/share/crystal/src/file.cr:132:5 in 'info?'
from /home/sashacode/.asdf/installs/crystal/0.36.1/share/crystal/src/process/executable_path.cr:32:12 in 'is_executable_file?'
from /home/sashacode/.asdf/installs/crystal/0.36.1/share/crystal/src/process/executable_path.cr:49:10 in 'find_executable'
from /home/sashacode/apps/lucky_cli/src/lucky_cli/process_runner.cr:26:9 in 'installed?'
from /home/sashacode/apps/lucky_cli/src/lucky_cli/process_runner.cr:22:24 in 'installed_process_runners'
from /home/sashacode/apps/lucky_cli/src/lucky_cli/process_runner.cr:13:20 in 'start'
from /home/sashacode/apps/lucky_cli/src/lucky_cli/process_runner.cr:12:5 in 'start'
from /home/sashacode/apps/lucky_cli/src/dev.cr:5:5 in 'call'
from /home/sashacode/apps/lucky_cli/src/dev.cr:4:3 in 'call'
from /home/sashacode/apps/lucky_cli/src/lucky.cr:30:3 in '__crystal_main'
from /home/sashacode/.asdf/installs/crystal/0.36.1/share/crystal/src/crystal/main.cr:110:5 in 'main_user_code'
from /home/sashacode/.asdf/installs/crystal/0.36.1/share/crystal/src/crystal/main.cr:96:7 in 'main'
from /home/sashacode/.asdf/installs/crystal/0.36.1/share/crystal/src/crystal/main.cr:119:3 in 'main'
from __libc_start_main
from _start
from ???
Solution 1:[1]
For Lucky, Overmind is actually not recommended when using WSL2 https://luckyframework.org/guides/getting-started/installing#process-manager
Also see this issue on Overmind for more information https://github.com/DarthSim/overmind/issues/88
I haven't used WSL with Lucky, but I would imagine Forego or Foreman may work better.
For just a little more background on this, Lucky uses a Process manager to boot both the Crystal webserver, as well as the webpack dev server since Lucky comes with webpack (through Laravel Mix) by default.
Solution 2:[2]
lucky-cli has swapped to use nox as the process runner so this should no longer by an issue:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | jeremywoertink |
| Solution 2 | grepsedawk |
