【问题标题】:How to set Aptana to be my default BUNDLER_EDITOR?如何将 Aptana 设置为我的默认 BUNDLER_EDITOR?
【发布时间】:2012-11-04 12:28:34
【问题描述】:

我尝试使用以下命令打开 gem:

$bundle open jquery-rails

但它给了我以下错误:

To open a bundled gem, set $EDITOR or $BUNDLER_EDITOR

所以,我在阅读时搜索了一下,我应该打开我的 .bashrc 文件并设置 BUNDLER_EDITOR 变量。我做了以下事情:

sudo gedit ~/.bashrc

并在文件末尾输入了上面的行:

export BUNDLER_EDITOR=aptana

在示例中,他们使用的是 vim,但由于我使用的是 aptana studio 3,所以我想使用它。

无论如何,它给了我以下错误:

无法运行 'aptana /home/gotqn/.rvm/gems/ruby-1.9.3-p286/gems/jquery-rails-2.1.3'

我做错了什么?

【问题讨论】:

    标签: ruby-on-rails gem editor aptana


    【解决方案1】:

    我认为您需要在.profile 文件中设置$EDITOR$BUNDLER_EDITOR

    你可以这样设置:

    export BUNDLER_EDITOR=aptana
    

    希望这对你有用!

    【讨论】:

    • +1 对于答案,但我无法确认它是否有效,因为我放弃了 Aptana 的东西并开始使用 RubyMine。无论如何,谢谢:-]
    • 试过了,但也没用:export EDITOR="/Applications/Sublime.app"peterandersson@Macintosh:myapp(0)$ bundle open jquery-railsCould not run '/Applications/Sublime.app /Users/peterandersson/.rvm/gems/ruby-1.9.3-p429/gems/jquery-rails-3.0.1'
    • 此链接描述了如何将 Sublime 设置为默认 $EDITOR:OS X Command Line
    • @PeterAndersson 请将此作为单独的答案添加。
    【解决方案2】:

    试过了,但它也不起作用:

    export EDITOR="/Applications/Sublime.app" peterandersson@Macintosh:myapp(0)$ bundle open jquery-rails Could not run '/Applications/Sublime.app /Users/peterandersson/.rvm/gems/ruby-1.9.3-p429/gems/jquery-rails-3.0.1' 
    

    export EDITOR=vimworks 但是,我宁愿使用 Sublime 而不是 vim:

    此链接描述了如何将Sublime 设置为默认$EDITOR

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-04-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-31
      • 2020-08-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多