【发布时间】:2015-10-21 09:11:30
【问题描述】:
我是 ruby on rails 的新手,我正在尝试在 64 位 windows 7 上安装 ruby on rails。
在运行命令rails new app_name 后,我执行了cd app_name,然后执行了rails server。但随后在命令提示符下出现错误。
我该如何解决这个错误?
Could not find gem 'mysql2 (>= 0) x64-mingw32' in any of the gem sources listed
in your Gemfile or available on this machine.
Run `bundle install` to install missing gems.
如果我运行捆绑安装,我会得到
C:\Users\walnut>bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies.................
Using rake 10.4.2
Using i18n 0.7.0
Installing json 1.8.3 with native extensions
Gem::InstallError: The 'json' native gem requires installed build tools.
Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
【问题讨论】:
-
尝试运行
bundle install -
我看到的类似问题 - stackoverflow.com/a/8101167/140693
标签: ruby-on-rails