我试图在 Sublime Text 中打开一个 gem,但没有成功。我安装了 bundler 。这是正在发生的事情。
在命令行中:
$bundle open Devise
To open a bundled gem, set $EDITOR or $BUNDLER_EDITOR
当我去 Bundler website它说,
Open the source directory of the given bundled gem:
$ bundle open GEM
This opens the source directory of the provided GEM in your editor. For this to work the
EDITOR
orBUNDLER_EDITOR
environment variable has to be set.
我对这一切都是陌生的。设置我的 EDITOR
或 BUNDLER_EDITOR
环境变量的具体步骤是什么?我在 Mac 上使用 Sublime Text。
谢谢。
最佳答案
假设您使用的是 bash shell,您需要使用以下命令编辑 ~/.bashrc
或 ~/.bash_profile
:
export EDITOR=<editor name>
示例,专门用于 Sublime:
export EDITOR='subl -w'
关于ruby-on-rails - 设置 'EDITOR' 或 'BUNDLER_EDITOR' 环境变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25084035/