Problem running ruby commands

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem running ruby commands

Nigel Chapman-2
I have encountered a problem running bundle commands that are implemented as ruby scripts with a shebang line

#!/usr/bin/env ruby18

I get an alert like this:



Here I was trying to use Insert Color… from the CSS bundle, but the same thing happens with other commands, including from bundles I made myself.

I am pretty sure that this only started when I upgraded to Catalina. (Presently on 10.15.1, TM 2.0.3. It doesn’t happen with 2.0.3 running on another machine with High Sierra.) Possibly this is related to the problem of loading plug-ins that was fixed in 2.0.1.

If I change the shebang to point to the version of ruby I installed with Homebrew commands work fine, but I don’t much want to edit every command in every bundle.

Has anybody else seen this? Do you know of any workrounds?




_______________________________________________
TextMate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: Problem running ruby commands

Matt Neuburg
Insert Color works fine for me. I find that the order in which your PATH is defined is crucial. My order is my `.rbenv` ruby followed immediately by the default $PATH followed by everything else. If the default $PATH is listed in the wrong spot, I get issues similar to what you've described. However, I'm still back at 2.0-rc.10, for reasons I've already explained, so that might matter too. m.

--
matt neuburg, phd = http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Programming iOS 13! http://shop.oreilly.com/product/0636920310075.do
iOS 13 Fundamentals! http://shop.oreilly.com/product/0636920310068.do
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html

> On Nov 26, 2019, at 4:23 AM, Nigel Chapman <[hidden email]> wrote:
>
> I have encountered a problem running bundle commands that are implemented as ruby scripts with a shebang line
>
> #!/usr/bin/env ruby18
>
> I get an alert like this:
>
> <Screenshot 2019-11-25 at 15.19.12.png>
>
>
> Here I was trying to use Insert Color… from the CSS bundle, but the same thing happens with other commands, including from bundles I made myself.
>
> I am pretty sure that this only started when I upgraded to Catalina. (Presently on 10.15.1, TM 2.0.3. It doesn’t happen with 2.0.3 running on another machine with High Sierra.) Possibly this is related to the problem of loading plug-ins that was fixed in 2.0.1.
>
> If I change the shebang to point to the version of ruby I installed with Homebrew commands work fine, but I don’t much want to edit every command in every bundle.
>
> Has anybody else seen this? Do you know of any workrounds?
>
>
>
> _______________________________________________
> TextMate mailing list
> [hidden email]
> https://lists.macromates.com/listinfo/textmate


_______________________________________________
TextMate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: Problem running ruby commands

Nigel Chapman-2
Matt,

Thanks for your suggestion. Sadly it did not avail.

I now have /usr/local/bin at the beginning of the PATH, with the Textmate bundle support binary right at the end, but, presumably because the commands that are giving me trouble specify ruby18, I still can’t get them to run.

I’m just hoping there is some magic that will persuade MacOS to trust the embedded Ruby 18, but so far all it offers to do is move it to the bin (as the trash is now called in UK English after all these years).


> On 25 Nov 2019, at 18:54, Matt Neuburg <[hidden email]> wrote:
>
> Insert Color works fine for me. I find that the order in which your PATH is defined is crucial. My order is my `.rbenv` ruby followed immediately by the default $PATH followed by everything else. If the default $PATH is listed in the wrong spot, I get issues similar to what you've described. However, I'm still back at 2.0-rc.10, for reasons I've already explained, so that might matter too. m.
>
> --
> matt neuburg, phd = http://www.apeth.net/matt/
> pantes anthropoi tou eidenai oregontai phusei
> Programming iOS 13! http://shop.oreilly.com/product/0636920310075.do
> iOS 13 Fundamentals! http://shop.oreilly.com/product/0636920310068.do
> RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
>
>> On Nov 26, 2019, at 4:23 AM, Nigel Chapman <[hidden email]> wrote:
>>
>> I have encountered a problem running bundle commands that are implemented as ruby scripts with a shebang line
>>
>> #!/usr/bin/env ruby18
>>
>> I get an alert like this:
>>
>> <Screenshot 2019-11-25 at 15.19.12.png>
>>
>>
>> Here I was trying to use Insert Color… from the CSS bundle, but the same thing happens with other commands, including from bundles I made myself.
>>
>> I am pretty sure that this only started when I upgraded to Catalina. (Presently on 10.15.1, TM 2.0.3. It doesn’t happen with 2.0.3 running on another machine with High Sierra.) Possibly this is related to the problem of loading plug-ins that was fixed in 2.0.1.
>>
>> If I change the shebang to point to the version of ruby I installed with Homebrew commands work fine, but I don’t much want to edit every command in every bundle.
>>
>> Has anybody else seen this? Do you know of any workrounds?
>>
>>
>>
>> _______________________________________________
>> TextMate mailing list
>> [hidden email]
>> https://lists.macromates.com/listinfo/textmate
>
>
> _______________________________________________
> TextMate mailing list
> [hidden email]
> https://lists.macromates.com/listinfo/textmate


_______________________________________________
TextMate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: Problem running ruby commands

Nigel Chapman-2
> I’m just hoping there is some magic that will persuade MacOS to trust the embedded Ruby 18, but so far all it offers to do is move it to the bin (as the trash is now called in UK English after all these years).

OK, I fixed it by navigating to /Library/Application Support/TextMate/Ruby/1.8.7/bin in the Finder, clicking on the ruby executable, and then telling the system it was OK to open it, like you do with an unsigned app. A bit crummy, but it seems to have worked.

I expect disabling Gatekeeper would have worked too, but I don’t like to do that.

I don’t know why this happened – it may just be my setup and its history – but I’m posting this in case anyone else has the same problem.


_______________________________________________
TextMate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: Problem running ruby commands

feek
I just updated to Catalina today...

is this message also related to not bundled Ruby in Catalina :( ?

https://feek.d.pr/Y1mSwd/3q2OYQOmNo

== Feek



--
Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html

_______________________________________________
TextMate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: Problem running ruby commands

Allan Odgaard-4
In reply to this post by Nigel Chapman-2

On 28 Nov 2019, at 1:13, Nigel Chapman wrote:

OK, I fixed it by navigating to /Library/Application Support/TextMate/Ruby/1.8.7/bin in the Finder, clicking on the ruby executable, and then telling the system it was OK to open it, like you do with an unsigned app. A bit crummy, but it seems to have worked.

I expect disabling Gatekeeper would have worked too, but I don’t like to do that.

I don’t know why this happened – it may just be my setup and its history – but I’m posting this in case anyone else has the same problem.

I think it may have been because you moved the file from an old machine to a new one and somehow it got quarantined in the process and thus needed to be manually OK’ed.



_______________________________________________
TextMate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: Problem running ruby commands

Allan Odgaard-4
In reply to this post by feek

On 2 Dec 2019, at 3:10, feek wrote:

is this message also related to not bundled Ruby in Catalina :( ?

https://feek.d.pr/Y1mSwd/3q2OYQOmNo

That seems to be about missing gem files unrelated to requirements of any of the bundles I am using.

Is this when you ⌘R a ruby script in TextMate? If so, I would guess it is your ruby script that require these gems.



_______________________________________________
TextMate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate