草庐IT

extension_access_modifier

全部标签

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 - 未定义方法 attr_accessible

我对Rails有点陌生,我正在尝试创建一个用户登录。我通过教程找到了here.最后它让我为批量分配添加“attr_accessible”。但是,当我这样做时,出现以下错误:undefinedmethod`attr_accessible'for#我看到了这个post我需要classUsertrue,:uniqueness=>true,:length=>{:in=>3..20}validates:email,:presence=>true,:uniqueness=>true,:format=>EMAIL_REGEXvalidates:password,:confirmation=>true

ruby-on-rails - rails : how do you access RESTful helpers?

我正在努力解决这个guidetoRailsrouting,但我卡在了3.3部分:CreatingaRESTfulroutewillalsomakeavailableapileofhelperswithinyourapplication然后他们列出了一些助手,例如photos_url、photos_path等。我的问题:我在哪里可以找到“可用”的助手的完整列表?有没有办法在控制台中调用助手?我创建了一个应用程序,然后使用script/console打开了控制台。我试着像这样在控制台上调用其中一个助手:>>entries_url但是得到了:NameError:undefinedlocalv

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]建