textmate / GitHub-Markdown.tmbundle

:octocat: GitHub Flavoured Markdown for TextMate
MIT License
40 stars 12 forks source link

Cannot generate preview with RVM #18

Closed chrisbloom7 closed 8 years ago

chrisbloom7 commented 8 years ago

I have set my TM_RUBY variable set per https://rvm.io/integration/textmate and if I execute `rvm current` # => in a ruby document in Textmate I get ruby-2.2.3@global.

In my console:

$ rvm current
ruby-2.2.3@global

$ gem install redcarpet pygments.rb
Building native extensions.  This could take a while...
Successfully installed redcarpet-3.3.4
Successfully installed pygments.rb-0.6.3
2 gems installed

But when I then run "Show Preview" on a Markdown document in TextMate I get the following error in the output window:

Please install the Redcarpet and Pygments.rb RubyGems by running the following:

/usr/bin/gem install --user redcarpet pygments.rb

If I uninstall the GitHub-Markdown bundle the default Show Preview command works fine.

Screenshot of Error

MikeMcQuaid commented 8 years ago

Sorry, I can't provide support for using RVM as I've never used it.

noniq commented 8 years ago

The preview command of this bundle always uses the system Ruby (see shebang in https://github.com/MikeMcQuaid/GitHub-Markdown.tmbundle/blob/master/Support/bin/redcarpet.rb ).

Have you tried installing the gems for system Ruby with the command given in the error message? (If this does not work you might need to do the equivalent of rbenv shell system in RVM, but unfortunately I’m not an RVM expert either …)

thomasaw commented 4 years ago

To get this working I needed to temporarily turn off rvm by using: rvm use system

Then install the gems by using: sudo /usr/bin/gem install --user redcarpet pygments.rb