ruby-on-rails - 运行 Heckle 时出错? `current_code' : undefined method `translate' for Ruby2Ruby

标签 ruby-on-rails ruby heckle

我正在尝试运行 Heckle,但一直出现错误:

> spec spec/controllers/my_controller_spec.rb --heckle MyController

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! exception= has a thick skin. There's nothing to heckle.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

(Runs through several mutations...)

/home/developer/.gem/ruby/1.8/gems/heckle-1.4.3/lib/heckle.rb:603:in `current_code': undefined method `translate' for Ruby2Ruby:Class (NoMethodError)

有什么想法吗?

编辑:我忘记了 gem 版本:

heckle (1.4.3)
ruby2ruby (1.2.3)
rails (2.3.2, 2.2.2)
rspec (1.2.6)
rspec-rails(1.2.6, 1.1.12)

最佳答案

安装 ruby​​2ruby 1.2.2。 1.2.3 中似乎有一个 API 更改。

刚刚为 1.2.2 生成了文档和 1.2.3

看起来类方法“翻译”已被完全删除,尽管文档没有反射(reflect)这一点

关于ruby-on-rails - 运行 Heckle 时出错? `current_code' : undefined method `translate' for Ruby2Ruby,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1144906/

相关文章:

ruby-on-rails - 不知道如何构建任务 'bundle' - Ruby on Rails

javascript - Assets 错误 :precompile because of ckeditor assets

ruby - 使用 Selenium Webdriver 查找 Web 元素

ruby - 将 "2015-03-18 22:00"转换为 Time 对象的最佳方法

ruby-on-rails - 需要在 belongs_to/has_many 关系的迁移中使用 add_index 吗? (Rails 3.2,事件记录)

ruby - 你能要求 ruby​​ 将警告视为错误吗?

ruby-on-rails - 如何针对这种特定情况实现祖先

ruby-on-rails - 用于 Web 应用程序注册、登录、管理密码的现有库?

ruby - rspec 和 heckle 的兼容性如何?