警告被视为错误的轨道(warnings being treated as errors in rai

2019-10-22 20:11发布

我有以下错误,当我试图让“包安装”在我的轨道项目

   C:/Ruby22/bin/ruby.exe -r ./siteconf20150427-5772-lng4pk.rb extconf.rb
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
generating byebug-i386-mingw32.def
compiling breakpoint.c
cc1.exe: warnings being treated as errors
In file included from c:/Ruby22/include/ruby-2.2.0/ruby/defines.h:163:0,
                 from c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:29,
                 from c:/Ruby22/include/ruby-2.2.0/ruby.h:33,
                 from ./byebug.h:4,
                 from breakpoint.c:1:
c:/Ruby22/include/ruby-2.2.0/ruby/win32.h:319:44: error: 'struct timespec' declared inside parameter list
c:/Ruby22/include/ruby-2.2.0/ruby/win32.h:319:44: error: its scope is only this definition or declaration, which is probably not what you want
c:/Ruby22/include/ruby-2.2.0/ruby/win32.h:320:43: error: 'struct timespec' declared inside parameter list
make: *** [breakpoint.o] Error 1

make failed, exit code 2

我是在Windows 7上,研究了很多之后,我发现我不得不取消设置采取警告视为错误的选项。 任何人都知道在那里我可以不设置这样的选项(在Makefile中是不可能的,因为生成文件是一个生成的文件)

Answer 1:

这可能不是你想听到什么。 但是我有这个错误很多,当我的RoR开发出的应用程序窗口。 我还就什么都没有做护栏,并更多地与红宝石如何与Windows操作系统进行交互等问题太多了。 Ruby是非常“Linuxy”在它的性质。 正因为如此,我会建议使用使用Ruby和Rails开发时运行Linux操作系统Ubuntu的虚拟机。

有一个叫“流浪”一个伟大的Linux虚拟机。 它一直在精彩使用Ruby的,他们对如何启动和运行使用Ruby在这里找到相关的资料:

https://www.vagrantup.com/

我希望这有帮助。 我知道切换到流浪虚拟机帮我解决了很多的事不关己用编写实际的代码,这些徒劳的问题。



文章来源: warnings being treated as errors in rails