3

我尝试使用以下命令打开 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”

我做错了什么?

4

2 回答 2

2

I think you need to set $EDITOR or $BUNDLER_EDITOR in .profile file.

You can set it like this:

export BUNDLER_EDITOR=aptana

Hope this works for you!

于 2013-04-27T16:16:14.987 回答
1

试过这个,但它也不起作用:

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

于 2019-02-12T10:51:22.960 回答