Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dturner opened this issue Oct 5, 2018 · 4 comments
Open

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

dturner opened this issue Oct 5, 2018 · 4 comments

Comments

@dturner
Copy link

dturner commented Oct 5, 2018

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?

@dturner
Copy link
Author

dturner commented Oct 5, 2018

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

@vigo
Copy link
Owner

vigo commented Oct 7, 2018

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
Copy link
Owner

vigo commented Oct 7, 2018

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
Copy link
Owner

vigo commented Oct 18, 2018

@dturner can i close the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants