【问题标题】:Need help in configuring default editor in pry on windows在 Windows 上的 pry 中配置默认​​编辑器时需要帮助
【发布时间】:2016-02-10 12:37:36
【问题描述】:

我在 Windows 平台的 pry 中配置默认​​编辑器时遇到问题。 我能够打开 pry 会话并在 pry 会话中能够导航、cd 到实例变量并使用 binding.pry 停止执行并使用播放命令执行代码行。

但无法使用编辑命令修改代码,这会给出错误,例如找不到 c:\myusernameAppLocalTemppry20160210-9320-1kn8la9.rb 文件

我正在使用 ruby​​ -> 1.9.3 pry -> 0.10.3 rspec -> 2.11.0 请让我知道如何使用 pry session 配置打开编辑器

提前致谢 桑托什·库尔卡尼

【问题讨论】:

    标签: pry


    【解决方案1】:

    我遇到了同样的问题,然后我创建了 ~/.pryrc 并插入了以下行(我使用 Vi 作为编辑器)。

    Pry.config.editor = "vi"
    Pry.config.editor = proc { |file, line| "vi +#{line} #{file}" }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-10-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-09
      • 2013-04-16
      • 2011-07-23
      相关资源
      最近更新 更多