【问题标题】:Getting error when trying to bundle fast_stack on windows尝试在 Windows 上捆绑 fast_stack 时出错
【发布时间】:2014-09-06 19:14:09
【问题描述】:

我正在尝试了解如何修复错误:

    C:\inetpub\wwwroot\DISCOU~2>gem install fast_stack
ERROR:  Error installing fast_stack:
    ERROR: Failed to build gem native extension.

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

make "DESTDIR="
generating fast_stack-i386-mingw32.def
compiling fast_stack.c
In file included from c:/Ruby200/include/ruby-2.0.0/ruby/defines.h:153:0,
                 from c:/Ruby200/include/ruby-2.0.0/ruby/ruby.h:70,
                 from c:/Ruby200/include/ruby-2.0.0/ruby.h:33,
                 from fast_stack.c:3:
c:/Ruby200/include/ruby-2.0.0/ruby/win32.h:276:12: error: conflicting types for 'gettimeofday'
In file included from fast_stack.c:2:0:
c:\ruby200\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/sys/time.h:42:13: note: previous declaration of 'gettimeofday' was here
fast_stack.c: In function 'rb_profile_start':
fast_stack.c:9:22: error: storage size of 'timer' isn't known
fast_stack.c:11:34: error: 'suseconds_t' undeclared (first use in this function)
fast_stack.c:11:34: note: each undeclared identifier is reported only once for each function it appears in
fast_stack.c:11:46: error: expected ';' before 'rb_num2long_inline'
fast_stack.c:13:5: warning: implicit declaration of function 'setitimer' [-Wimplicit-function-declaration]
fast_stack.c:13:15: error: 'ITIMER_REAL' undeclared (first use in this function)
fast_stack.c:9:22: warning: unused variable 'timer' [-Wunused-variable]
fast_stack.c: In function 'rb_profile_stop':
fast_stack.c:21:22: error: storage size of 'timer' isn't known
fast_stack.c:23:15: error: 'ITIMER_REAL' undeclared (first use in this function)
fast_stack.c:21:22: warning: unused variable 'timer' [-Wunused-variable]
make: *** [fast_stack.o] Error 1


Gem files will remain installed in C:/inetpub/wwwroot/DISCOU~2/GEM_HOME/gems/fast_stack-0.1.0 for inspection.

当我为在 Helicon Zoo 环境中安装的 discourse.org 应用程序编写“捆绑安装”命令时会发生这种情况。

【问题讨论】:

标签: windows ruby-on-rails-4 discourse helicontech heliconzoo


【解决方案1】:

看来不是动物园本身,而是宝石的更多问题。尝试在 Zoo 环境之外单独安装它。简单的 Ruby,在测试目录中,但在 Zoo 之外。如果可行,请直接联系 HeliconTech 并作为问题解决,他们会非常快速且擅长解决这些问题。

【讨论】:

  • 虽然这个问题对我来说不再重要,但为了方便起见,我在目录 C:/ruby200 中创建了一个文件夹并运行命令“gem install fast_stask”。结果是一样的。显然是gem和windows的兼容性问题。
猜你喜欢
  • 1970-01-01
  • 2021-05-25
  • 1970-01-01
  • 2013-03-29
  • 1970-01-01
  • 2016-07-13
  • 2020-05-16
  • 1970-01-01
  • 2018-10-12
相关资源
最近更新 更多