草庐IT

xcode-missing-deprecated-warnings

全部标签

ruby-on-rails - RSpec Controller 测试 : missing template on create

我有一个有趣的情况。我正在测试以下简单的创建操作:#willonlybeaccessedviaAjaxdefcreateclick=Click.new(params[:click])click.save#don'treallycarewhetheritssuccessorfailureend然后我有以下非常简单的Controller规范:require'spec_helper'describeClicksController,"creatingaclick"doit"shouldcreateaclickforevent"doxhr:post,:create,:click=>{:even

ruby-on-rails - rails 错误 method_missing':Gem::Specification 的未定义方法 `this'

我遵循这个教程:https://guides.spreecommerce.com/developer/getting_started_tutorial.html#installing-image-magick当我写作时jonstark@jonstark-pc:~/rails_projects/optima1$spreeinstall--auto-accept我明白了:/home/jonstark/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/specification.rb:2158:in`method_missing':undefine

ruby - 开始使用 MacRuby 和 Xcode 4.2

我最近想开始使用MacRuby。我已经安装了Xcode4.2和MacRuby,但显然我遗漏了一些东西。到目前为止,在我发现的每个教程中都说,我必须从Xcode模板中选择“MacRuby应用程序”……但是没有这样的条目可用。我试过0.10和几天前发布的每晚版本。我查看了MacRuby的安装位置,我找到了Xcode3.0的模板……我必须使用这些模板吗?如何将它们导入Xcode4.2?在开始之前,我还想知道,从MacRuby开始是否安全?乍一看,我认为"is",因为有新的MacRuby书籍可用——但MacRuby网站上似乎没有太多事件(去年3月的最后一篇博客文章?)……根据我的经验,这可能是

ruby-on-rails - 我该如何去追踪与 Bundler 相关的 DEPRECATION WARNING

我是Rails的新手。当我启动我的应用程序时,我不断看到这些弃用警告:DEPRECATIONWARNING:refisdeprecatedandwillberemovedfromRails3.2.(calledfromatD:/dev/AquaticKodiak/config/application.rb:12)DEPRECATIONWARNING:newisdeprecatedandwillberemovedfromRails3.2.(calledfromatD:/dev/AquaticKodiak/config/application.rb:12)好的,第12行是什么?这个:Bun

ruby - 通过 API 和 ruby​​ 创建优惠券返回错误 : woocommerce_api_missing_coupon_data

我正在尝试使用本页文档中的示例代码通过我的Rails4应用程序的其余API创建优惠券:https://woocommerce.github.io/woocommerce-rest-api-docs/?ruby#create-a-coupon这是我使用的代码:data={code:"10off",discount_type:"percent",amount:"10",individual_use:true,exclude_sale_items:true,minimum_amount:"100.00"}woocommerce.post("coupons",data).parsed_resp

ruby - 在 Xcode 运行脚本构建阶段使用 rvm 强制指定 Ruby

在Xcode之外,我使用特定版本的Ruby,使用RVM管理多个Ruby安装。Apple的命令行开发工具将Ruby安装在/usr/bin/ruby并且版本为1.8.7。我通过RVM使用1.9.3。有没有办法强制Xcode在运行其运行脚本构建阶段时使用我的1.9.3安装?我已经尝试将Shell路径设置为我的特定Ruby的完整路径,但这似乎没有什么不同,我的意思是我在1.9.3中安装的特定Gems不可用/在Xcode中运行时对脚本可见。如果我在命令行上通过xcodebuild运行我的项目,运行脚本阶段会使用我的特定Ruby,因为它是从我的shell环境中运行的(即使项目文件中的Shell路径

ruby-on-rails - 我得到 "Missing these required gems",但安装了 gem

自从我使用MacPorts(在Leopard上)更新了ruby​​后,我遇到了几个问题,我还不得不重新安装gems。现在,当我运行Mongrel时,我不断收到错误“缺少这些必需的gems”,然后是我在environment.rb中需要的gems列表,但是当我看到运行gemlist时,这些gems似乎已正确安装.我认为rails正在寻找以前的安装,但我不知道如何配置它以使用新的ruby​​/gem路径。谢谢! 最佳答案 你应该使用:config.gem'rspec',:lib=>'spec'config.gem'rspec-rails

ruby-on-rails - RSpec load_missing_constant,期望 X 定义 Y(确实如此)

当我们运行时bundleexecrake规范尝试加载环境时出现错误:...gems/activesupport-3.2.8/lib/active_support/dependencies.rb:503:in`load_missing_constant':Expected...app/models/links/category.rbtodefineLinks::Category(LoadError)文件app/models/links/Category.rb确实定义了Links::Category。更奇怪的是,在guard和spork下运行时不会发生错误(我们运行测试的标准方式):bun

ruby - pg gem : 'Warning: no type cast defined for type "numeric"'

我在从pggem中获取输入结果时遇到问题。require'pg'require_relative'spec/fixtures/database'client=PG.connect(DB[:pg])client.type_map_for_queries=PG::BasicTypeMapForQueries.new(client)client.type_map_for_results=PG::BasicTypeMapForResults.new(client)client.exec(%|select*fromtestme;|)do|query|query.each{|r|putsr.ins

ruby-on-rails - 是否有针对 Rails、Ruby、Erb 的 Xcode 语法着色?如果没有,我怎么能自己写一个?

Xcode的语法着色充其量只是很差,而textmate看起来不错,但我喜欢Xcode,因为我也用C++编程。我想将所有内容都放在一个地方并利用其他Xcode功能。有没有人已经这样做过或者有没有简单的方法来做到这一点? 最佳答案 你可以去Editor>SyntaxColoring>CheckHTMLanddoitagainforRuby 关于ruby-on-rails-是否有针对Rails、Ruby、Erb的Xcode语法着色?如果没有,我怎么能自己写一个?,我们在StackOverflo