windows Ruby 包打开,设置 $EDITOR
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7411091/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Ruby bundle open, set $EDITOR
提问by kdub
I am trying to use the command line to open the the jquery-rails gem. I am using the command: bundle open jquery-rails
and I am getting the message returned: To open a bundled gem, set $EDITOR or $BUNDLE_EDITOR
我正在尝试使用命令行打开 jquery-rails gem。我正在使用命令:bundle open jquery-rails
并且我收到返回的消息:To open a bundled gem, set $EDITOR or $BUNDLE_EDITOR
Forgive me if this is totally newb, but how do I set my text editor Notepad++ like the message is telling me to? I am using windows vista/Rails 3.1
如果这完全是新手,请原谅我,但是我如何像消息告诉我的那样设置我的文本编辑器 Notepad++?我正在使用 windows vista/Rails 3.1
Thanks for any advice.
感谢您的任何建议。
回答by Anatoly
vi ~/.bashrc or ~/.zshrc or whatever you have:
export EDITOR=vim
回答by Simone Carletti
Because you mentioned Notepad++ I suppose you are working with Windows. You need to set an environment variablecalled EDITOR
containing the path to Notepad++.
因为您提到了 Notepad++,所以我想您正在使用 Windows。您需要设置一个名为的环境变量,EDITOR
其中包含 Notepad++ 的路径。
回答by Eric Wu
If you use zsh on Mac OS X,add this line of code into .zshrc
file:
如果您在 Mac OS X 上使用 zsh,请将这行代码添加到.zshrc
文件中:
export EDITOR="mvim"
export EDITOR="mvim"
That will make macvim
to open the gem.
这将使macvim
打开宝石。