Hi,
After many grateful years with Textmate on my Macs, I also installed it on my new MBP with M1 CPU, running Monterey. Everything seems to run smooth until I hit cmd+/ to toggle/comment a region ;-)
What I think I’ve learned is that: 1. Monterey doesn’t ship a 1.8 ruby version anymore (at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby where the bundle-support bundle’s ruby18 shim looks for it). 2. The “downloaded” 1.8.7 version (from https://archive.textmate.org/ruby/ruby_1.8.7.tbz at ~/Library/Application\ Support/TextMate/Ruby/1.8.7/bin/ruby isn’t compatible with the M1 arch).
So the error is pretty “correct” :
/Users/.../Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/ruby18: line 43: /Users/.../Library/Application Support/TextMate/Ruby/1.8.7/bin/ruby: Bad CPU type in executable /Users/.../Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/ruby18: line 43: /Users/.../Library/Application Support/TextMate/Ruby/1.8.7/bin/ruby: Undefined error: 0
To get around it (for now) I first tried to install a 1.8 version of ruby using rbenv, which didn’t succeed - quick guess it isn’t supported in any way anymore ?! ;-)
So I resorted to adding a prefix to the $PATH variable pointing to ~/bin and adding a small shell script there pointing to a 2.x version
% cat ~/bin/ruby18 #!/bin/bash RBENV_VERSION=2.7.4 ruby "$@“
So that “resolved” my urgent need ;-) Once I get into areas/bundles with ruby18 code that doesn’t play nice with ruby 2.x (IANARubyKnowledgeablePersonSorry) I’ll probably bump into a new set of issues - fingers crossed for my limited Bundle needs ;-)
Is there anything I can look into to help out here? Or have I simply missed the obviously better approach to solve this?
Thanks and regards, Christophe
I recently migrated to a new M1 Max Mac, and have not had any issue with TM2 and the ⌘/ (toggle escape) shortcut. System Ruby is 2.6.8, and I use RVM and run whatever my Rails project needs with that. I believe there may be a version of Ruby bundled into TextMate just for the purpose of running these older command packages, but I have never had an issue and never needed to dig into it at all.
Walter
On Nov 22, 2021, at 4:59 PM, Christophe VG via TextMate textmate@lists.macromates.com wrote:
Hi,
After many grateful years with Textmate on my Macs, I also installed it on my new MBP with M1 CPU, running Monterey. Everything seems to run smooth until I hit cmd+/ to toggle/comment a region ;-)
What I think I’ve learned is that:
- Monterey doesn’t ship a 1.8 ruby version anymore (at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby where the bundle-support bundle’s ruby18 shim looks for it).
- The “downloaded” 1.8.7 version (from https://archive.textmate.org/ruby/ruby_1.8.7.tbz at ~/Library/Application\ Support/TextMate/Ruby/1.8.7/bin/ruby isn’t compatible with the M1 arch).
So the error is pretty “correct” :
/Users/.../Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/ruby18: line 43: /Users/.../Library/Application Support/TextMate/Ruby/1.8.7/bin/ruby: Bad CPU type in executable /Users/.../Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/ruby18: line 43: /Users/.../Library/Application Support/TextMate/Ruby/1.8.7/bin/ruby: Undefined error: 0
To get around it (for now) I first tried to install a 1.8 version of ruby using rbenv, which didn’t succeed - quick guess it isn’t supported in any way anymore ?! ;-)
So I resorted to adding a prefix to the $PATH variable pointing to ~/bin and adding a small shell script there pointing to a 2.x version
% cat ~/bin/ruby18 #!/bin/bash RBENV_VERSION=2.7.4 ruby "$@“
So that “resolved” my urgent need ;-) Once I get into areas/bundles with ruby18 code that doesn’t play nice with ruby 2.x (IANARubyKnowledgeablePersonSorry) I’ll probably bump into a new set of issues - fingers crossed for my limited Bundle needs ;-)
Is there anything I can look into to help out here? Or have I simply missed the obviously better approach to solve this?
Thanks and regards, Christophe
TextMate mailing list -- textmate@lists.macromates.com To unsubscribe send an email to textmate-leave@lists.macromates.com
I’m not on my M1 at the moment, but I got TM going without much drama. Similar to Walter, but I use ch-ruby. I definitely didn’t install anything older than a fairly recent 2. Ruby. I pretty much a clean install since I was upgrading my laptop from a 2013. Can’t test Cmd-\ at the moment. Memory says I set the path to wherever chruby put the rubies.
Good luck.
On Nov 22, 2021, at 8:15 PM, Walter Lee Davis via TextMate textmate@lists.macromates.com wrote:
I recently migrated to a new M1 Max Mac, and have not had any issue with TM2 and the ⌘/ (toggle escape) shortcut. System Ruby is 2.6.8, and I use RVM and run whatever my Rails project needs with that. I believe there may be a version of Ruby bundled into TextMate just for the purpose of running these older command packages, but I have never had an issue and never needed to dig into it at all.
Walter
On Nov 22, 2021, at 4:59 PM, Christophe VG via TextMate textmate@lists.macromates.com wrote:
Hi,
After many grateful years with Textmate on my Macs, I also installed it on my new MBP with M1 CPU, running Monterey. Everything seems to run smooth until I hit cmd+/ to toggle/comment a region ;-)
What I think I’ve learned is that:
- Monterey doesn’t ship a 1.8 ruby version anymore (at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby where the bundle-support bundle’s ruby18 shim looks for it).
- The “downloaded” 1.8.7 version (from https://archive.textmate.org/ruby/ruby_1.8.7.tbz at ~/Library/Application\ Support/TextMate/Ruby/1.8.7/bin/ruby isn’t compatible with the M1 arch).
So the error is pretty “correct” :
/Users/.../Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/ruby18: line 43: /Users/.../Library/Application Support/TextMate/Ruby/1.8.7/bin/ruby: Bad CPU type in executable /Users/.../Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/ruby18: line 43: /Users/.../Library/Application Support/TextMate/Ruby/1.8.7/bin/ruby: Undefined error: 0
To get around it (for now) I first tried to install a 1.8 version of ruby using rbenv, which didn’t succeed - quick guess it isn’t supported in any way anymore ?! ;-)
So I resorted to adding a prefix to the $PATH variable pointing to ~/bin and adding a small shell script there pointing to a 2.x version
% cat ~/bin/ruby18 #!/bin/bash RBENV_VERSION=2.7.4 ruby "$@“
So that “resolved” my urgent need ;-) Once I get into areas/bundles with ruby18 code that doesn’t play nice with ruby 2.x (IANARubyKnowledgeablePersonSorry) I’ll probably bump into a new set of issues - fingers crossed for my limited Bundle needs ;-)
Is there anything I can look into to help out here? Or have I simply missed the obviously better approach to solve this?
Thanks and regards, Christophe
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
FWIW I use an M1 and an iMac Pro and have no issues. I have it set to check for updates daily and install latest things. You might suffer if you have an older version of TextMate?
On Nov 23, 2021, at 12:15, Walter Lee Davis via TextMate textmate@lists.macromates.com wrote:
I recently migrated to a new M1 Max Mac, and have not had any issue with TM2 and the ⌘/ (toggle escape) shortcut. System Ruby is 2.6.8, and I use RVM and run whatever my Rails project needs with that. I believe there may be a version of Ruby bundled into TextMate just for the purpose of running these older command packages, but I have never had an issue and never needed to dig into it at all.
Walter
On Nov 22, 2021, at 4:59 PM, Christophe VG via TextMate textmate@lists.macromates.com wrote:
Hi,
After many grateful years with Textmate on my Macs, I also installed it on my new MBP with M1 CPU, running Monterey. Everything seems to run smooth until I hit cmd+/ to toggle/comment a region ;-)
What I think I’ve learned is that:
- Monterey doesn’t ship a 1.8 ruby version anymore (at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby where the bundle-support bundle’s ruby18 shim looks for it).
- The “downloaded” 1.8.7 version (from https://archive.textmate.org/ruby/ruby_1.8.7.tbz at ~/Library/Application\ Support/TextMate/Ruby/1.8.7/bin/ruby isn’t compatible with the M1 arch).
So the error is pretty “correct” :
/Users/.../Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/ruby18: line 43: /Users/.../Library/Application Support/TextMate/Ruby/1.8.7/bin/ruby: Bad CPU type in executable /Users/.../Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/ruby18: line 43: /Users/.../Library/Application Support/TextMate/Ruby/1.8.7/bin/ruby: Undefined error: 0
To get around it (for now) I first tried to install a 1.8 version of ruby using rbenv, which didn’t succeed - quick guess it isn’t supported in any way anymore ?! ;-)
So I resorted to adding a prefix to the $PATH variable pointing to ~/bin and adding a small shell script there pointing to a 2.x version
% cat ~/bin/ruby18 #!/bin/bash RBENV_VERSION=2.7.4 ruby "$@“
So that “resolved” my urgent need ;-) Once I get into areas/bundles with ruby18 code that doesn’t play nice with ruby 2.x (IANARubyKnowledgeablePersonSorry) I’ll probably bump into a new set of issues - fingers crossed for my limited Bundle needs ;-)
Is there anything I can look into to help out here? Or have I simply missed the obviously better approach to solve this?
Thanks and regards, Christophe
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
$ softwareupdate --install-rosetta
Uğur Özyılmazel
https://ugur.ozyilmazel.com https://github.com/vigo
On 23 Nov 2021 00:59 +0300, Christophe VG via TextMate textmate@lists.macromates.com, wrote:
Hi,
After many grateful years with Textmate on my Macs, I also installed it on my new MBP with M1 CPU, running Monterey. Everything seems to run smooth until I hit cmd+/ to toggle/comment a region ;-)
What I think I’ve learned is that:
- Monterey doesn’t ship a 1.8 ruby version anymore (at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby where the bundle-support bundle’s ruby18 shim looks for it).
- The “downloaded” 1.8.7 version (from https://archive.textmate.org/ruby/ruby_1.8.7.tbz at ~/Library/Application\ Support/TextMate/Ruby/1.8.7/bin/ruby isn’t compatible with the M1 arch).
So the error is pretty “correct” :
/Users/.../Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/ruby18: line 43: /Users/.../Library/Application Support/TextMate/Ruby/1.8.7/bin/ruby: Bad CPU type in executable /Users/.../Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/ruby18: line 43: /Users/.../Library/Application Support/TextMate/Ruby/1.8.7/bin/ruby: Undefined error: 0
To get around it (for now) I first tried to install a 1.8 version of ruby using rbenv, which didn’t succeed - quick guess it isn’t supported in any way anymore ?! ;-)
So I resorted to adding a prefix to the $PATH variable pointing to ~/bin and adding a small shell script there pointing to a 2.x version
% cat ~/bin/ruby18 #!/bin/bash RBENV_VERSION=2.7.4 ruby "$@“
So that “resolved” my urgent need ;-) Once I get into areas/bundles with ruby18 code that doesn’t play nice with ruby 2.x (IANARubyKnowledgeablePersonSorry) I’ll probably bump into a new set of issues - fingers crossed for my limited Bundle needs ;-)
Is there anything I can look into to help out here? Or have I simply missed the obviously better approach to solve this?
Thanks and regards, Christophe
TextMate mailing list -- textmate@lists.macromates.com To unsubscribe send an email to textmate-leave@lists.macromates.com
My MacBook Air M1 BtO has just arrived, which I will set up from scratch, backing up the home directory from Time Machine. Will see how that goes :-)-O
That also gives me the opportunity to test this issue on a fresh install, and the below comes in handy.
greetings, el
On 23/11/2021 12:07, Uğur Özyılmazel via TextMate wrote:
$ softwareupdate --install-rosetta
Uğur Özyılmazel
[...]
On 23 Nov 2021 00:59 +0300, Christophe VG via TextMate textmate@lists.macromates.com, wrote:
Hi,
After many grateful years with Textmate on my Macs, I also installed it on my new MBP with M1 CPU, running Monterey. Everything seems to run smooth until I hit cmd+/ to toggle/comment a region ;-)
What I think I’ve learned is that:
- Monterey doesn’t ship a 1.8 ruby version anymore (at
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby where the bundle-support bundle’s ruby18 shim looks for it).
- The “downloaded” 1.8.7 version (from
https://archive.textmate.org/ruby/ruby_1.8.7.tbz https://archive.textmate.org/ruby/ruby_1.8.7.tbz at ~/Library/Application\ Support/TextMate/Ruby/1.8.7/bin/ruby isn’t compatible with the M1 arch).
So the error is pretty “correct” :
/Users/.../Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/ruby18: line 43: /Users/.../Library/Application Support/TextMate/Ruby/1.8.7/bin/ruby: Bad CPU type in executable
/Users/.../Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/ruby18: line 43: /Users/.../Library/Application Support/TextMate/Ruby/1.8.7/bin/ruby: Undefined error: 0
To get around it (for now) I first tried to install a 1.8 version of ruby using rbenv, which didn’t succeed - quick guess it isn’t supported in any way anymore ?! ;-)
So I resorted to adding a prefix to the $PATH variable pointing to ~/bin and adding a small shell script there pointing to a 2.x version
% cat ~/bin/ruby18 #!/bin/bash RBENV_VERSION=2.7.4 ruby "$@“
So that “resolved” my urgent need ;-) Once I get into areas/bundles with ruby18 code that doesn’t play nice with ruby 2.x (IANARubyKnowledgeablePersonSorry) I’ll probably bump into a new set of issues - fingers crossed for my limited Bundle needs ;-)
Is there anything I can look into to help out here? Or have I simply missed the obviously better approach to solve this?
Thanks and regards, Christophe
[...]
BIG THANK YOU to Uğur Özyılmazel for the suggestion to install rosetta - TM commenting is back!
I've just encountered this same “Bad CPU type” error with ruby18:
/Users/quinn/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/ruby18: line 43: /Users/quinn/Library/Application Support/TextMate/Ruby/1.8.7/bin/ruby: Bad CPU type in executable /Users/quinn/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/ruby18: line 43: /Users/quinn/Library/Application Support/TextMate/Ruby/1.8.7/bin/ruby: Undefined error: 0
1. I upgraded to a MBP 14", running macOS 12.1 (clean install). 2. I fresh-installed TextMate via `brew install text mate` 3. I tried running my Duplicate Line command: https://pastebin.com/G8HLz4tc 4. I get the error above.
This command doesn't work with ruby v2, so it can't be fixed as easy as Christophe's `ruby18` wrapper script hack.
Should the ruby18 included in TextMate be able to run on Apple silicon?
Regards, Quinn
On 16 Dec 2021, at 20:25, Quinn Comendant via TextMate textmate@lists.macromates.com wrote: I tried running my Duplicate Line command: https://pastebin.com/G8HLz4tc https://pastebin.com/G8HLz4tc I get the error above. This command doesn't work with ruby v2, so it can't be fixed as easy as Christophe's ruby18 wrapper script hack.
Why doesn’t it work on Ruby 2? It’s just a couple of lines and I don’t see anything in those lines that wouldn’t work on Ruby 1.8.
Should the ruby18 included in TextMate be able to run on Apple silicon?
Ideally yes, but it might not be that simple. Ruby 1.8 is very old now, it might not work on Apple Silicon. It also won’t compile out of the box (regardless of architecture) because new versions of the C compiler has been released which enforces more warnings. IIRC Ruby compiles with warnings as errors which will cause the compilation to fail. It’s possible to workaround this issue.
I think it’s better to try to move to Ruby 2 (or even 3).
On 17 Dec 2021, at 5:06, Jacob Carlborg via TextMate wrote:
Why doesn’t it work on Ruby 2? It’s just a couple of lines and I don’t see anything in those lines that wouldn’t work on Ruby 1.8.
Ok, so I swear switching to ruby 2 didn't work yesterday! I was getting a `undefined method '+' for nil:NilClass` error.
But today, I replaced `ruby18` for just `ruby` and now the Duplicate Line command works. 🤷♂️
I don't know what you did, but you fixed it. 😉
Quinn
FWIW:
Duplicate line will throw
ruby: warning: -K is specified; it is for 1.8 compatibility and may cause odd behavior Duplicate Line:16:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)
when you have 2 cursors.
Hasn't really bothered me, but I thought it was relevant.
<3 G
On Fri, Dec 17, 2021 at 12:04 PM Quinn Comendant via TextMate < textmate@lists.macromates.com> wrote:
On 17 Dec 2021, at 5:06, Jacob Carlborg via TextMate wrote:
Why doesn’t it work on Ruby 2? It’s just a couple of lines and I don’t see anything in those lines that wouldn’t work on Ruby 1.8.
Ok, so I swear switching to ruby 2 didn't work yesterday! I was getting a undefined method '+' for nil:NilClass error.
But today, I replaced ruby18 for just ruby and now the Duplicate Line command works. 🤷♂️
I don't know what you did, but you fixed it. 😉
Quinn _______________________________________________ TextMate mailing list -- textmate@lists.macromates.com To unsubscribe send an email to textmate-leave@lists.macromates.com
On 17 Dec 2021, at 13:06, Graham Heath wrote:
Duplicate line will throw
ruby: warning: -K is specified; […]
when you have 2 cursors.
Ah, that's why. With multiple cursors I get that error, and if I remove `-K`, *then* I get the `undefined method '+' for nil:NilClass` error.
I can live with this.
Thanks for helping the world make sense again.
Q