草庐IT

chef_gem

全部标签

ruby-on-rails - carrierwave gem 上的捆绑安装错误

我正在尝试安装gem(carrierwave),当我使用命令bundleinstall时出现如下错误:Invalidgemspecin[/home/sup1re/superrrr/vendor/bundle/ruby/1.8/specifications/carrierwave-0.6.2.gemspec]:Illformedrequirement["#1.1.4"]和Installingcarrierwave(0.6.2)Invalidgemspecin[/home/sup1re/superrrr/vendor/bundle/ruby/1.8/specifications/carri

ruby - 如何通过网络获取所有 gem 名称?

https://rubygems.org/api/v1/search.json只提供了30个gem,但是在我的本地机器上我可以使用gemlist--remote.我阅读了http://guides.rubygems.org/rubygems-org-api/,并且不存在可以获取列表中所有gem的API。如何通过网络获取列表?或者,有人提供这个吗?我至少想要gem的名称,但如果可能的话,我想获得名称和版本。我认为gemlist--remote是通过网络实现的,所以我可以获得所有的gem列表。 最佳答案 您可以使用https://rub

Ruby google_drive gem oAuth2 保存

所以在更新之前,有一种简单的方法可以登录到谷歌驱动器并操作你的谷歌文档——使用ruby​​。在你能够用这个登录到你的谷歌驱动器之前。require'google_drive'$session=GoogleDrive.login("email@gmail.com","password")但是现在您收到警告消息:WARNING:GoogleDrive.loginisdeprecatedandwillberemovedinthenextversion.UseGoogleDrive.login_with_oauthinstead.所以我去了githubpage查看google如何希望我们使用高

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

在通过rbenv全新安装rubyv2.2.2后,我无法安装gollum-wiki。我运行Ubuntu-Gnome14.04TrustyThar。这是安装日志:user@host:~/dev/drafts$geminstallgollumFetching:useragent-0.10.0.gem(100%)Successfullyinstalleduseragent-0.10.0Fetching:mustache-0.99.8.gem(100%)Successfullyinstalledmustache-0.99.8Fetching:rack-1.6.4.gem(100%)Success

ruby-on-rails - 使用 Ruby 1.8.7 的 Rails 2 的回形针 2.3.8 gem 的未定义方法 `has_attached_file'

我正在尝试在我的Rails应用程序中使用回形针插件来上传帖子的图像。我在Ubuntu10.04操作系统上使用Rails2.0.2和ruby​​1.8.7用于项目特定目的。我指的是以下教程:-http://railscasts.com/episodes/134-paperclip?view=commentshttp://jimneath.org/2008/04/17/paperclip-attaching-files-in-rails.html我通过以下方式对回形针插件进行了git克隆:-https://github.com/thoughtbot/paperclip,但是像rubyscr

ruby - 运行 rake 时缺少 gem

我将rbenv与Ruby1.9.2-p290、Rails3.1一起使用,数据库是MySQL。当我尝试rakedb:create我收到以下错误:Couldnotfindmulti_json-1.0.3inanyofthesources我也尝试过bundleexecrakedb:create。我的GemFile看起来像这样:source'http://rubygems.org'gem'rails','3.1.0'gem'mysql2'gem'json'group:assetsdogem'sass-rails',"~>3.1.0"gem'coffee-rails',"~>3.1.0"gem'

ruby - 杰基尔/ gem : Unresolved specs

我正在使用Jekyll,我有两个独立的存储库,我想我最近更新了一个。上次我呈现我的博客时一切正常。现在就是这样:$jekyllserve--watchWARN:UnresolvedspecsduringGem::Specification.reset:redcarpet(~>3.1)jekyll-watch(~>1.1)classifier-reborn(~>2.0)WARN:Clearingoutunresolvedspecs.Pleasereportabugifthiscausesproblems./var/lib/gems/2.1.0/gems/jekyll-2.5.2/bin/

ruby - 安装 gem 给出 "Failed to build gem native extension."

我做了:sudoapt-getinstallruby​​ruby​​-dev。然后我运行:sudogeminstalljekyll。但它给出了这个输出:Buildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingjekyll:ERROR:Failedtobuildgemnativeextension./usr/bin/ruby2.1-r./siteconf20151018-15792-1gfjwox.rbextconf.rbcreatingMakefilemake"DESTDIR="cleansh:1:make

ruby-on-rails - 运行 `gem pristine --all` ... 将提高 Spring 的启动性能。 (实际上并没有这样做)

我在本地为我的Rails应用程序运行瘦服务器。每次启动它时,我都会收到以下消息:Warning:Running`gempristine--all`toregenerateyourinstalledgemspecs(anddeletingthenreinstallingyourbundleifyouusebundle--path)willimprovethestartupperformanceofSpring.即使在我运行命令“gempristine-all”后,服务器重新启动也需要很长时间,然后消息再次出现。为什么会这样? 最佳答案

ruby-on-rails - Ransack Gem Rails 和多选

我正在为我的Rails应用程序使用ransackgem,但遇到多选问题。我有一份工作和一个公司模型,一个公司有很多工作,一个工作属于一个公司。我想执行职位搜索,以便人们可以看到特定公司的职位,我做了一些研究,显然这应该适用于搜索表单:=search_form_for@qdo|f|=f.collection_select:company_name_cont,Company.all,:id,:name,{:multiple=>true},class:'chosen-it'=f.submit"search"所以在View中我得到了列表(从所选的gem自动完成)但是当我点击搜索时它没有返回任何