我不能打电话:
bundle install
或bundle update
。即使安装了DevKit和WORKING,我也会收到以下错误!
捆绑更新获取源索引 for http://rubygems.org/使用 addressable(2.2.6)使用守护进程 (1.1.4)安装hiredis(0.3.2) 使用原生扩展 C:/ Ruby192 / lib中/红宝石/ site_ruby / 1.9.1 / rubygems / installer.rb:551:在build_extensions中的`rescue in block中: 错误:无法构建gem native 延期。 (GEM ::安装:: ExtensionBuildError)
C:/Ruby192/bin/ruby.exe extconf.rb gcc -std=c99 -pedantic -c
-O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c net.c:1:0:警告:-fPIC被忽略为目标(全部 代码是位置独立的) net.c:35:24:致命错误: sys / socket.h:没有这样的文件或 目录编译终止。 make: * [net.o]错误1创建 生成文件
make C:/ Ruby192 / bin / ruby -e“puts 'EXPORTS','Init_hiredis_ext'“> hiredis_ext-i386- mingw32.def gcc -I。 -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I / C / Ruby192 / include / ruby-1 .9.1 / ruby / backward -I / C / Ruby192 / include / ruby-1.9.1 -I。 -O3 -g -Wextra -Wno-unu sed-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-fiel d-initializers -Wno-long-long -IC:/Ruby192/lib/ruby/gems/1.9.1/gems/hiredis-0.3。 2 / vendor / hiredis -o connection.o -c connection.c connection.c:1:24:致命 错误:sys / socket.h:没有这样的文件或 目录编译终止。 make: * [connection.o]错误1
Gem文件将保持安装状态 C:/Ruby192/lib/ruby/gems/1.9.1/gems/hiredis-0 .3.2进行检查。记录结果 C:/Ruby192/lib/ruby/gems/1.9.1/gems/hiredis-0.3.2/ext/hiredis_ EXT / gem_make.out 来自C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:529:in
b lock in build_extensions' from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:504:in
e ach' 来自C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:504:inb uild_extensions' from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:180:in
我安装' 来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/sour ce.rb:101:inblock in install' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/ruby gems_integration.rb:78:in
preserve_paths' 来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/sour ce.rb:91:在install' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/inst aller.rb:58:in
区块(2级)中 跑' 来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/ruby gems_integration.rb:93:在with_build_args' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/inst aller.rb:57:in
阻止运行' 来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/spec _set.rb:12:block in each' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/spec _set.rb:12:in
每个' 来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/spec _set.rb:12:ineach' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/inst aller.rb:49:in
run' 来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/inst aller.rb:8:install' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/cli. rb:270:in
更新' 来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/vend 或/ thor / task.rb:22:inrun' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/vend or/thor/invocation.rb:118:in
invoke_task' 来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/vend 或/ thor.rb:246:在dispatch' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/vend or/thor/base.rb:389:in
开始' 来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/bin/bundle:13:in<top (required)>' from C:/Ruby192/bin/bundle:19:in
负载” 来自C:/ Ruby192 / bin / bundle:19:in''
答案 0 :(得分:1)
你确定这是一个捆绑问题,而不是你想要安装的宝石吗?
使用一组非常简单的要求创建一个Gemfile,如下所示:
source: rubygems
gem 'rake'
并在此处运行bundle install
,看看会发生什么。
另外 - 如果您尝试启动并运行rails环境,那么您应该使用http://railsinstaller.org - 它将使您的生活变得更加轻松。