草庐IT

gcc-warning

全部标签

ruby-on-rails - 无法在centos上安装therubyracer(V8和GCC出错)

我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e

c - 我是如何让 gcc 生成 .bundle 而不是 .so 的?

我正在尝试编写一个Ruby扩展,而且我一整天都在成功编译我的nmatrix.so共享对象文件。但是,突然之间,它开始生成nmatrix.bundle,而根本没有任何.so文件。它没有给我任何链接器错误,所以我无法想象为什么会这样。我也没有更改myMakefileorextconf.rb中的任何内容.我一直通过rvm使用Ruby1.9.3p0。我已经尝试对当天的工作执行gitstashsave并编译一些我知道应该没有链接器错误的东西(产生.so的东西)更早。不幸的是,这也会生成一个.bundle文件。很明显,我做了一些事情——可能是无意中安装了一些东西——这改变了一些关键的GCC设置。这

ruby - Textmate 错误重复行 "ruby: warning: -K is specified; it is for 1.8 compatibility and may cause odd behavior"

在Textmate中使用ctrl+shift+d快捷方式重复行时,出现以下错误:“ruby:警告:指定了-K;这是为了1.8兼容性,可能会导致奇怪的行为” 最佳答案 此问题不仅限于重复行,还可能出现在其他使用ruby​​的地方。我通过将Preferences...>Advanced>ShellVariables中的PATH更改为/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin来解决它:/usr/bin:/bin:/usr/sbin:/sbin此更改后,Tex

ruby-on-rails - Railscasts 第 362 集 - 导出到 Excel : How to avoid the warning message given by Excel 2010 when opening the file?

当使用RyanBates的Railscasts第362集关于导出到Excel(https://github.com/railscasts/362-exporting-csv-and-excel)的示例应用程序时,我注意到Excel2010(在Windows上)在打开.xls文件时给我一条警告消息我使用“下载为Excel”链接下载的文件。警告内容如下:“您尝试打开的文件...的格式与文件扩展名指定的格式不同。打开文件前请确认文件未损坏且来源可靠。是否要打开现在存档吗?”当我单击"is"时,我可以很好地打开文件。在使用Excel2011(在Mac上)时,我什至没有收到警告消息。但我希望能够

ruby-on-rails - 我该如何去追踪与 Bundler 相关的 DEPRECATION WARNING

我是Rails的新手。当我启动我的应用程序时,我不断看到这些弃用警告:DEPRECATIONWARNING:refisdeprecatedandwillberemovedfromRails3.2.(calledfromatD:/dev/AquaticKodiak/config/application.rb:12)DEPRECATIONWARNING:newisdeprecatedandwillberemovedfromRails3.2.(calledfromatD:/dev/AquaticKodiak/config/application.rb:12)好的,第12行是什么?这个:Bun

ruby - pg gem : 'Warning: no type cast defined for type "numeric"'

我在从pggem中获取输入结果时遇到问题。require'pg'require_relative'spec/fixtures/database'client=PG.connect(DB[:pg])client.type_map_for_queries=PG::BasicTypeMapForQueries.new(client)client.type_map_for_results=PG::BasicTypeMapForResults.new(client)client.exec(%|select*fromtestme;|)do|query|query.each{|r|putsr.ins

ruby-on-rails - rails : Why do I get "warning: already initialized constant JSON::VERSION" when running rake cucumber?

我刚刚设置了一个LinuxMintbox,用于使用rvm进行Rails开发。我继续生成了一个Rails5应用程序,设置了mysql连接,添加了cucumber-railsgem然后尝试运行:rakecucumber出于某种原因,我遇到了:/usr/bin/ruby2.3-Sbundleexeccucumber--profiledefault/usr/lib/ruby/vendor_ruby/json/version.rb:3:warning:alreadyinitializedconstantJSON::VERSION/var/lib/gems/2.3.0/gems/json-1.8.

Ruby 动态类。如何修复 "warning: class variable access from toplevel"

我正在尝试编写一个程序,根据从文件中读取的配置动态定义ruby​​类。我知道我可以使用Class.new来做到这一点。这是一个示例程序:x=[1,2,3]Test=Class.newdo@@mylist=xdeffooputs@@mylistendendTest.new.foo当我运行它时,我得到以下输出(使用ruby​​1.9.3p0运行):c:/utils/test.rb:4:warning:classvariableaccessfromtoplevelc:/utils/test.rb:7:warning:classvariableaccessfromtoplevel123Does

ruby - 在带有 RVM : 的 OS X 上安装 Ruby 1.9.3 时出现 "No available formula for gcc46"

我安装了Homebrew,我正在尝试安装RVM:rvminstall1.9.3-head我得到这个错误:Installingrequiredpackages:gcc46Errorrunning'requirements_osx_brew_libs_installgcc46',pleaseread/Users/mike/.rvm/log/1384918134_ruby-1.9.3-head/package_install_gcc46.logRequirementsinstallationfailedwithstatus:1brewdoctor说我准备好了。在日志中我看到:Error:Do

ruby-on-rails - 使用 Rails 中的命名空间类防止 "warning: toplevel constant B referenced by A::B"

在自定义目录(例如:app/presenters/)中存储文件时,如何确保加载命名空间类?例如,如果您有:app/models/mega_menu.rbapp/presenters/catalog_presenter.rbapp/presenters/mega_menu/catalog_presenter.rbRails无法加载MegaMenu::CatalogPresenter:CatalogPresenter.new=>#MegaMenu::CatalogPresenter.new(irb):3:warning:toplevelconstantCatalogPresenterref