Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting 'EDITOR' or 'BUNDLER_EDITOR' environment variable

I am trying to open up a gem in Sublime Text, unsuccessfully. I have Bundler installed. Here is what is happening.

In the command line:

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

When I go to the Bundler website it says,

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 or BUNDLER_EDITOR environment variable has to be set.

I am new to all of this. What are the specific steps to set my EDITOR or BUNDLER_EDITOR environment variables? I'm on a Mac, using Sublime Text.

Thank you.

like image 790
HPJAJ Avatar asked Aug 01 '14 15:08

HPJAJ


1 Answers

Assuming you're using the bash shell, you'll want to edit either your ~/.bashrc or ~/.bash_profile with:

export EDITOR=<editor name> 

Example, specifically for Sublime:

export EDITOR='subl -w' 

See: Sublime OS X Command Line docs

like image 64
CDub Avatar answered Sep 20 '22 15:09

CDub