jjzjj

extensions

全部标签

ruby - 错误 : Error installing ffi: ERROR: Failed to build gem native extension

安装了DevKit并重新运行ffi安装…。将其作为输出:C:\DocumentsandSettings\******>geminstallffiTemporarilyenhancingPATHtoincludeDevKit...Buildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingffi:ERROR:Failedtobuildgemnativeextension.C:/Ruby192/bin/ruby.exeextconf.rbcheckingforffi.h...nocheckingforffi.hin

ruby - 如何前置类方法

这个问题直接关系到thisone.但我试图将其分解为基本问题,我不想在另一个问题框中输入更多文本。所以这里是:我知道我可以通过扩展模块ClassMethods并通过Module#includeHook包含它来包含类方法。但是我可以用prepend做同样的事情吗?这是我的例子:Foo类:classFoodefself.bar'BaseBar!'endend类扩展:moduleExtensionsmoduleClassMethodsdefbar'ExtendedBar!'endenddefself.prepended(base)base.extend(ClassMethods)endend

ruby-on-rails - 安装调试器时出错 : Failed to build gem native extension with ruby-1. 9.3-p362

尝试为新项目运行bundle时,遇到以下错误:Installingdebugger(1.2.2)withnativeextensionsGem::Installer::ExtensionBuildError:ERROR:Failedtobuildgemnativeextension.C:/Ruby193/bin/ruby.exeextconf.rbcheckingforrb_method_entry_t.called_idinmethod.h...nocheckingforrb_control_frame_t.method_idinmethod.h...nocheckingforrb_

ruby-on-rails - 错误 : failed to build gem native extension when installing rails on mac mountian lion os

我最近更新到MountainLion并重新安装了Ruby,但是当我尝试运行测试Rails应用程序时,我收到一条错误消息,指出“我的系统当前未安装Rails”。我按照它说的做,输入sudogeminstallrails并得到:clearedfaster_requirecachesduetonewgeminstall...Successfullyinstalledrails-3.2.71geminstalledInstallingridocumentationforrails-3.2.7...InstallingRDocdocumentationforrails-3.2.7...但是当我检

ruby-on-rails - macOS, rails : "Failed to build gem native extension"

我无法尝试在我的Mac上安装Rails。我有OSX10.6.8,我已经确认我有Ruby,版本1.8.7我运行了sudogemupdate和sudogemupdate--system来获取最新版本的软件。但是,当我运行sudogeminstallrails时,出现了这个错误:ERROR:Errorinstallingrails:ERROR:Failedtobuildgemnativeextension./System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/rubyextconf.rbmkmf.rbcan'tfindh

ruby-on-rails - 使用 'gem pq' 安装 PostgreSQL gem 失败并出现错误 : Failed to build gem native extension

我正在学习RubyonRails并尝试开发应用程序。在我的应用程序中,我试图在开发模式下使用默认的SQLite数据库,在生产模式下使用PostgreSQL。但是我在尝试使用安装pggem时遇到以下错误:geminstallpgBuilding native extensions.  This could take a while...ERROR:  Error installing pg:        ERROR: Failed to build gem native extension.     /home/tusharkhatiwada/.rvm/rubies/ruby-2.0.

ruby-on-rails - 错误 : Failed to build gem native extension on Mavericks

我正在尝试在OSX10.9上的Rails项目中运行bundle。到达pggem时失败并出现此错误:Gem::Installer::ExtensionBuildError:ERROR:Failedtobuildgemnativeextension./Users/kyledecot/.rvm/rubies/ruby-2.0.0-p247/bin/rubyextconf.rbcheckingforpg_config...noNopg_config...tryinganyway.Ifbuildingfails,pleasetryagainwith--with-pg-config=/path/t

ruby-on-rails - 安装 nokogiri : Failed to build gem native extension & libiconv is missing (OSX) 时出错

我尝试克隆thisrepo并运行bundleinstall。捆绑过程失败并抛出此错误:...Installingnokogiri1.6.2.1withnativeextensionsBuildingnokogiriusingpackagedlibraries.Gem::Ext::BuildError:ERROR:Failedtobuildgemnativeextension./Users/zulhilmizainudin/.rvm/rubies/ruby-2.2.0/bin/ruby-r./siteconf20151130-43880-pntnc6.rbextconf.rbBuildi

ruby 设计模式 : How to make an extensible factory class?

好吧,假设我有Ruby程序来读取版本控制日志文件并对数据进行处理。(我不知道,但情况类似,我对这些类比很感兴趣)。假设现在我想支持Bazaar和Git。假设程序将使用某种参数执行,表明正在使用哪个版本控制软件。鉴于此,我想制作一个LogFileReaderFactory,它给定一个版本控制程序的名称,它将返回一个适当的日志文件阅读器(从一个通用的子类化)来读取日志文件并吐出一个规范的内部表示。所以,当然,我可以制作BazaarLogFileReader和GitLogFileReader并将它们硬编码到程序中,但我希望它的设置方式是添加对新版本控制程序的支持就像添加新类文件一样简单在Ba

ruby - Vim Command-T 插件错误 : could not load the C extension

我正在尝试安装Command-T插件。我按照评论中的说明编译了vim:Installingvimwithrubysupport(+ruby)所以现在有了+ruby标志,但是当我尝试使用该插件时仍然出现此错误:command-t.vimcouldnotloadtheCextensionPleaseseeINSTALLATIONandTROUBLE-SHOOTINGinthehelpFormoreinformationtype::helpcommand-t我的系统上有ruby:>ruby-v>ruby1.8.7(2011-06-30patchlevel352)[x86_64-linux]建