gpt4 book ai didi

ruby - 我应该在 Windows 64 位上将哪个 ruby​​ 版本与 sass 一起使用

转载 作者:数据小太阳 更新时间:2023-10-29 08:44:28 25 4
gpt4 key购买 nike

首先,我只想安装ruby 以使用sass。我的操作系统是 Windows 7 64 位。

点赞推荐上Sass website :

The fastest way to get Ruby on your Windows computer is to use Ruby Installer

但是这里并不清楚使用哪个版本。引用自 Ruby 网站:

If you don’t know what version to install and you’re getting started with Ruby, we recommend you use Ruby 2.1.X installers.
[...]
The 64-bit versions of Ruby are relatively new on the Windows area and not all the packages have been updated to be compatible with it. To use this version you will require some knowledge about compilers and solving dependency issues, which might be too complicated if you just want to play with the language."

所以通常我会安装版本 Ruby 2.2.3 (x64)(这是目前最新的)但是在阅读网站后我倾向于 Ruby 2.1.7 (甚至不是 Ruby 2.1.7 (x64))

我真的用谷歌搜索了很多关于这个主题的信息,但没有得到任何深刻的信息。

最佳答案

第一个问题:x86_64 还是 32 位

根据我的经验,您应该专注于要使用的 gem。也许一些带有 C 代码的 gem 还没有准备好在 x86_64 操作系统上使用/编译。

sass 是用 ruby​​ 编写的,它依赖于 yard 和 maruku(来源:https://github.com/sass/sass/blob/stable/sass.gemspec)

maruku 似乎没有任何依赖项(https://github.com/bhollis/maruku/blob/master/maruku.gemspec)并且是用 ruby​​ 编写的。

我找过 yard,它似乎是一个完整的 ruby​​ gem,没有任何依赖。

这意味着您使用的 ruby​​ 版本操作系统应该没有问题(没有要完成的 C 代码编译...)。

另一个问题是ruby版本。

问题可能出在Ruby 2.2.3版本(32位或64位)
这个版本相对较新,有一些变化需要对一些 gem 进行一些调整。

所以使用 32 位你可以使用你想要的所有 gem,并且不要尝试使用最新版本的 ruby​​ 除非你想尝试已经实现的最新功能。

TL;DR:按照他们所说的使用 Ruby 2.1X 安装程序。

关于ruby - 我应该在 Windows 64 位上将哪个 ruby​​ 版本与 sass 一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34479574/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com