我用叉子叉出了一块叫做蒙古德卷轴的宝石。我试图用撬动命令gem-open打开gem,但是我不能这样做,因为它抛出了一个错误。
我使用bundle exec pry执行pry,以便“查看”我的forked gem (在Gemfile中设置为gem 'mongoid-scroll', git: 'https://github.com/bgvo/mongoid-scroll.git'。
然后我从Pry控制台运行gem-open mongoid-scroll,它抛出一个错误:
[1] pry(main)> gem-open mongoid-scroll
NoMethodError: undefined method `invoke_editor' for Pry::Editor:Class
from /Users/borjagvo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/ruby/2.1.0/gems/pry-0.10.1/lib/pry/commands/gem_open.rb:19:in `block in process'通过谷歌搜索这个错误,我可以在Pry repo中找到this issue。这个修复程序在不久前已经合并到master中了,所以它应该是本地的(我尝试过bundle update),对吧?
有没有在Gemfile中指定一个gem不使用master分支的情况?
谢谢。
发布于 2015-04-09 00:04:45
已找到错误的原因。Gemfile的源文件是RubyGems.org。查看网站,上传的版本是最新的版本(0.10.1),尽管master (和我提到的问题)最近已经更新。结论:最新的修复程序尚未上载到RubyGems.org。
https://stackoverflow.com/questions/29518208
复制相似问题