草庐IT

page-object-gem

全部标签

ruby - 安装gems导致报错

ruby2.0.0p247(2013-06-27修订版41674)[x86_64-linux]gem2.0.3sudogeminstalltravisBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtravis:ERROR:Failedtobuildgemnativeextension./usr/bin/ruby1.9.1extconf.rb/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in`require':cannotloadsuchfile

ruby-on-rails - 将 Ruby Gems 类比为 Java JAR 是否有效?

我相信我已经非常清楚和简洁地提出了这个问题。我为什么要问?我要向学生解释RubyonRails框架,这需要我对Java世界做一些类比(因为该类(class)非常以Java为中心)。我没有RubyonRails的实践经验,但我觉得Gem/Jar类比是有效的。谁能进一步阐明这个问题? 最佳答案 作为一个简短的回答,我会说:是的,它是有效的。作为一个长答案,我会说:是的,它是有效的,但您可能还想描述一些重要的区别。jar有一些与gem截然不同的品质。JAR是打包的可执行库,您通常必须在调用时在Java程序的执行中显式声明依赖项(通过在调用

ruby - 如何为所有已安装的 gem 重建 rdoc?

我在多个位置安装了多个gem。生成/重新生成的困难/简单方法是什么:所有这些已安装的gem的rdoc,一次全部?所有这些已安装的gem的yardoc,一次全部? 最佳答案 你试过其中之一吗?gemrdoc--allgemrdoc--all--overwrite 关于ruby-如何为所有已安装的gem重建rdoc?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/3152857/

ruby - Heroku gem 不适用于 RVM

我正在学习http://railstutorial.org/chapters/beginning#sec:1.4.1上的RubyonRails教程,在我尝试让我的应用程序在Heroku上运行之前,一切都很顺利。我安装了heroku,运行良好,但现在当我运行herokukeys:add或任何其他heroku命令时,出现以下错误:/home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rest-client-1.4.2/lib/restclient.rb:9:in`rescuein':nosuchfiletoload--net/h

ruby - 使用 bundle 程序以编程方式确定 gem 的路径

我知道你能做到bundleshowgem_name显示一些gem的路径。如何使用Bundler对象在代码中做到这一点? 最佳答案 看看他们是如何做到的cli.rbdeflocate_gem(name)spec=Bundler.load.specs.find{|s|s.name==name}raiseGemNotFound,"Couldnotfindgem'#{name}'inthecurrentbundle."unlessspecifspec.name=='bundler'returnFile.expand_path('../../

ruby - 请安装 postgresql 适配器 : `gem install activerecord-postgresql-adapter`

这个问题在这里已经有了答案:关闭11年前。PossibleDuplicate:HowtohandleRubyonRailserror:“Pleaseinstallthepostgresqladapter:`geminstallactiverecord-postgresql-adapter'”我正在尝试让Redmine与postgres一起工作。在我的日志中,我不断看到。Pleaseinstallthepostgresqladapter:`geminstallactiverecord-postgresql-adapter`在谷歌搜索之后,每个人都说你需要做geminstallpg。但是当

ruby-on-rails - gem install mysql2 v '0.3.11' 无法在 Yosemite 上运行

在ruby​​版本1.9.3(rvm)上执行mysql2版本0.3.11的捆绑安装或直接gem安装时,我收到以下错误。但是当我安装最新版本0.3.16时它可以工作。我还包含了我的gcc版本以供引用。Gem::Ext::BuildError:ERROR:Failedtobuildgemnativeextension./Users/ginocarlocortez/.rvm/rubies/ruby-1.9.3-p547/bin/rubyextconf.rbcheckingforrb_thread_blocking_region()...yescheckingforrb_wait_for_si

ruby-on-rails - 安装调试器(1.6.8)时出错,Bundler 无法继续。确保 `gem install debugger -v ' 1.6。 8'`

通过geminstalldebugger-v'1.6.8'安装调试器时似乎有递归效果,它说安装成功,但是当我执行bundleinstall时,消息再次出现或bundle更新|20:15:37|~geminstalldebugger-v'1.6.8'Buildingnativeextensions.Thiscouldtakeawhile...Successfullyinstalleddebugger-1.6.8Parsingdocumentationfordebugger-1.6.8unabletoconvert"\xCF"fromASCII-8BITtoUTF-8forlib/ruby

ruby-on-rails - 无方法错误 : undefined method `on' for main:Object

当我尝试bundleexeccapproductiondeploy--trace时,我收到一条错误消息:deploy@h2540559:/www/apps/foodsoft$bundleexeccapproductiondeploy--trace**Invokeproduction(first_time)**Executeproduction**Invokeload:defaults(first_time)**Executeload:defaults**Invokervm:hook(first_time)**Executervm:hookcapaborted!NoMethodError

ruby - 在 N 个总 gem 中找不到 'cocoapods' (>= 0) (Gem::LoadError)

当我尝试podinstall时,出现以下问题:Faizs-MBP:newjfaizfareed$podinstall/Library/Ruby/Site/2.0.0/rubygems/dependency.rb:315:in`to_specs':Couldnotfind'cocoapods'(>=0)among50totalgem(s)(Gem::LoadError)Checkedin'GEM_PATH=/Users/faizfareed/.gem/ruby/2.0.0:/Library/Ruby/Gems/2.0.0:/System/Library/Frameworks/Ruby.f