gpt4 book ai didi

ruby-on-rails - 在 Windows 上安装 bundle 时出错

转载 作者:数据小太阳 更新时间:2023-10-29 07:50:51 25 4
gpt4 key购买 nike

当我尝试运行 bundle install 时,出现了这个错误:

    Installing hiredis (0.3.2) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

C:/RailsInstaller/Ruby1.9.2/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: warning: -fPIC ignored for target (all code is position independent)
net.c:35:24: fatal error: sys/socket.h: No such file or directory
compilation terminated.
make: *** [net.o] Error 1
creating Makefile

make
C:/RailsInstaller/Ruby1.9.2/bin/ruby -e "puts 'EXPORTS', 'Init_hiredis_ext'" > hiredis_ext-i386-mingw32.def
gcc -I. -IC:/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/i386-mingw32 -I/C/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/ruby/backward -I/C/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1 -I. -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -IC:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/hiredis-0.3.2/vendor/hiredis -o connection.o -c connection.c
connection.c:1:24: fatal error: sys/socket.h: No such file or directory
compilation terminated.
make: *** [connection.o] Error 1


Gem files will remain installed in C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/hiredis-0.3.2 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/hiredis-0.3.2/ext/hiredis_ext/gem_make.out
An error occured while installing hiredis (0.3.2), and Bundler cannot continue.
Make sure that `gem install hiredis -v '0.3.2'` succeeds before bundling.

Process finished with exit code 5

我的 gemfile 是:

来源 'http://rubygems.org'

gem 'rails', '3.1.1'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'
gem "rake", "0.8.7"
gem "mysql"

# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.1.4'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end

gem 'devise'

gem 'execjs'
gem 'therubyracer'

gem 'jquery-rails', '>= 1.0.12'
gem 'faye'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

group :test do
# Pretty printed test output
gem 'turn', :require => false
end

最佳答案

Hiredis 不能在 Windows 上运行。有几个提议的补丁可以修复它,但没有一个被批准:

关于ruby-on-rails - 在 Windows 上安装 bundle 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8234493/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com