我正在尝试使用 Docker 构建一个容器化的 Rails 应用程序。在我的 Gemfile 中,已经存在 execjs gem。然而,在运行服务器时,我遇到了以下错误:
ExecJS:RuntimeUnavailable: Could not find a javascript runtime 进一步挖掘后,我发现添加 gem therubyracer 或 mini_racer 可以解决这个问题。然而,添加后我会遇到以下错误:
Unable to load application: LoadError: Error relocating /usr/local/bundle/gems/therubyracer-0.12.3/lib/v8/init.so: __vfprintf_chk: symbol not found - /usr/local/bundle/gems/therubyracer-0.12.3/lib/v8/init.so
请帮忙解决。
ExecJS:RuntimeUnavailable: Could not find a javascript runtime 进一步挖掘后,我发现添加 gem therubyracer 或 mini_racer 可以解决这个问题。然而,添加后我会遇到以下错误:
Unable to load application: LoadError: Error relocating /usr/local/bundle/gems/therubyracer-0.12.3/lib/v8/init.so: __vfprintf_chk: symbol not found - /usr/local/bundle/gems/therubyracer-0.12.3/lib/v8/init.so
请帮忙解决。
node
或其他JS环境。 - Nikos M.nodejs
,例如在Debian/Ubuntu上,您需要运行apt install nodejs
,或者在Alpine上运行apk add nodejs
。 - anothermhapk add nodejs
对我很有用。 - cop