vigo/textmate2-gfm-preview

Getting error "You need to set $TM_RUBY variable."

Opened this issue · 4 comments

I have followed the instructions in the README, however, I'm still getting the error "You need to set $TM_RUBY variable." when I attempt to preview a file in TextMate. Here's the output from the terminal to verify that the TM_RUBY variable has been set:

donturner at donturner-macbookpro2 in ~/Library/Application Support/TextMate/Bundles/GFM-Preview.tmbundle/Support on master [!?]
$ defaults write com.macromates.textmate environmentVariables -array-add '{enabled = 1; value = "/Users/donturner/homebrew/bin/ruby"; name = "TM_RUBY"; }'

donturner at donturner-macbookpro2 in ~/Library/Application Support/TextMate/Bundles/GFM- Preview.tmbundle/Support on master [!?]
$ defaults read com.macromates.textmate environmentVariables
( 
    {
        enabled = 1;
        name = "TM_RUBY";
        value = "/Users/donturner/homebrew/bin/ruby";
    }
)

Any ideas what could be causing this?

Also tried going to Prefs->Variables and adding TM_RUBY in manually but still getting the error.

vigo commented

Well, in the terminal, check your ruby:

$ which ruby

Use that in the config... /Users/donturner/homebrew/bin/ruby seems a bit strange to me. How did you install Ruby?

screen_shot_2018-10-07_at_19_06_16

vigo commented

If you don't set the TM_RUBY you can use built-in ruby (which ships with mac os) but you need to install gems via sudo:

git clone https://github.com/vigo/textmate2-gfm-preview.git GFM-Preview.tmbundle
cd GFM-Preview.tmbundle/Support/
sudo bundle install --path vendor/bundle # this line
vigo commented

@dturner can i close the issue?