Skip to content
This repository was archived by the owner on Nov 5, 2019. It is now read-only.
This repository was archived by the owner on Nov 5, 2019. It is now read-only.

El Capitan has no Ruby 1.8 #33

@baburdick

Description

@baburdick
$ /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby --version
-bash: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: No such file or directory
$ /usr/bin/env ruby18 --version
env: ruby18: No such file or directory

Replacing these with /usr/bin/env ruby in the relevant files allows one to see styled text and to preview a Markdown Redcarpet document. But printing to PDF or attempting through the print dialog to open in Preview.app causes TextMate (2.0-beta.8) to crash.

diff --git a/Commands/Preview.tmCommand b/Commands/Preview.tmCommand
index 968128d..1596130 100644
--- a/Commands/Preview.tmCommand
+++ b/Commands/Preview.tmCommand
@@ -17,7 +17,7 @@ fi

 # Convert to html then make one of the html tags above caret 
 # into a link that we scroll down to
-"${TM_MARKDOWN:-redcarpet.rb}"|"${TM_SMARTYPANTS:-SmartyPants.pl}"|ruby18 -wKU -e '
+"${TM_MARKDOWN:-redcarpet.rb}"|"${TM_SMARTYPANTS:-SmartyPants.pl}"|ruby -wKU -e '
 lines = STDIN.read.split("\n")
 n = [ENV["TM_LINE_NUMBER"].to_i, lines.length].min - 7

diff --git a/Commands/Title from current file.tmCommand b/Commands/Title from current file.tmCommand
index 3ba080e..a895d9b 100644
--- a/Commands/Title from current file.tmCommand    
+++ b/Commands/Title from current file.tmCommand    
@@ -5,7 +5,7 @@
    <key>beforeRunningCommand</key>
    <string>nop</string>
    <key>command</key>
-   <string>#!/usr/bin/env ruby18 -wKU
+   <string>#!/usr/bin/env ruby -wKU
 title = ENV['TM_FILENAME'].split('.').first
 title.gsub!(/[\-_]([a-zA-Z])/, ' \1')
 title.gsub!(/([a-z])([A-Z])/, '\1 \2')
diff --git a/Support/bin/redcarpet.rb b/Support/bin/redcarpet.rb
index ef12460..746a838 100755
--- a/Support/bin/redcarpet.rb
+++ b/Support/bin/redcarpet.rb
@@ -1,4 +1,4 @@
-#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
+#!/usr/bin/env ruby

 # Usage: redcarpet [<file>...]
 # Convert one or more Markdown files to HTML and write to standard output. With
$ /usr/bin/env ruby --version
ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions