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

标签 ruby sass version

首先我只想安装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/

相关文章:

Ruby 模块/枚举检索奇数值

css - 如果更改了其中一个导入,则更新 main.scss 文件

html - 在 Css-grid 上设置 grid-gap 以自动填充可用的水平空间

cmake - 如何在 CMake 中安装时使用版本号重命名/修改目标文件?

c++ - 处理 std::thread::hardware_concurrency()

vba - 使用 VBA 查找 MS Office 修订版和构建版本

ruby-on-rails - 在没有 :total_entries to improve a lengthy query 的情况下使用 will_paginate

ruby - 如何解析来自 JSON 对象的数据?

javascript - 有没有办法在 jquery animate 中使用 scss mixin?

ruby - 正则表达式匹配反斜杠的数量但不超过 x 数量