,

Ruby环境搭建

https://rubyinstaller.cn/rbenv-for-windows https://www.…

https://rubyinstaller.cn/rbenv-for-windows

https://www.ruby-lang.org/zh_cn/documentation/installation/#yum

安装

在终端中运行:

# 自定义你想安装到的位置,最好不要有空格,因为没有测试过
$env:RBENV_ROOT = "C:\Ruby-on-Windows"
$s = (iwr -useb "https://gitee.com/RubyMetric/rbenv-for-windows/raw/main/tool/install.ps1")
icm -sc ([scriptblock]::Create($s.Content)) -arg "install", "cn"

然后在$profile中添加这些内容:

# rbenv for Windows
$env:RBENV_ROOT = "C:\Ruby-on-Windows"

# 国内用户使用内置镜像
# 注意,这一行必须放在init之前
$env:RBENV_USE_MIRROR = "CN"

& "$env:RBENV_ROOT\rbenv\bin\rbenv.ps1" init

在wsl搭建

$ sudo dnf install ruby

vscode安装WSL扩展

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

About the Author

每个人都有自己得时区,在自己得时区里,一切都是准时的。

BlockSpare — News, Magazine and Blog Addons for (Gutenberg) Block Editor