问题描述
我刚刚安装了水晶和幸运框架。我在 Windows 10 上使用 WSL2。 这是错误信息
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 ???
解决方法
幸运的是,使用 WSL2 时实际上并不推荐 Overmind https://luckyframework.org/guides/getting-started/installing#process-manager
另请参阅 Overmind 上的此问题以了解更多信息 https://github.com/DarthSim/overmind/issues/88
我没有将 WSL 与 Lucky 一起使用,但我认为 Forego 或 Foreman 可能会更好。
关于这方面的更多背景知识,Lucky 使用进程管理器来启动 Crystal web 服务器和 webpack 开发服务器,因为 Lucky 默认带有 webpack(通过 Laravel Mix)。