- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我无法在 Windows 上安装 Thin Gem。在构建 native 扩展期间会发生一些事情。
有人遇到同样的问题吗?
这是堆栈跟踪:
>gem install thin --no-ri --no-rdoc
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing thin:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... no
checking for rb_thread_check_ints()... yes
checking for rb_time_new()... yes
checking for windows.h... yes
checking for winsock.h... yes
checking for main() in -lkernel32... yes
checking for main() in -lrpcrt4... yes
checking for main() in -lgdi32... yes
checking for main() in -lssl... no
creating Makefile
make
g++ -I. -IC:/Ruby/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby/include/ruby-1.9.1/ruby/backward -I/C/Ru
by/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_RB_THR
EAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_WIN32 -DHAVE_WINDOWS_H -DHAVE_WINSOCK_H -DWITHOUT_SSL -DHAVE_
MAKE_PAIR -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -
Wno-missing-field-initializers -Wno-long-long -o binder.o -c binder.cpp
In file included from project.h:137:0,
from binder.cpp:20:
binder.h:35:34: warning: type qualifiers ignored on function return type
In file included from project.h:138:0,
from binder.cpp:20:
em.h:91:47: warning: type qualifiers ignored on function return type
em.h:92:76: warning: type qualifiers ignored on function return type
em.h:93:56: warning: type qualifiers ignored on function return type
em.h:95:57: warning: type qualifiers ignored on function return type
em.h:96:60: warning: type qualifiers ignored on function return type
em.h:97:58: warning: type qualifiers ignored on function return type
em.h:98:55: warning: type qualifiers ignored on function return type
em.h:99:36: warning: type qualifiers ignored on function return type
em.h:101:47: warning: type qualifiers ignored on function return type
em.h:106:42: warning: type qualifiers ignored on function return type
em.h:123:45: warning: type qualifiers ignored on function return type
em.h:132:36: warning: type qualifiers ignored on function return type
In file included from project.h:145:0,
from binder.cpp:20:
eventmachine.h:45:61: warning: type qualifiers ignored on function return type
eventmachine.h:46:112: warning: type qualifiers ignored on function return type
eventmachine.h:47:69: warning: type qualifiers ignored on function return type
eventmachine.h:49:73: warning: type qualifiers ignored on function return type
eventmachine.h:62:75: warning: type qualifiers ignored on function return type
eventmachine.h:63:74: warning: type qualifiers ignored on function return type
eventmachine.h:64:77: warning: type qualifiers ignored on function return type
eventmachine.h:65:41: warning: type qualifiers ignored on function return type
In file included from project.h:145:0,
from binder.cpp:20:
eventmachine.h:99:60: warning: type qualifiers ignored on function return type
eventmachine.h:100:58: warning: type qualifiers ignored on function return type
eventmachine.h:102:60: warning: type qualifiers ignored on function return type
eventmachine.h:105:41: warning: type qualifiers ignored on function return type
g++ -I. -IC:/Ruby/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby/include/ruby-1.9.1/ruby/backward -I/C/Ru
by/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_RB_THR
EAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_WIN32 -DHAVE_WINDOWS_H -DHAVE_WINSOCK_H -DWITHOUT_SSL -DHAVE_
MAKE_PAIR -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -
Wno-missing-field-initializers -Wno-long-long -o cmain.o -c cmain.cpp
In file included from project.h:137:0,
from cmain.cpp:20:
binder.h:35:34: warning: type qualifiers ignored on function return type
In file included from project.h:138:0,
from cmain.cpp:20:
em.h:91:47: warning: type qualifiers ignored on function return type
em.h:92:76: warning: type qualifiers ignored on function return type
em.h:93:56: warning: type qualifiers ignored on function return type
em.h:95:57: warning: type qualifiers ignored on function return type
em.h:96:60: warning: type qualifiers ignored on function return type
em.h:97:58: warning: type qualifiers ignored on function return type
em.h:98:55: warning: type qualifiers ignored on function return type
em.h:99:36: warning: type qualifiers ignored on function return type
em.h:101:47: warning: type qualifiers ignored on function return type
em.h:106:42: warning: type qualifiers ignored on function return type
em.h:123:45: warning: type qualifiers ignored on function return type
em.h:132:36: warning: type qualifiers ignored on function return type
In file included from project.h:145:0,
from cmain.cpp:20:
eventmachine.h:45:61: warning: type qualifiers ignored on function return type
eventmachine.h:46:112: warning: type qualifiers ignored on function return type
eventmachine.h:47:69: warning: type qualifiers ignored on function return type
eventmachine.h:49:73: warning: type qualifiers ignored on function return type
eventmachine.h:62:75: warning: type qualifiers ignored on function return type
eventmachine.h:63:74: warning: type qualifiers ignored on function return type
eventmachine.h:64:77: warning: type qualifiers ignored on function return type
eventmachine.h:65:41: warning: type qualifiers ignored on function return type
In file included from project.h:145:0,
from cmain.cpp:20:
eventmachine.h:99:60: warning: type qualifiers ignored on function return type
eventmachine.h:100:58: warning: type qualifiers ignored on function return type
eventmachine.h:102:60: warning: type qualifiers ignored on function return type
eventmachine.h:105:41: warning: type qualifiers ignored on function return type
cmain.cpp:98:71: warning: type qualifiers ignored on function return type
cmain.cpp:109:122: warning: type qualifiers ignored on function return type
cmain.cpp:119:79: warning: type qualifiers ignored on function return type
cmain.cpp:129:83: warning: type qualifiers ignored on function return type
cmain.cpp:260:85: warning: type qualifiers ignored on function return type
cmain.cpp:270:84: warning: type qualifiers ignored on function return type
cmain.cpp:280:88: warning: type qualifiers ignored on function return type
cmain.cpp:290:51: warning: type qualifiers ignored on function return type
cmain.cpp:300:70: warning: type qualifiers ignored on function return type
cmain.cpp:320:55: warning: type qualifiers ignored on function return type
cmain.cpp:546:70: warning: type qualifiers ignored on function return type
cmain.cpp:669:68: warning: type qualifiers ignored on function return type
cmain.cpp: In function 'int evma_send_file_data_to_connection(long unsigned int, const char*)':
cmain.cpp:752:6: error: cannot convert 'stat*' to '_stati64*' for argument '2' to 'int _fstati64(int
, _stati64*)'
make: *** [cmain.o] Error 1
Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10 for inspect
ion.
Results logged to C:/Ruby/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/ext/gem_make.out
最佳答案
在 1.9.2 或 1.9.3 下,从 git 或 rubygems 存储库安装不再有效(目前)(已确认在 2012 年 6 月 22 日仍然损坏)。相反,您只需:
gem install eventmachine --pre
gem install thin
请注意,2012 年 6 月 18 日,当前预发行版为 renamed to 1.0.0.rc.1
,因此有可能“很快”适用于 Windows 的版本将成为正式版本,这将不再是问题。
如果您尝试从 github 存储库在 1.9.2 下构建 gem,您可能会看到以下内容(包含搜索引擎点击):
C:\eventmachine> rake build(in C:/eventmachine)cd extC:/Ruby/bin/ruby.exe extconf.rbchecking for rb_trap_immediate in ruby.h,rubysig.h... *** extconf.rb failed ***Could not create Makefile due to some reason, probably lack of necessarylibraries and/or headers. Check the mkmf.log file for more details.
如果您尝试从 rubygems 存储库安装 1.9.3 版本下的 gem,您可能会看到以下内容(包含在搜索引擎点击中):
C:\>gem install eventmachineTemporarily enhancing PATH to include DevKit...Building native extensions. This could take a while...ERROR: Error installing eventmachine: ERROR: Failed to build gem native extension. C:/Ruby193/bin/ruby.exe extconf.rbchecking for rb_trap_immediate in ruby.h,rubysig.h... nochecking for rb_thread_blocking_region()... yeschecking for inotify_init() in sys/inotify.h... nochecking for __NR_inotify_init in sys/syscall.h... nochecking for writev() in sys/uio.h... nochecking for rb_thread_check_ints()... yeschecking for rb_time_new()... yeschecking for windows.h... yeschecking for winsock.h... yeschecking for main() in -lkernel32... yeschecking for main() in -lrpcrt4... yeschecking for main() in -lgdi32... yeschecking for main() in -lssl... nocreating Makefilemakegenerating rubyeventmachine-i386-mingw32.defcompiling binder.cppcc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++In file included from binder.cpp:20:0:project.h:85:0: warning: "FD_SETSIZE" redefined:0:0: note: this is the location of the previous definitionIn file included from project.h:137:0, from binder.cpp:20:binder.h:35:34: warning: type qualifiers ignored on function return typeIn file included from project.h:138:0, from binder.cpp:20:em.h:91:47: warning: type qualifiers ignored on function return typeem.h:92:76: warning: type qualifiers ignored on function return typeem.h:93:56: warning: type qualifiers ignored on function return typeem.h:95:57: warning: type qualifiers ignored on function return typeem.h:96:60: warning: type qualifiers ignored on function return typeem.h:97:58: warning: type qualifiers ignored on function return typeem.h:98:55: warning: type qualifiers ignored on function return typeem.h:99:36: warning: type qualifiers ignored on function return typeem.h:101:47: warning: type qualifiers ignored on function return typeem.h:106:42: warning: type qualifiers ignored on function return typeem.h:123:45: warning: type qualifiers ignored on function return typeem.h:132:36: warning: type qualifiers ignored on function return typeIn file included from project.h:145:0, from binder.cpp:20:eventmachine.h:45:61: warning: type qualifiers ignored on function return typeeventmachine.h:46:112: warning: type qualifiers ignored on function return typeeventmachine.h:47:69: warning: type qualifiers ignored on function return typeeventmachine.h:49:73: warning: type qualifiers ignored on function return typeeventmachine.h:62:75: warning: type qualifiers ignored on function return typeeventmachine.h:63:74: warning: type qualifiers ignored on function return typeeventmachine.h:64:77: warning: type qualifiers ignored on function return typeeventmachine.h:65:41: warning: type qualifiers ignored on function return typeIn file included from project.h:145:0, from binder.cpp:20:eventmachine.h:99:60: warning: type qualifiers ignored on function return typeeventmachine.h:100:58: warning: type qualifiers ignored on function return typeeventmachine.h:102:60: warning: type qualifiers ignored on function return typeeventmachine.h:105:41: warning: type qualifiers ignored on function return typecompiling cmain.cppcc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++In file included from cmain.cpp:20:0:project.h:85:0: warning: "FD_SETSIZE" redefined:0:0: note: this is the location of the previous definitionIn file included from project.h:137:0, from cmain.cpp:20:binder.h:35:34: warning: type qualifiers ignored on function return typeIn file included from project.h:138:0, from cmain.cpp:20:em.h:91:47: warning: type qualifiers ignored on function return typeem.h:92:76: warning: type qualifiers ignored on function return typeem.h:93:56: warning: type qualifiers ignored on function return typeem.h:95:57: warning: type qualifiers ignored on function return typeem.h:96:60: warning: type qualifiers ignored on function return typeem.h:97:58: warning: type qualifiers ignored on function return typeem.h:98:55: warning: type qualifiers ignored on function return typeem.h:99:36: warning: type qualifiers ignored on function return typeem.h:101:47: warning: type qualifiers ignored on function return typeem.h:106:42: warning: type qualifiers ignored on function return typeem.h:123:45: warning: type qualifiers ignored on function return typeem.h:132:36: warning: type qualifiers ignored on function return typeIn file included from project.h:145:0, from cmain.cpp:20:eventmachine.h:45:61: warning: type qualifiers ignored on function return typeeventmachine.h:46:112: warning: type qualifiers ignored on function return typeeventmachine.h:47:69: warning: type qualifiers ignored on function return typeeventmachine.h:49:73: warning: type qualifiers ignored on function return typeeventmachine.h:62:75: warning: type qualifiers ignored on function return typeeventmachine.h:63:74: warning: type qualifiers ignored on function return typeeventmachine.h:64:77: warning: type qualifiers ignored on function return typeeventmachine.h:65:41: warning: type qualifiers ignored on function return typeIn file included from project.h:145:0, from cmain.cpp:20:eventmachine.h:99:60: warning: type qualifiers ignored on function return typeeventmachine.h:100:58: warning: type qualifiers ignored on function return typeeventmachine.h:102:60: warning: type qualifiers ignored on function return typeeventmachine.h:105:41: warning: type qualifiers ignored on function return typecmain.cpp:98:71: warning: type qualifiers ignored on function return typecmain.cpp:109:122: warning: type qualifiers ignored on function return typecmain.cpp:119:79: warning: type qualifiers ignored on function return typecmain.cpp:129:83: warning: type qualifiers ignored on function return typecmain.cpp:260:85: warning: type qualifiers ignored on function return typecmain.cpp:270:84: warning: type qualifiers ignored on function return typecmain.cpp:280:88: warning: type qualifiers ignored on function return typecmain.cpp:290:51: warning: type qualifiers ignored on function return typecmain.cpp:300:70: warning: type qualifiers ignored on function return typecmain.cpp:320:55: warning: type qualifiers ignored on function return typecmain.cpp:546:70: warning: type qualifiers ignored on function return typecmain.cpp:669:68: warning: type qualifiers ignored on function return typecmain.cpp: In function 'int evma_send_file_data_to_connection(long unsigned int, const char*)':cmain.cpp:752:6: error: cannot convert 'stat*' to '_stati64*' for argument '2' to 'int _fstati64(int, _stati64*)'make: *** [cmain.o] Error 1Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10 for inspection.Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/ext/gem_make.out
关于ruby - 无法在 Windows 上安装 Thin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3649252/
以下是一个非常简单的ruby服务器。 require 'socket' local_socket = Socket.new(:INET, :STREAM) local_addr = Socket.
我正在使用 OS X(使用 bash),并且是 unix 的新手。我想知道是否可以修改一些文件以便运行 ruby 程序,我不需要“ruby file.rb”,而是可以运行“ruby.rb”。 有理
我在用 Ruby 替换字符串时遇到一些问题。 我的原文:人之所为不如兽之所为。 我想替换为:==What== human does is not like ==what== animal does.
我想在一个循环中从 Ruby 脚本做这样的事情: 写一个文件a.rb(每次迭代都会改变) 执行系统(ruby 'a.rb') a.rb 将带有结果的字符串写入文件“results” a.rb 完成并且
我的问题是尝试创建一个本地服务器,以便我可以理解由我的新团队开发的应用程序。我的问题是我使用的是 Ruby 2.3.3,而 Gemfile 需要 2.3.1。我无法编辑 Gemfile,因为我被告知很
我有一个使用 GLI 框架用 Ruby 编写的命令行实用程序。我想在我的主目录中配置我的命令行实用程序,使用 Ruby 本身作为 DSL 来处理它(类似于 Gemfile 或 Rakefile)。 我
我的 Rails 应用 Controller 中有这段代码: def delete object = model.datamapper_class.first(:sourced_id =>
我正在寻找的解析器应该: 对 Ruby 解析友好, 规则设计优雅, 产生用户友好的解析错误, 用户文档的数量应该比计算器示例多, UPD:允许在编写语法时省略可选的空格。 快速解析不是一个重要的特性。
我刚开始使用 Ruby,听说有一种“Ruby 方式”编码。除了 Ruby on Rails 之外,还有哪些项目适合学习并被认可且设计良好? 最佳答案 Prawn被明确地创建为不仅是一个该死的好 PDF
我知道之前有人问过类似的问题,但是我该如何构建一个无需在前面输入“ruby”就可以在终端中运行的 Ruby 文件呢? 这里的最终目标是创建一个命令行工具包类型的东西。现在,为了执行我希望用户能够执行的
例如哈希a是{:name=>'mike',:age=>27,:gender=>'male'}哈希 b 是 {:name=>'mike'} 我想知道是否有更好的方法来判断 b 哈希是否在 a 哈希内,而
我是一名决定学习 Ruby 和 Ruby on Rails 的 ASP.NET MVC 开发人员。我已经有所了解并在 RoR 上创建了一个网站。在 ASP.NET MVC 上开发,我一直使用三层架构:
最近我看到 Gary Bernhardt 展示了他用来在 vim 中执行 Ruby 代码的 vim 快捷方式。捷径是 :map ,t :w\|:!ruby %. 似乎这个方法总是执行系统 Rub
在为 this question about Blue Ruby 选择的答案中,查克说: All of the current Ruby implementations are compiled to
我有一个 Ruby 数组 > list = Request.find_all_by_artist("Metallica").map(&:song) => ["Nothing else Matters"
我在四舍五入时遇到问题。我有一个 float ,我想将其四舍五入到小数点后的百分之一。但是,我只能使用 .round ,它基本上将它变成一个 int,意思是 2.34.round # => 2. 有没
我使用 ruby on rails 编写了一个小型 Web 应用程序,它的主要目的是上传、存储和显示来自 xml(文件最多几 MB)文件的结果。运行大约 2 个月后,我注意到 mongrel 进程
我们如何用 Ruby 转换像这样的字符串: 𝑙𝑎𝑡𝑜𝑟𝑟𝑒 收件人: Latorre 最佳答案 s = "𝑙𝑎𝑡𝑜𝑟𝑟𝑒" => "𝑙𝑎𝑡𝑜𝑟𝑟𝑒" s.u
通过 ruby monk 时,他们偶尔会从左侧字段中抛出一段语法不熟悉的代码: def compute(xyz) return nil unless xyz xyz.map {|a,
不确定我做错了什么,但我似乎弄错了。 问题是,给你一串空格分隔的数字,你必须返回最大和最小的数字。 注意:所有数字都是有效的 Int32,不需要验证它们。输入字符串中始终至少有一个数字。输出字符串必须
我是一名优秀的程序员,十分优秀!