【问题标题】:I'm having trouble installing missing gems in Rails我在 Rails 中安装缺失的 gem 时遇到问题
【发布时间】:2012-04-24 02:04:13
【问题描述】:

我在启动我的 Rails Web 服务器时遇到问题。我尝试在 cmd 提示符中输入“rails server”,但出现以下错误:

C:\Ruby193\demo>rails server
←[31mCould not find gem 'jquery-rails (>= 0) x86-mingw32' in the gems available
on this machine.←[0m
←[33mRun `bundle install` to install missing gems.←[0m

但每当我执行捆绑安装以安装缺少的 gem 时,我都会收到此错误:

C:\Ruby193\demo>bundle install
Fetching gem metadata from https://rubygems.org/.........
Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.2.0)
Using activesupport (3.2.3)
Using builder (3.0.0)
Using activemodel (3.2.3)
Using erubis (2.7.0)
Using journey (1.0.3)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.2)
Using actionpack (3.2.3)
Using mime-types (1.18)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.4)
Using actionmailer (3.2.3)
Using arel (3.0.2)
Using tzinfo (0.3.33)
Using activerecord (3.2.3)
Using activeresource (3.2.3)
Using bundler (1.1.3)
Using coffee-script-source (1.3.1)
Using execjs (1.3.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Installing json (1.6.6) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extensio
.

    C:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile

make
'make' is not recognized as an internal or external command,
operable program or batch file.


Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.6
6 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.6.6/ext/json/ext/g
nerator/gem_make.out
An error occured while installing json (1.6.6), and Bundler cannot continue.
Make sure that `gem install json -v '1.6.6'` succeeds before bundling.

然后我尝试安装 json,但没有任何运气。有什么建议吗?

【问题讨论】:

    标签: ruby-on-rails configuration installation


    【解决方案1】:

    由于您使用的是 Windows,因此您需要安装开发工具包才能使用本机扩展构建 gem。

    https://github.com/oneclick/rubyinstaller/wiki/development-kit

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-05
      • 2011-01-13
      • 2021-12-17
      • 1970-01-01
      • 2011-08-01
      • 2015-07-12
      相关资源
      最近更新 更多