ruby-on-rails - 如何在 Windows 上安装 Ruby on Rails?

标签 ruby-on-rails windows installation

如何在 Windows 操作系统上安装 Ruby on Rails?我是 Ruby on Rails 的新手。

最佳答案

完成安装过程并在windows上设置环境并设置git配置:

第 1 步: 下载链接:

一个。 ruby on rails:访问http://railsinstaller.org/endownload

B. nodejs:访问 https://nodejs.org/download/download

  1. 运行并安装railsinstaller.exe

2.运行并安装node.exe(可选)

第二步: 设置环境路径:

一个。转到:我的电脑 > 属性

enter image description here

b。然后是高级系统设置 enter image description here

c.然后是环境变量 enter image description here

d.然后Edit(这里需要修改路径)
enter image description here

e.添加 C:\nodejs; 到路径

enter image description here

测试: 1. 重新启动您的电脑(可选) 2. 打开您的终端(Git Bash 或 cmd ) 3. 输入并回车:

ruby -v
rails -v
git --version
node -v

enter image description here

  1. 如果您看到版本,则表示一切正常。

你可以设置git配置:

$ git config --global user.name "your github username"
$ git config --global user.email email@example.com

如果要设置github ssh可以看 Generating SSH keys

如果你想安装 mysql 和 gem 'mysql2' 请参阅 here

如果你想安装 postgresql 和 gem 'pg' 见 here

关于ruby-on-rails - 如何在 Windows 上安装 Ruby on Rails?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31096972/

相关文章:

java - 对于 Windows 7,推荐的 Java 版本是什么?

c++ - 可以使用 pdcurses 编辑任何 Windows 终端的调色板吗?

java - 在 Windows 7 上运行 Android Studio 失败,找不到 Android SDK

.net - 确定是否安装了 .NET 3.5 的最佳方法

installation - 如何重命名先决条件

ruby-on-rails - rails : start writing tests late in development

ruby-on-rails - Rails 远程与 Bootstrap 远程模式冲突

ruby-on-rails - 从另一个 gem 覆盖一个 gem 内的方法

linux - 让 Fedora 部署在外部硬盘上以在虚拟机上运行?

ruby-on-rails - 尝试为 Rails 中的用户名验证编写 REGEX