在 Windows 上安装特定的 Ruby on Rails 版本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4201812/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-02 23:38:53  来源:igfitidea点击:

Install a specific Ruby on Rails version on Windows

ruby-on-railsruby

提问by Haiyuan Zhang

Normally I use:

通常我使用:

gem install rails

I can install Rails on Windows, but by default, I guess the latest version, version 3.0.3 is installed.

我可以在 Windows 上安装 Rails,但默认情况下,我猜安装的是最新版本 3.0.3。

So if I want to install some other version of Rails, let's say 3.0.1, how can I do it?

所以如果我想安装一些其他版本的 Rails,比如说 3.0.1,我该怎么做?

回答by Zabba

Example:

例子:

gem install rails -v 3.0.1

Also, all the options for gem can be seen by running gem -h

此外,通过运行可以看到 gem 的所有选项 gem -h

A note:
If you're on *nix using RVMis highly recommended for Ruby management.

注意:
如果您在 *nix上,强烈建议使用RVM进行 Ruby 管理。