yassernasc has quit [Remote host closed the connection]
CoolerX has joined #ruby
<CoolerX>
Hi
<CoolerX>
LoadError: libffi.so.8: cannot open shared object file: No such file or directory - /home/user/code/remote/github.com/konveyor/move2kube-website/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/lib/ffi_c.so
<CoolerX>
I am getting a load error
<CoolerX>
This is with ruby 2.7.5 and Bundler version 2.1.4 (2022-01-25 commit unknown)
<CoolerX>
trying to do bundle exec jekyll serve
<CoolerX>
The files does actually exist
<CoolerX>
$ ls vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/lib/ffi_c.so
<ox1eef>
CoolerX: did you check it is not a permission issue
<ox1eef>
gem pristine ffi might help i guess.
fredlinhares has quit [Quit: WeeChat 3.4]
erb has quit [Quit: sQuit]
BSaboia_ has joined #ruby
ur5us has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
gr33n7007h has quit [Ping timeout: 250 seconds]
gr33n7007h has joined #ruby
fredlinhares has joined #ruby
ZAJDAN has quit [Ping timeout: 250 seconds]
justache is now known as justGhost
fredlinhares has quit [Quit: WeeChat 3.4]
BSaboia_ has quit [Quit: This computer has gone to sleep]
gr33n7007h has quit [Ping timeout: 240 seconds]
BSaboia_ has joined #ruby
gr33n7007h has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.4]
perrierjouet has joined #ruby
gr33n7007h has quit [Ping timeout: 268 seconds]
gr33n7007h has joined #ruby
gr33n7007h has quit [Ping timeout: 240 seconds]
gr33n7007h has joined #ruby
BSaboia_ has quit [Quit: This computer has gone to sleep]
gr33n7007h has quit [Ping timeout: 250 seconds]
gr33n7007h has joined #ruby
gr33n7007h has quit [Ping timeout: 256 seconds]
gr33n7007h has joined #ruby
polishdub has joined #ruby
<CoolerX>
ox1eef, I got it to work by installing some package
<CoolerX>
oh sorry, I got it to work by installing bundler version 2.1.4
<CoolerX>
and then had to also install build-essentials package to get g++ compiler
<CoolerX>
and then it worked
<CoolerX>
Thanks
CoolerX has left #ruby [Leaving]
pmwals09 has joined #ruby
fowl has joined #ruby
hd1 has joined #ruby
hd1 has left #ruby [#ruby]
pmwals09 has quit [Quit: Leaving...]
postmodern has quit [Remote host closed the connection]
Sheilong has quit [Quit: Connection closed for inactivity]
fowl has quit [Quit: Client closed]
fowl has joined #ruby
pmwals09 has joined #ruby
pmwals09 has quit [Remote host closed the connection]
BSaboia_ has joined #ruby
BSaboia_ has quit [Ping timeout: 240 seconds]
polishdub has quit [Quit: leaving]
Rounin has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
bluedust has joined #ruby
<leftylink>
eh... I accidentally hade a `case` have two `else`s. that was weird
<leftylink>
it was a syntax error
gr33n7007h has quit [Ping timeout: 256 seconds]
gr33n7007h has joined #ruby
gr33n7007h has quit [Read error: Connection reset by peer]
gr33n7007h has joined #ruby
bluedust_ has joined #ruby
bluedust has quit [Ping timeout: 240 seconds]
gr33n7007h has quit [Ping timeout: 268 seconds]
gr33n7007h has joined #ruby
_ht has joined #ruby
teclator has joined #ruby
ZAJDAN has joined #ruby
analogsalad has joined #ruby
analogsalad has quit [Remote host closed the connection]
analogsalad has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
Goodbye_Vincent has quit [Quit: Ping timeout (120 seconds)]
Goodbye_Vincent has joined #ruby
cyj123 has quit [Ping timeout: 250 seconds]
keyvan has quit [Ping timeout: 250 seconds]
keyvan has joined #ruby
cyj123 has joined #ruby
Tomte has joined #ruby
Guest9014 has joined #ruby
oxfuxxx has joined #ruby
ur5us has joined #ruby
oxfuxxx has quit [Ping timeout: 256 seconds]
gr33n7007h has quit [Ping timeout: 240 seconds]
gr33n7007h has joined #ruby
oxfuxxx has joined #ruby
Tomte has quit [Ping timeout: 250 seconds]
emcb5 has joined #ruby
emcb5 has quit [Read error: Connection reset by peer]
emcb5 has joined #ruby
emcb5 has quit [Read error: Connection reset by peer]
emcb5 has joined #ruby
emcb5 has quit [Read error: Connection reset by peer]
emcb5 has joined #ruby
emcb5 has quit [Read error: Connection reset by peer]
emcb5 has joined #ruby
emcb5 has quit [Read error: Connection reset by peer]
oxfuxxx has quit [Ping timeout: 240 seconds]
oxfuxxx has joined #ruby
bluedust_ has quit [Remote host closed the connection]
oxfuxxx has quit [Ping timeout: 240 seconds]
bluedust has joined #ruby
oxfuxxx has joined #ruby
bluedust has quit [Remote host closed the connection]
gr33n7007h has quit [Ping timeout: 250 seconds]
gr33n7007h has joined #ruby
yassernasc has joined #ruby
gr33n7007h has quit [Ping timeout: 256 seconds]
gr33n7007h has joined #ruby
oxfuxxx has quit [Ping timeout: 256 seconds]
SteveR has joined #ruby
analogsalad has quit [Remote host closed the connection]
analogsalad has joined #ruby
bluedust has joined #ruby
lunarkitty has joined #ruby
szkl has joined #ruby
bluedust_ has joined #ruby
bluedust has quit [Ping timeout: 268 seconds]
Jonopoly has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
bluedust_ has quit [Remote host closed the connection]
SteveR has quit [Quit: Client closed]
<leah2>
good
<leah2>
> case "foo"; else :foo; when "bar"; bar; end
<leah2>
hm, in which language did that work
<IsoLinCHiP>
So, I have rbenv setup and working. I just ran `gem install bundler -v '< 2.0, >=1.3.0' (dont judge, need to fix an old rails app), it installed version 1.17.3 . But running `bundle _1.17.3_ --version` yields Version 2.0.2 (the other version thats installed on the machine).
<IsoLinCHiP>
If I specify a bogus version in the __ it complains it doesnt find it, so the version loading apears to be working.
<jhass[m]>
if you `which bundle`, where does it go?
<IsoLinCHiP>
to the rbenv shim
<jhass[m]>
mmh, weird. Does it actually crap out when trying to use it for the app?
<IsoLinCHiP>
Honestly, I hadnt tried yet, because verion said it would be incompatible, but worth a short, indeed ;)
gr33n7007h has quit [Ping timeout: 240 seconds]
<IsoLinCHiP>
Yeah, sadly it still says its the wrong bundler version when running install
<jhass[m]>
the 2.0 changes aren't all that breaking, mostly in the lockfile format. Might be worth a shot to just bundle update --bundler and see where it goes
gr33n7007h has joined #ruby
yassernasc has quit [Remote host closed the connection]
Tomte has joined #ruby
gr33n7007h has quit [Ping timeout: 268 seconds]
hololeap has quit [Remote host closed the connection]
gr33n7007h has joined #ruby
hololeap has joined #ruby
Guest9014 has quit [Ping timeout: 240 seconds]
Sheilong has joined #ruby
Jonopoly has quit [Quit: WeeChat 3.0]
bluedust has joined #ruby
<IsoLinCHiP>
No thats the problem, rails 4.2 insists on bundler < 2.0 -.-
fredlinhares has joined #ruby
lunarkitty has quit [Quit: Connection closed for inactivity]
random-jellyfish has joined #ruby
BSaboia_ has joined #ruby
BSaboia_ has quit [Read error: Connection reset by peer]
gproto23 has joined #ruby
bluedust has quit [Remote host closed the connection]
bluedust has joined #ruby
random-jellyfish has quit [Ping timeout: 256 seconds]
Tomte has quit [Ping timeout: 250 seconds]
ZAJDAN has quit [Read error: Connection reset by peer]
BSaboia_ has joined #ruby
duds- has quit [Remote host closed the connection]
bluedust_ has joined #ruby
bluedust has quit [Ping timeout: 240 seconds]
duds- has joined #ruby
random-jellyfish has joined #ruby
BSaboia_ has quit [Quit: Leaving]
gproto23 has quit [Ping timeout: 240 seconds]
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
fef has joined #ruby
BSaboia has joined #ruby
Tomte has joined #ruby
gproto23 has joined #ruby
fredlinhares has quit [Quit: WeeChat 3.4]
gproto23 has quit [Remote host closed the connection]
<adam12>
IsoLinCHiP: Does it mention a BUNDLED WITH? at the bottom?
<IsoLinCHiP>
adam12: yes. Is this the issue?
<adam12>
IsoLinCHiP: What's the version at the bottom?
<IsoLinCHiP>
2.0.2
<adam12>
IsoLinCHiP: Yes. That's making the switch.
szkl has quit [Quit: Connection closed for inactivity]
<IsoLinCHiP>
:facepalm: Thanks... So it was indeed a conceptual misunderstanding on my part
<IsoLinCHiP>
Umn, well, sadly, deleting that didnt make a difference :(
<adam12>
I'm not sure I care for the auto-switching of versions because of this
<adam12>
Don't delete it. Modify it to match the version you want.
<IsoLinCHiP>
Ah, ok. Will do
<adam12>
Normally I'd recommend not editing it, since it's auto generated, but I'm not sure there's a way to downgrade it via the CLI.
oxfuxxx has joined #ruby
<IsoLinCHiP>
Hmm, no luck
<IsoLinCHiP>
Still says the version is 2.0.2
<IsoLinCHiP>
This finally did the trick though: $ RUBYLIB=~/.gem/ruby/2.3.0/gems/bundler-1.17.3/lib/ bundle _1.17.3_ --version
<adam12>
There's something else wrong then.
<adam12>
Does running with `--verbose` hint at anything?
oxfuxxx has quit [Ping timeout: 250 seconds]
<IsoLinCHiP>
Well, Ill be honest, I dont understand how bundler would be able to use an older version without manipulating the loadpath.
<IsoLinCHiP>
since it just does `require bundler` eventually
<IsoLinCHiP>
I traced through RBENVDEBUG output and saw that it eventually resolves the _1.17.3_ paramter to a load to the above path. But then inside that it just does requires bundler without specifying any absolute or relative path. So, the way I understand ruby load mechanism it needs to travers the $LOAD_PATH. Which simply doesnt look like it includes the versioned gem.
<IsoLinCHiP>
So by prepending to LOAD_PATH via the RUBYLIB env it tries resolves to the correct version now aparently
<adam12>
IsoLinCHiP: What's the output of `gem list bundler`
BSaboia has quit [Quit: ZNC 1.8.2+deb2build1 - https://znc.in]
<IsoLinCHiP>
adam12: bundler (2.0.2, 1.17.3)
BSaboia has joined #ruby
<adam12>
IsoLinCHiP: And what's the actual error you get, when not messing with load paths / etc?
<IsoLinCHiP>
Well that its the wrong version of bundler. Im trying to fix an ancient project which still requires rails 4.2, which hard depends on bundler < 2.0
<adam12>
What's the error tho?
<IsoLinCHiP>
Bundler could not find compatible versions for gem "bundler": \n In Gemfile: \n rails (= 4.2.6) was resolved to 4.2.6, which depends on \n bundler (< 2.0, >= 1.3.0)
<adam12>
IsoLinCHiP: What command was that from?
<IsoLinCHiP>
And then tells me that bundler is version 2.0.2
<IsoLinCHiP>
$ bundle _1.17.3_ install
oxfuxxx has joined #ruby
<IsoLinCHiP>
It looks a bit to me like this is an issue with bundler 1.17.3 the current version of bundler is doing its `require 'bundler'` relative to its file location
<IsoLinCHiP>
Oh.. wait. didnt look at the LOAD_PATH each below
samgranieri has quit [Ping timeout: 250 seconds]
<adam12>
So Gemfile.lock has 1.17.3 has the version at the bottom, and `bundle _1.17.3_ install` errors with that error?
<IsoLinCHiP>
Nvm thats just checking for Versions older than 0.9
<IsoLinCHiP>
adam12: Preatty sure it did, yes. After I ran bundle install with manipulated load_path it worked and now a regular run is not producing an error anymore either
oxfuxxx has quit [Ping timeout: 256 seconds]
<adam12>
IsoLinCHiP: If this doesn't work, I'd try installing a newer version of Bundler. The newest supported for your Ruby version (which should be the latest in 2.3). It should auto-switch and if it's not, maybe it's a bug in the 2.0.x lineage of bundler you're using.
<IsoLinCHiP>
Im rather hesitant to try to reproduce the error, since this issue is halting me fixing a critical bug in my app.
<IsoLinCHiP>
Is bundler < 2.0 still being maintained? If not, Id chalk it up to us running antiquated software and not bother with a bug report.
<adam12>
IsoLinCHiP: Not that I know of. Last release was like 2018 or something.
bluedust_ has quit [Remote host closed the connection]
<IsoLinCHiP>
Then Ill settle for the workaround I seem to have found and try to convice my boss yet again, that not maintaining software is NOT worth the 'time saved' ;-)
oxfuxxx has joined #ruby
<IsoLinCHiP>
adam12: Thanks for you patience and help! :-)
<adam12>
IsoLinCHiP: Cheers.
<adam12>
IsoLinCHiP: If you're not using DevContainers, you should look into them. Handy for these ancient apps.
<IsoLinCHiP>
adam12: I would be *very* interested in that, if you happen to have a good article on that. I tryed to brew my own, but it feels like I didnt do a very job at it.
<adam12>
IsoLinCHiP: I dont' have one handy, but to just get started it's as simple as installing the VSCode extension and then adding the config files. I use docker-compose + devcontainer for anything complex (for postgres as a sidecar, for example)
<adam12>
IsoLinCHiP: If you're a Rubytapas subscriber, Avdi had some videos where he did a deep-dive into them.
<adam12>
IsoLinCHiP: But I couldn't go back to any other way. I still install the latest Ruby in my normal shell, but _everything_ else is in a DevContainer.
oxfuxxx has quit [Ping timeout: 240 seconds]
<IsoLinCHiP>
adam12: Sadly not a rubytapas subscriber, looked intersting, but since I have rather limited time for training a subscribtion model didnt feel appealing at this time
SteveR has joined #ruby
<IsoLinCHiP>
Im actually still kinda hooked on vim and tmux. Havent been able to switch to vscode, though I am VERY envious of the nice integrations it has. Just cant part from the convenience of detaching from Tmux and returning to were I left everything ;)
<adam12>
I use vscode + vim bindings. I was hardcore vim + tmux before that
<adam12>
I keep terminals open at bottom of VSCode tho. So similar to tmux.
oxfuxxx has joined #ruby
random-jellyfish has quit [Ping timeout: 256 seconds]
oxfuxxx has quit [Ping timeout: 256 seconds]
random-jellyfish has joined #ruby
<ox1eef>
vscode was a game changer, it could of been atom at one time
<IsoLinCHiP>
Im quite curious if neovim / emacs / something else will be able to match the feature set of vscode, while still keeping the option to run it in tmux
<IsoLinCHiP>
(dreaming of 4k displays with huge terminals that use crazy custom fonts to enable painting grafics and larger fonts so you can still ready the text)
<IsoLinCHiP>
VNC/RDP etc just doesnt feel the same ;-)
<IsoLinCHiP>
Hmm, or maybe some crazy sixel + curses/s-lang crossover that works with tmux
bluedust has joined #ruby
yassernasc has joined #ruby
gr33n7007h has joined #ruby
hanzo has joined #ruby
<ox1eef>
emacs certainly could but it's not wrapped in a package that makes it so easy, it takes some effort
<ox1eef>
vscode has the power of emacs but with the ease of point-and-click configuration.
<Sheilong>
Is there a method that sums all values of a hash whose values are integers?
bluedust has quit [Remote host closed the connection]
<adam12>
Sheilong: #sum with a block, but you'd have to do your own guard for Integer.
<adam12>
Sheilong: { foo: 1, bar: 2, baz: "ba" }.sum { |_, v| v.is_a?(Numeric) ? v : 0 }
<adam12>
I'm sure there are a bunch of other ways.
<Sheilong>
adam12: maybe using each_value?
<adam12>
Sheilong: Wont' work since #sum uses Kernel#Integer()
<gr33n7007h>
Sheilong: yeah, hash.each_valuesum
<ox1eef>
or, hash.values.sum
SteveR has quit [Ping timeout: 256 seconds]
<ox1eef>
adam12: rather than type-checking, I would just call to_i and let whatever is invalid be 0 and not impact the result.
<adam12>
ox1eef: I guess it would depend on the dataset I was fed. I'd rather `Integer(v, raise: false)` possibly, but these kinds of decisions are generally where the most bugs lie :P
<adam12>
s/raise/exception: false/
<adam12>
If the dataset has mixed types, perhaps that's a sign that there's something wrong elsewhere. Confident Ruby style.
<ox1eef>
indeed, context is key - generally to_i is best for integers or nil.
<adam12>
I'd just be worried about something casting that should. "14 Foobars".to_i
<adam12>
This will lose precision if you had a Float passed in when you weren't expecting it. I'd almost rather just pick out the non-natural values. I did it inside the same block to save another iteration through the collection, but there's no reason it couldn't be separate.
<ox1eef>
the code you wrote was exactly what i thought of while AFK. :) it's a nice trick for the majority of cases.