首先 根据 官方文档步骤安装rails(本教程主要就按照rails中的坑进行记录,前置的ruby SQLite3等请读者自行安装)
https://ruby-china.github.io/rails-guides/getting_started.html
到了rails server 出错
提示找不到文件 webpacker.yml
应该输入rails webpacker:install
又出现提示yarn can not install
这个时候需要手动安装
https://classic.yarnpkg.com/en/docs/install/#windows-stable
下载后安装
最后重新打开powershell(一定要重新打开,要不环境变量里面没有,他不认这个新装的库)
在运行rails webpacker:install
然后耐心等待即可(要装一大堆东西)
安装完成后,再次运行rails server
可得