<lizzin>
fwiw, same issue after `sudo gem update cocoa pods`
roshanavand has joined #ruby
<liquid-silence>
hmmmf
<liquid-silence>
can you do which pod?
donofrio has joined #ruby
<liquid-silence>
maybe you have rbenv or rvm installed as well
reset has quit [Ping timeout: 245 seconds]
<lizzin>
does not look like it. which said not found for both
<liquid-silence>
which pod?
<lizzin>
I want `pod` to point to the right version. `pod --version` shows '1.9.3'. but I did a `sudo gem install cocoapods` and it said it installed version '1.11.2' successfully
<lizzin>
`gem environment` looks up to date
<adam12>
lizzin: `which ruby`?
<lizzin>
/usr/local/opt/ruby/bin/ruby
<adam12>
`which pod`?
<lizzin>
/usr/local/bin/pod
<adam12>
lizzin: Shot in the dark, but what does `/usr/local/opt/ruby/bin/ruby -S pod --version` show
<adam12>
I don't remember if -S will work here.
<lizzin>
1.11.2
<adam12>
It sounds like a path problem.
<adam12>
inside `gem environment`, there's `EXECUTABLE DIRECTORY`. If that's not in your `$PATH` or if it's in your path but after `/usr/local/bin`, you're probablly running into this issue.
<adam12>
How did you install Ruby?
<adam12>
This is OSX?
<lizzin>
I think I used brew to install ruby.
<lizzin>
Yes, OSX. So I was trying to update from the system version
<adam12>
It's a challenge because both OSX and Brew use Ruby. OSX is not going to ship it in the future (they are pruning a lot of dev tools) and Brew has been shipping it's own.
<adam12>
So I say it's challenging because, which ruby is receiving your `gem install` and which path is it using?
<lizzin>
the `EXECUTABLE DIRECTORY` is not in my path.
<adam12>
If you want it a bit easier to rationalize about, my suggestion is to install a ruby version manager, and then install a Ruby through that. And not use `sudo` for `gem install`, ever.
<lizzin>
think I should just uninstall ruby via brew and start over with a ruby version manager?
<adam12>
lizzin: Yes.
<lizzin>
ok
<adam12>
lizzin: I've been using `frum` and it works reasonably well. Install through Brew.
<lizzin>
ok, ill give that a try
<adam12>
lizzin: It's basically `brew install fum`, then update your profile script to add `frum init`, re-open terminal, `frum install`, and then `gem install cocoapods`.
<adam12>
lizzin: If that still gives you the wrong version, `sudo uninstall cocoapods` to remove the system version which might have higher precedence.
<lizzin>
ok, I'm going to give this a try
jmcgnh has quit [Ping timeout: 260 seconds]
jmcgnh has joined #ruby
lizzin has quit [Quit: Client closed]
lizzin has joined #ruby
taupiqueur has quit [Ping timeout: 252 seconds]
roshanavand has quit [Ping timeout: 268 seconds]
roshanavand has joined #ruby
roshanavand has quit [Ping timeout: 245 seconds]
roshanavand has joined #ruby
jpw has joined #ruby
<nakilon>
there should be a bot
<nakilon>
IRC bot
<nakilon>
that says "don't sudo gem install"
<liquid-silence>
nakilon agreed
<nakilon>
like a static code analyzer applied to the chat
niv has quit [Read error: Connection reset by peer]
cybniv has joined #ruby
roshanavand has quit [Remote host closed the connection]
lizzin has quit [Quit: Ping timeout (120 seconds)]
lizzin has joined #ruby
<lizzin>
adam12 Would you please copy&paste your from instructions? My irc client died and I lost them. So far, I've unstalled ruby via brew, did a `brew install from`, added `eval "$(frum init)"` to my ~/.zshrc. What rest?
<adam12>
lizzin: `frum install` (might need to provide a version, in that case `frum install 2.7.3`. And then `gem install cocoapods`
<lizzin>
why 2.7.3 and not 3.0.2?
FemmeAndroid has joined #ruby
donofrio has joined #ruby
<adam12>
lizzin: Ideally you'd use 3.0.2, but I was opting for the path of least resistance for you at this point. If you feel comfortable using 3.0.2, then it's definitely recommended.
Bounga has quit [Ping timeout: 252 seconds]
<adam12>
3.0.2 had some changes around keyword argument semantics that won't be an issue in 2.7.2. I'm not familiar with cocoapods to know if it's going to be an issue.
<adam12>
The beauty of using a version manager for Ruby is you can try both.
<lizzin>
ok, cool
<lizzin>
I see there is also a 2.7.4
<lizzin>
Should be ok?
<adam12>
lizzin: Yep. I forgot about 2.7.4 :P
<lizzin>
:thumbs
havenwood9 has joined #ruby
<nakilon>
weird that just weeks ago truffleruby was working as intended -- after ~6 seconds reached the usual speed of ruby and then ran forward accelerating
<lizzin>
adam12 `frum install 2.7.4` failed with 'Can't build Ruby: configure failed: configure: error: something wrong with LDFLAGS="-L/usr/local/opt/ruby/lib"'
dstein64 has quit [Ping timeout: 264 seconds]
<nakilon>
but now on another program of mine it's not only not accelerating but is just several times slower than usual ruby
_aeris_ has joined #ruby
kenichi_ has joined #ruby
miah has quit [Ping timeout: 246 seconds]
kenichi has quit [Ping timeout: 250 seconds]
kenichi_ is now known as kenichi
<nakilon>
the first was my esolang interpreter, the second now is s program finding the shortest path in a graph
<adam12>
lizzin: Doh :( That's an unfortunate error. Hmm.
havenwood has quit [Ping timeout: 265 seconds]
havenwood9 is now known as havenwood
<nakilon>
also my lineprofiler does not work on it, throws some exception (
aeris has quit [Ping timeout: 276 seconds]
_aeris_ is now known as aeris
<adam12>
lizzin: what about `env LDFLAGS= frum install 2.7.4`
wmoxam has quit [Ping timeout: 265 seconds]
dstein64 has joined #ruby
<adam12>
lizzin: Actually. Can you paste `env` somewhere? Make sure to redact anything sensitive.
wmoxam has joined #ruby
miah has joined #ruby
lizzin has quit [Quit: Ping timeout (120 seconds)]
<lizzin>
is there a 'start from scratch' option? short of a complete os reinstall
<adam12>
lizzin: Docker :P
hololeap has quit [Remote host closed the connection]
<adam12>
lizzin: Whats the output of `sw_vers -productVersion`
<lizzin>
11.6
hololeap has joined #ruby
<adam12>
lizzin: No idea right now. And I have a meeting shortly. But if you get a chance, paste `brew info openssl@1.1` and `brew info openssl@3`. I doubt its' that but it doesn't hurt for me to see I guess.
<adam12>
lizzin: I'm out of ideas other than that, tbh.
<adam12>
bbl.
<lizzin>
ill give that a try
<lizzin>
hope the meeting goes well
<adam12>
lizzin: cheers :)
<adam12>
Oh interesting. I run into the same error locally, fyi
<adam12>
I'll poke at it later myself. I'm running 3.0.?? with frum (and everything else through Docker).
<adam12>
I wonder if this has anything to do with opensslv3..
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
<newton>
any thoughts on how/if I can detect chruby is active in a shell running a ruby script?
ur5us has joined #ruby
<newton>
I thought doing something like system('command -v chruby') might work but in IRB it doesn't. the shell also has $CHRUBY_VERSION but doesn't show up in env
<weaksauce>
are you enabling chruby in the right startup file?
<newton>
yeah chruby setup is all good
<weaksauce>
what's the problem you are actually trying to solve by knowing that?
<newton>
I simply want a ruby script to be able to detect if chruby is active in the context the script is run in
<newton>
http://ix.io/3ByS -- maybe system isn't the right direction?
<adam12>
`command` might work, but it might need an interactive shell. system(ENV["SHELL"], "-i", "-c", "command", "-v", "chruby") or something
<adam12>
Interactive shell caveats asside.
<adam12>
or rather, "command -v chruby" being the last argument past "-c"
<adam12>
Could even try leaving `-i` off. That's going to be dependent on how you load chruby, because some init scripts (Ubuntu?) default to exiting early if non-interactive.
dayday has quit [Quit: Connection closed for inactivity]
flooose has quit [Ping timeout: 265 seconds]
<newton>
system(ENV["SHELL"], "-i", "-c", "command -v chruby") works
<newton>
thanks adam12
jpw has quit [Remote host closed the connection]
<weaksauce>
kinda weird that the environment variable is not set
ur5us has quit [Ping timeout: 245 seconds]
<weaksauce>
newton you could export chruby_version and then it would show up
<newton>
đź‘Ť good to know. in this case I want it to "just work" w/ the default chruby setup (which doesn't export the variable, I guess). command -v chruby works here
<weaksauce>
i wonder if there is a downside to exporting that?
lizzin has quit [Quit: Ping timeout (120 seconds)]
<havenwood>
nakilon: Synthetic or natural? Heat treated?
<havenwood>
It's massive.
<havenwood>
Lovely color.
<havenwood>
Wait, wrong #ruby channel!
<nakilon>
havenwood no info about heat treatment, from Tansania
<nakilon>
hehe
<nakilon>
anyway, $2'200'000
<nakilon>
more valuable than all the ruby code I've seen
<nakilon>
btw, a month ago or more there was a talk about tty-prompt and some lib by shopify
<nakilon>
I've already used the tty-prompt in my gem so I didn't rewrite it to use the shopify's one, but I'm thinking about it; and to properly replace something huge you have to have tests; and the tty-prompt does not seem to provide testing, so now I think
<nakilon>
is there anything for terminal like Selenium for browsers? so it would hide all the tty implementation details and provide some high level interface to read the state of the terminal screen?
<havenwood>
What kinda state are you looking to get at? More than width/height I assume?
<nakilon>
something like obtaining the array of currently shown characters
<nakilon>
to see that those fancy List selection and other components show what I need
<nakilon>
and should provide a way to send the keyboard events of course
<nakilon>
I imagine that it would be partially similar, i.e. include the part that is implemented in those "screen recorders" that are unfortunately don't really work -- when I tried all of them were throwing errors, so it's not adding much hope
<nakilon>
also I have a hypothesis that macOS might provide some AppleScript interface that would be not cross-platform but cross-platformity is a responsibility of those two libs, not mine
<nakilon>
and might not be able to run in Github Actions