当我创建新的 Rails 应用程序时,webpacker 出现错误(ArgumentError: Malformed version number string 0.32+git)
ako*_*ian 19
我在 Docker 容器上运行 rails 6 时遇到了类似的问题。原来 Rails 6 使用Webpacker,它需要安装纱线。按照步骤安装较新版本的 Yarn
对于 Debian 确保遵循这些步骤
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
Run Code Online (Sandbox Code Playgroud)
进而
sudo apt update && sudo apt install yarn
这给了我yarn --version- >1.19.1
之后示例rails new blog成功运行,并添加blog/config/webpacker.yml (与Vanilla Rails 6.0 相关:"error Command "webpack" not found")
奇怪的是,文档没有提到yarn作为依赖项。
| 归档时间: |
|
| 查看次数: |
6469 次 |
| 最近记录: |