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
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
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
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
I reproduce the same effect as Matt N. gets. What does “clear your env” mean? Seems broken to me; either the messaging or the design could use some cleanup. Probably the design as it’s pretty old now.
On Nov 27, 2021, at 13:51, 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
By clear you environment I mean reset your PATH and other environment variables so that the other installed ruby/gems cannot interfere with the system version. On Nov 27, 2021, 1:07 AM -0600, John Joyce via TextMate textmate@lists.macromates.com, wrote:
I reproduce the same effect as Matt N. gets. What does “clear your env” mean? Seems broken to me; either the messaging or the design could use some cleanup. Probably the design as it’s pretty old now.
On Nov 27, 2021, at 13:51, 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
TextMate mailing list -- textmate@lists.macromates.com To unsubscribe send an email to textmate-leave@lists.macromates.com
try this one - https://github.com/vigo/textmate2-gfm-preview%C2%A0:))
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
On 27 Nov 2021, at 01:00, 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.
I didn’t say that. I said you should use the version of Ruby that TextMate invokes when invoking that command. It can be system Ruby and it can be something else.
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.
Running a Ruby script and running a bundle command is not the same thing. When running a Ruby script from within TextMate you’re invoking the “Run” bundle command in the Ruby bundle. This will invoke Ruby 1.8.7 [1], which will invoke the ruby_script.rb [2] script inside the Ruby bundle. This script will later use the TM_RUBY environment variable, if it’s set, or otherwise fall back to what’s in the PATH environment variable to find the appropriate Ruby to execute your script with.
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.
When it comes to the Markdown preview command, you can see here [4] that it’s invoking Ruby 1.8.7. As for the redcarpet part, that comes from GitHub-Markdown bundle, which is invoking system Ruby here [5]. If you change [5] to the path of your Ruby 2.6.3p62 it should work.
[1] https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c67... https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c678152fea6892/Commands/Run.tmCommand#L10
[2] https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c67...
[3] https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c67... https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c678152fea6892/Support/RubyMate/run_script.rb#L46
[4] https://github.com/textmate/markdown.tmbundle/blob/c6b2d79cafcd8619c79acd79a... https://github.com/textmate/markdown.tmbundle/blob/c6b2d79cafcd8619c79acd79a04e7f5927062aa1/Commands/Markdown%20preview.plist#L12
[5] https://github.com/textmate/GitHub-Markdown.tmbundle/blob/2b58b061e3a59d794b...
Thank you for the detailed explanation. No wonder I keep getting confused by this.
What about `whereis` pointing to `ruby/usr/bin/ruby`? One (at least I) can’t look at the file and see what version it is either. Both of these files are too small, so presumably pointers.
The confusion won’t end of course since we have different OSs and different methods of managing Rubies. If people like Matt are tripped up by this I don’t feel so bad.
I found 17 files named “ruby’ and one name “Ruby” (/System/Library/Frameworks/Ruby.framework/Versions/2.6/Ruby) on my eight year old MBP. I’ve very much an amateur.
On Nov 27, 2021, at 2:09 AM, Jacob Carlborg via TextMate textmate@lists.macromates.com wrote:
On 27 Nov 2021, at 01:00, Matt Neuburg via TextMate <textmate@lists.macromates.com mailto: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.
I didn’t say that. I said you should use the version of Ruby that TextMate invokes when invoking that command. It can be system Ruby and it can be something else.
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.
Running a Ruby script and running a bundle command is not the same thing. When running a Ruby script from within TextMate you’re invoking the “Run” bundle command in the Ruby bundle. This will invoke Ruby 1.8.7 [1], which will invoke the ruby_script.rb [2] script inside the Ruby bundle. This script will later use the TM_RUBY environment variable, if it’s set, or otherwise fall back to what’s in the PATH environment variable to find the appropriate Ruby to execute your script with.
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.
When it comes to the Markdown preview command, you can see here [4] that it’s invoking Ruby 1.8.7. As for the redcarpet part, that comes from GitHub-Markdown bundle, which is invoking system Ruby here [5]. If you change [5] to the path of your Ruby 2.6.3p62 it should work.
[1] https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c67... https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c678152fea6892/Commands/Run.tmCommand#L10
[2] https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c67... https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c678152fea6892/Commands/Run.tmCommand#L12
[3] https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c67... https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c678152fea6892/Support/RubyMate/run_script.rb#L46
[4] https://github.com/textmate/markdown.tmbundle/blob/c6b2d79cafcd8619c79acd79a... https://github.com/textmate/markdown.tmbundle/blob/c6b2d79cafcd8619c79acd79a04e7f5927062aa1/Commands/Markdown%20preview.plist#L12
[5] https://github.com/textmate/GitHub-Markdown.tmbundle/blob/2b58b061e3a59d794b... https://github.com/textmate/GitHub-Markdown.tmbundle/blob/2b58b061e3a59d794b1c5e3a87526f2a544898f2/Support/bin/redcarpet.rb#L1
-- /Jacob Carlborg
TextMate mailing list -- textmate@lists.macromates.com To unsubscribe send an email to textmate-leave@lists.macromates.com
Don’t feel bad in any way. You are not dumb and this is not easy. You are correct that it is complicated by the combination and permutations of configurations. Or it seems to be so. That can sometimes be a red herring.
On Nov 28, 2021, at 1:02, Greg via TextMate textmate@lists.macromates.com wrote:
Thank you for the detailed explanation. No wonder I keep getting confused by this.
What about `whereis` pointing to `ruby/usr/bin/ruby`? One (at least I) can’t look at the file and see what version it is either. Both of these files are too small, so presumably pointers.
The confusion won’t end of course since we have different OSs and different methods of managing Rubies. If people like Matt are tripped up by this I don’t feel so bad.
I found 17 files named “ruby’ and one name “Ruby” (/System/Library/Frameworks/Ruby.framework/Versions/2.6/Ruby) on my eight year old MBP. I’ve very much an amateur.
On Nov 27, 2021, at 2:09 AM, Jacob Carlborg via TextMate textmate@lists.macromates.com wrote:
On 27 Nov 2021, at 01:00, 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.
I didn’t say that. I said you should use the version of Ruby that TextMate invokes when invoking that command. It can be system Ruby and it can be something else.
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.
Running a Ruby script and running a bundle command is not the same thing. When running a Ruby script from within TextMate you’re invoking the “Run” bundle command in the Ruby bundle. This will invoke Ruby 1.8.7 [1], which will invoke the ruby_script.rb [2] script inside the Ruby bundle. This script will later use the TM_RUBY environment variable, if it’s set, or otherwise fall back to what’s in the PATH environment variable to find the appropriate Ruby to execute your script with.
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.
When it comes to the Markdown preview command, you can see here [4] that it’s invoking Ruby 1.8.7. As for the redcarpet part, that comes from GitHub-Markdown bundle, which is invoking system Ruby here [5]. If you change [5] to the path of your Ruby 2.6.3p62 it should work.
[1] https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c67...
[2] https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c67...
[3] https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c67...
[4] https://github.com/textmate/markdown.tmbundle/blob/c6b2d79cafcd8619c79acd79a...
[5] https://github.com/textmate/GitHub-Markdown.tmbundle/blob/2b58b061e3a59d794b...
-- /Jacob Carlborg
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
Yes, it’s a bit complicated.
I think TextMate should bundle its own copy of Ruby 2 as it does with Ruby 1.8.7, especially since Ruby won’t be shipped on macOS forever. This can be used by all bundle commands implemented in Ruby. As for those using the actual Ruby bundle, I would expect those to be familiar with how to install Ruby and they would care which version they’re using, at least for executing their Ruby code. But they should not need to care about how the bundle commands are implemented. If they’re implemented in Ruby that’s just an implementation detail.
On 27 Nov 2021, at 17:01, Greg via TextMate textmate@lists.macromates.com wrote:
Thank you for the detailed explanation. No wonder I keep getting confused by this.
What about `whereis` pointing to `ruby/usr/bin/ruby`? One (at least I) can’t look at the file and see what version it is either. Both of these files are too small, so presumably pointers.
The confusion won’t end of course since we have different OSs and different methods of managing Rubies. If people like Matt are tripped up by this I don’t feel so bad.
I found 17 files named “ruby’ and one name “Ruby” (/System/Library/Frameworks/Ruby.framework/Versions/2.6/Ruby) on my eight year old MBP. I’ve very much an amateur.
On Nov 27, 2021, at 2:09 AM, Jacob Carlborg via TextMate <textmate@lists.macromates.com mailto:textmate@lists.macromates.com> wrote:
On 27 Nov 2021, at 01:00, Matt Neuburg via TextMate <textmate@lists.macromates.com mailto: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.
I didn’t say that. I said you should use the version of Ruby that TextMate invokes when invoking that command. It can be system Ruby and it can be something else.
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.
Running a Ruby script and running a bundle command is not the same thing. When running a Ruby script from within TextMate you’re invoking the “Run” bundle command in the Ruby bundle. This will invoke Ruby 1.8.7 [1], which will invoke the ruby_script.rb [2] script inside the Ruby bundle. This script will later use the TM_RUBY environment variable, if it’s set, or otherwise fall back to what’s in the PATH environment variable to find the appropriate Ruby to execute your script with.
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.
When it comes to the Markdown preview command, you can see here [4] that it’s invoking Ruby 1.8.7. As for the redcarpet part, that comes from GitHub-Markdown bundle, which is invoking system Ruby here [5]. If you change [5] to the path of your Ruby 2.6.3p62 it should work.
[1] https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c67... https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c678152fea6892/Commands/Run.tmCommand#L10
[2] https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c67... https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c678152fea6892/Commands/Run.tmCommand#L12
[3] https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c67... https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c678152fea6892/Support/RubyMate/run_script.rb#L46
[4] https://github.com/textmate/markdown.tmbundle/blob/c6b2d79cafcd8619c79acd79a... https://github.com/textmate/markdown.tmbundle/blob/c6b2d79cafcd8619c79acd79a04e7f5927062aa1/Commands/Markdown%20preview.plist#L12
[5] https://github.com/textmate/GitHub-Markdown.tmbundle/blob/2b58b061e3a59d794b... https://github.com/textmate/GitHub-Markdown.tmbundle/blob/2b58b061e3a59d794b1c5e3a87526f2a544898f2/Support/bin/redcarpet.rb#L1
-- /Jacob Carlborg
TextMate mailing list -- textmate@lists.macromates.com mailto:textmate@lists.macromates.com To unsubscribe send an email to textmate-leave@lists.macromates.com mailto:textmate-leave@lists.macromates.com
TextMate mailing list -- textmate@lists.macromates.com To unsubscribe send an email to textmate-leave@lists.macromates.com
This is a great idea. Might be worth looking at the approach iTerm takes.
On Nov 28, 2021, at 4:05, Jacob Carlborg via TextMate textmate@lists.macromates.com wrote:
Yes, it’s a bit complicated.
I think TextMate should bundle its own copy of Ruby 2 as it does with Ruby 1.8.7, especially since Ruby won’t be shipped on macOS forever. This can be used by all bundle commands implemented in Ruby. As for those using the actual Ruby bundle, I would expect those to be familiar with how to install Ruby and they would care which version they’re using, at least for executing their Ruby code. But they should not need to care about how the bundle commands are implemented. If they’re implemented in Ruby that’s just an implementation detail.
On 27 Nov 2021, at 17:01, Greg via TextMate textmate@lists.macromates.com wrote:
Thank you for the detailed explanation. No wonder I keep getting confused by this.
What about `whereis` pointing to `ruby/usr/bin/ruby`? One (at least I) can’t look at the file and see what version it is either. Both of these files are too small, so presumably pointers.
The confusion won’t end of course since we have different OSs and different methods of managing Rubies. If people like Matt are tripped up by this I don’t feel so bad.
I found 17 files named “ruby’ and one name “Ruby” (/System/Library/Frameworks/Ruby.framework/Versions/2.6/Ruby) on my eight year old MBP. I’ve very much an amateur.
On Nov 27, 2021, at 2:09 AM, Jacob Carlborg via TextMate textmate@lists.macromates.com wrote:
On 27 Nov 2021, at 01:00, 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.
I didn’t say that. I said you should use the version of Ruby that TextMate invokes when invoking that command. It can be system Ruby and it can be something else.
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.
Running a Ruby script and running a bundle command is not the same thing. When running a Ruby script from within TextMate you’re invoking the “Run” bundle command in the Ruby bundle. This will invoke Ruby 1.8.7 [1], which will invoke the ruby_script.rb [2] script inside the Ruby bundle. This script will later use the TM_RUBY environment variable, if it’s set, or otherwise fall back to what’s in the PATH environment variable to find the appropriate Ruby to execute your script with.
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.
When it comes to the Markdown preview command, you can see here [4] that it’s invoking Ruby 1.8.7. As for the redcarpet part, that comes from GitHub-Markdown bundle, which is invoking system Ruby here [5]. If you change [5] to the path of your Ruby 2.6.3p62 it should work.
[1] https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c67...
[2] https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c67...
[3] https://github.com/textmate/ruby.tmbundle/blob/efcb8941c701343f1b2e9fb105c67...
[4] https://github.com/textmate/markdown.tmbundle/blob/c6b2d79cafcd8619c79acd79a...
[5] https://github.com/textmate/GitHub-Markdown.tmbundle/blob/2b58b061e3a59d794b...
-- /Jacob Carlborg
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
-- /Jacob Carlborg
TextMate mailing list -- textmate@lists.macromates.com To unsubscribe send an email to textmate-leave@lists.macromates.com
Yepper! Actually I changed it to `/usr/bin/env ruby`, which is what it should have been all along. I'll submit a pull request to that effect.
There's no way I was going to install any gems in the system ruby, even if it were possible to do so (which I doubt). It should not be used for anything at this point; indeed, Apple has repeatedly warned that pretty soon there might not even _be_ a system ruby. You should _always_ use your own ruby, for everything. It's "Bring Your Own Ruby" from here on out.
m.
On Nov 27, 2021, at 1:09 AM, Jacob Carlborg via TextMate textmate@lists.macromates.com wrote:
When it comes to the Markdown preview command, you can see here [4] that it’s invoking Ruby 1.8.7. As for the redcarpet part, that comes from GitHub-Markdown bundle, which is invoking system Ruby here [5]. If you change [5] to the path of your Ruby 2.6.3p62 it should work.
[5] https://github.com/textmate/GitHub-Markdown.tmbundle/blob/2b58b061e3a59d794b...
-- 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