try this one - https://github.com/vigo/textmate2-gfm-preview :))

Uğur Özyılmazel

https://ugur.ozyilmazel.com
https://github.com/vigo

On 27 Nov 2021 07:51 +0300, Kyle Kirbatski via TextMate <textmate@lists.macromates.com>, wrote:
If you look at the GitHub bundle, it overwrites what markdown generator to use. It changes it to this file:

~/Library/Application\ Support/TextMate/Pristine\ Copy/Bundles/GitHub-Markdown.tmbundle/Support/bin/redcarpet.rb

If you look inside that file, the top line says that it uses the system's ruby, not the one defined in your PATH or in TextMate:

#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby

After running the recommended command (/usr/bin/gem install --user redcarpet pygments.rb) on my machine, it worked as expected. So I don't know. I'd guess you should clear your environment and re-run the command

Best,
Kyle

On Nov 26, 2021, at 6:00 PM, Matt Neuburg via TextMate <textmate@lists.macromates.com> wrote:

You cannot mean that I should be installing any gems using the system Ruby. It is off limits, and has been since Catalina. You are _supposed_ to install your own Ruby, and I have done so.

And TextMate _is_ using it. When I run a TextMate ruby script consisting of `puts RUBY_VERSION`, I get `2.6.3`. When I say in the Terminal `ruby --version`, I get

ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin20]

Moreover, when I run a TextMate ruby script consisting of

require 'redcarpet'
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, extensions = {})
puts markdown.render("This is *bongos*, indeed.")

I get the expected

<p>This is <em>bongos</em>, indeed.</p>

So I don't think you can deny that TextMate Ruby sees redcarpet. The question is why the GitHub Markdown bundle does not see it.

I can just go on using Typora for Markdown, but it would be nice to use TextMate. But I need GitHub-flavored Markdown for this project.

m.

PS It is clear that the GitHub Markdown bundle is working in the sense that if I use code fences with a language, it is correctly formatted in the `.md` file. The problem is that I can't _render_ the Markdown.


On Nov 26, 2021, at 11:51 AM, Jacob Carlborg via TextMate <textmate@lists.macromates.com> wrote:

You need to install the gem using the Ruby version that TextMate is invoking. The instructions are assuming that TextMate will use the system provided Ruby version.

On 26 Nov 2021, at 18:39, Matt Neuburg via TextMate <textmate@lists.macromates.com> wrote:

How do I get GitHub flavored Markdown working? I installed the bundle but when I try to preview I see:

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

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

I did that, but it's not helping. Note that my ruby is installed with rbenv, and TextMate is pointed to it. My gems are installed using rbenv-gemset. For example, if I install redcarpet without saying `--user`, it goes into

/Users/mattmobile/.rbenv/versions/2.6.3/gemsets/rubyfrontier/gems/redcarpet-3.5.1/lib/redcarpet.rb

Thanks - m.

--
matt neuburg, phd = http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Programming iOS 14! https://www.oreilly.com/library/view/programming-ios-14/9781492092162/
iOS 14 Fundamentals! https://www.oreilly.com/library/view/ios-14-programming/9781492092087/
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html

_______________________________________________
TextMate mailing list -- textmate@lists.macromates.com
To unsubscribe send an email to textmate-leave@lists.macromates.com

--
/Jacob Carlborg

_______________________________________________
TextMate mailing list -- textmate@lists.macromates.com
To unsubscribe send an email to textmate-leave@lists.macromates.com

--
matt neuburg, phd = http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Programming iOS 14! https://www.oreilly.com/library/view/programming-ios-14/9781492092162/
iOS 14 Fundamentals! https://www.oreilly.com/library/view/ios-14-programming/9781492092087/
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html

_______________________________________________
TextMate mailing list -- textmate@lists.macromates.com
To unsubscribe send an email to textmate-leave@lists.macromates.com

_______________________________________________
TextMate mailing list -- textmate@lists.macromates.com
To unsubscribe send an email to textmate-leave@lists.macromates.com