草庐IT

安装error

全部标签

ruby-on-rails - rvm 安装 : ruby installation error

我想在我的LinuxMint12上安装ruby​​。我正在关注thistutorial和thisone.当我运行rvminstall1.9.3时,我看到了这个错误:InstallingRubyfromsourceto:/usr/share/ruby-rvm/rubies/ruby-1.9.3,thismaytakeawhiledependingonyourcpu(s)...ruby-1.9.3-#fetchingruby-1.9.3-#extractingruby-1.9.3-to/usr/share/ruby-rvm/src/ruby-1.9.3ERROR:Errorrunning'

ruby - 如何在 Windows 7 上正确安装 Compass?

当我从Ruby的bin文件夹以外的任何地方运行compass时,它返回错误:'compass'isnotrecognizedasaninternalorexternalcommand,operableprogramorbatchfile.这件事发生在其他人身上吗?我在某处读到,在Windows32中可能需要一个文件,也许是compass.exe,我不确定,因为那里没有任何东西说compass。知道为什么安装无法完成吗?另外我应该注意,我通过Parallels在Mac上使用Windows7。 最佳答案 确保你有rubyinstalle

ruby - 使用 RVM 和 ruby​​ 1.8.6 在 Lion 上安装 rspec-1.3.2 时出现问题

我正在尝试使用RVM和Ruby1.8.6在OSXLion上安装rspec版本1.3.2当我安装时,我得到以下信息:$geminstallrspec-v=1.3.2Aborttrap:6我能够使用系统ruby​​成功安装相同的rspec版本。我试图对这个问题进行一些研究,但看起来没有人遇到过同样的事情。类似的问题建议在安装ruby之前exportCC=gcc-4.2。我试过了(在完全清除RVM并重新安装最新版本1.6.31之后)但它没有效果。有没有其他人遇到过这个?您找到解决方案了吗? 最佳答案 我安装了1.8.6fresh没有gem

ruby - Bundler 可以配置为安装 gems rdoc 吗?

我使用bdoc(使用hanna进行格式化)作为查看我系统上安装的gem的rdoc文档的快速方法。但是,因为bundler在安装gem时不会安装rdoc,所以每当我开始使用新gem或更新现有gem时,我都必须不断地手动生成它们。有谁知道在安装gems时是否有配置bundler让它安装rdoc的方法,以避免我必须手动进行?我在bundler源代码中和configmanual中都看不到任何提及。. 最佳答案 如果你使用rvm,试试“rvmrdocsgenerate...” 关于ruby-Bun

ruby - 无法安装metric_fu,如何切换到simplecov?

我尝试在我的Ruby1.9环境中安装metric_fu,但由于以下问题而失败:$geminstallmetric_fu...Fetching:rcov-1.0.0.gem(100%)Buildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingmetric_fu:ERROR:Failedtobuildgemnativeextension./Users/xxx/.rvm/rubies/ruby-1.9.2-p290/bin/rubyextconf.rb****Ruby1.9isnotsupported.Please

ruby - kernel_require.rb :55:in `require' : cannot load such file error

我目前使用的是Ruby1.9.3版(尽管我在使用Ruby2.0.0时遇到了同样的问题)。在Windows764位上。我正在关注“TheCucumberBook”并卡在第7.2章-“使用转换删除重复项”。我的文件夹结构如下:\cash_withdrawal\cash_withdrawal\Gemfile\cash_withdrawal\Gemfile.lock\cash_withdrawal\features\cash_withdrawal\features\cash-withdrawal.feature\cash_withdrawal\features\step_definitions

ruby-on-rails - 尝试将本地数据库推送到 Heroku 后出现 "ActionView::Template::Error (Unknown primary key for table"

对于我通过Heroku托管的Ruby-on-Rails应用程序,我最近下载了一个备份,在本地恢复它,然后从外部来源将数据添加到数据库中。一切正常。在使用herokupg:pushHEROKU_DATABASE_URL--app将更新后的数据库推送到Heroku之后该应用程序运行良好,我可以看到新添加的数据。但是今天当我尝试在Heroku上登录该应用程序时,我收到了错误消息。在我的日志文件中,我看到了这个错误:ActionView::Template::Error(Unknownprimarykeyfortable...根据这篇SO帖子:Getting"Unknownprimarykey

ruby-on-rails - 使用基于已安装引擎的 url_for 获取基于约束的 url

有什么方法可以让url_for在Action调度路由期间根据request.host返回url吗?mountCollaborate::Engine=>'/apps/collaborate',:constraints=>{:host=>'example.com'}mountCollaborate::Engine=>'/apps/worktogether'示例:当用户在example.com主机上时collaborate_path=>/apps/collaborate当用户在任何其他主机上时collaborate_path=>/apps/worktogether经过大量研究,我意识到Rou

Ruby for in loop error with { } block delimiter

在Ruby语言中,以下在irb中工作forfruitin['apple','banana','cherry','date']doputsfruitend但是这个没有#errorforfruitin['apple','banana','cherry','date']{putsfruit}请注意引用以下block分隔符不要出错5.timesdo|i|puts"hello"+i.to_send5.times{|i|puts"hello"+i.to_s}编辑:我想我观察到的是用end代替{}的方式不一致有人可以解释为什么或者请指出我的错误吗? 最佳答案

ruby - bundle 安装错误 - 你的 bundle 只支持平台 [] 但你的本地平台是 ["ruby", "x86_64-linux"]

在执行bundle安装时出现此错误;谷歌似乎是一个常见问题,但我似乎找不到解决方法(似乎是关于Gemfile.lock的建议,但我将该文件移到了另一个目录)#bundleinstallYourbundleonlysupportsplatforms[]butyourlocalplatformsare["ruby","x86_64-linux"],andthere'snocompatiblematchbetweenthosetwolists.这是我的Gemfile,目录中没有Gemfile.lock。[root@ip-172-30-4-16rails]#gem-v2.6.11[root@i