<depesz>
hi. i have a situation where I have some gems installed, let's say gem "a" in version 1. there is Gemfile that wants to install gem "b", and gem b in its dependencies has "a". - bunler install installs newest version of "a", and then "b". how can I make bundler *not* update "a", just install b on its own ?
rvalue has joined #ruby
wyclif has joined #ruby
foxxx0 has joined #ruby
donofrio has joined #ruby
wyclif has quit [Ping timeout: 268 seconds]
rvalue has quit [Ping timeout: 268 seconds]
rvalue has joined #ruby
Linux_Kerio has quit [Ping timeout: 245 seconds]
wyclif has joined #ruby
pascal_blaze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wyclif has quit [Ping timeout: 260 seconds]
wyclif has joined #ruby
wyclif has quit [Ping timeout: 256 seconds]
ken_barber has joined #ruby
wyclif has joined #ruby
wyclif has quit [Ping timeout: 245 seconds]
<mooff>
depesz: bundle install --conservative
<depesz>
bundle install --helpo doesn't show conservative option
wyclif has joined #ruby
wyclif has quit [Ping timeout: 255 seconds]
srbaker has joined #ruby
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Read error: Connection reset by peer]
donofrio__ has joined #ruby
donofrio__ has quit [Client Quit]
donofrio has quit [Ping timeout: 268 seconds]
hightower2 has joined #ruby
donofrio has joined #ruby
donofrio has quit [Remote host closed the connection]
<havenwood>
depesz: --conservative is a `bundle update` flag
<depesz>
will that install new/missing gems?
<depesz>
I am *VERY* not ruby developer, just need to fix this one thing.
<havenwood>
depesz: It will install missing dependencies and update direct dependencies but not indirect dependencies of those dependencies.
<depesz>
i'm not sure I understand.
<depesz>
anyway, will just use direct gem install --conservative, seems easier/simpler for me.
<havenwood>
depesz: If you just want to install dependencies already in your Gemfile.lock, just `bundle install`.
<havenwood>
depesz: Are you running `bundle` and hitting an error?
<depesz>
i don't have gemfile.lock
<depesz>
i'm running bundle install, and it is upgrading gem that is not listed in gemfile.
<havenwood>
What is the result when you `bundle` then? An error related to what you describe above?
<havenwood>
Can you share the Gemfile and error? Or private?
<depesz>
there is no error.
<depesz>
as i said: the problem is that it upgrades package.
<havenwood>
depesz: Why is that a problem?
<depesz>
because it breaks the software that uses this gem.
<havenwood>
You can constrain the version if you'd like.
<depesz>
i know. but it won't work for my case.
<havenwood>
depesz: In your Gemfile, specify the maximum version.
<havenwood>
depesz: What happens if you specify the maximum version this gem can be?
<depesz>
that's why i VERY specifically asked, is there a way to make bundle keep out from gems that do not need upgrade.
<havenwood>
depesz: Once you've installed dependencies, yes.
<depesz>
i don't know what is the maximum version.
<havenwood>
You can't not resolve dependencies.
<depesz>
really. sorry, please drop it. i already moved past tryingto use bundle, as it didn't work for me.
<havenwood>
Once you have dependencies that work, you can use --conservative and --strict, etc.
depesz has left #ruby [WeeChat 4.2.2]
<havenwood>
Well, they left, but just specifying the known version that works in the Gemfile should do the trick.
<havenwood>
¯\_(ツ)_/¯
wyclif has joined #ruby
wyclif has quit [Ping timeout: 260 seconds]
<caleb>
There's nothing in the docs, so I doubt this is something supported, but I'm using the bedrock branch of SQLite3 which has WAL2 and BEGIN CONCURRENT for multiple readers and writers. Is there a hook or option I can pass to jeremy's Sequel to use `BEGIN CONCURRENT` for transactions?
donofrio has joined #ruby
wyclif has joined #ruby
donofrio has quit [Remote host closed the connection]
wyclif has quit [Ping timeout: 245 seconds]
<havenwood>
caleb: I wonder if the extralite gem Sequel extension would help get there? I've checked it out but not used it yet in earnest. https://github.com/digital-fabric/extralite
wyclif has joined #ruby
<caleb>
thanks havenwood, that's a good starting point. I think I'll need to patch it to use WAL2 instead of WAL, and use BEGIN CONCURRENT
<caleb>
but that does solve much of the heavy lifting for me
<adam12>
wrt bundle discussion, there's a library that will look at a point in time and give you the dependencies from that time. Good for scenarios where you don't have the lockfile and there are no constraints in the Gemfile. https://github.com/flavorjones/bundler-as_of
<adam12>
sqlite3 just saw new major release. does that include WAL2 I wonder?
<adam12>
sqlite3 gem, rather.
<weaksauce>
that's a pretty neat gem but the problem would have been easy to fix like havenwood said... just pin the dependency at a certain version... that's what bundler is for in the first place
<adam12>
I presumed they didn't know?
<adam12>
ie. a Gemfile with just the gems listed and no corresponding lockfile. If it's from a few years ago, could you figure out the correct version you needed easily? ... I'm not sure.
xdminsy has quit [Read error: Connection reset by peer]
xdminsy has joined #ruby
hwpplayer1 has joined #ruby
mahlon has joined #ruby
<weaksauce>
could be yeah they were fairly rude though
<caleb>
I doubt they would anyway, it's not in the normal sqlite releases either
<adam12>
I didn't realize it was bedrock specific.
<caleb>
you have to specifically compile a branch with WAL2 support such as the wal2 branch or bedrock
pascal_blaze has joined #ruby
TomyWork has quit [Remote host closed the connection]
<caleb>
tie this all together with some forking and IPC, and maybe one day when `can not access non-shareable objects` isn't a problem, ractors, and you'll get some amazing sqlite throughput
rvalue- has joined #ruby
ken_barber has quit [Quit: Client closed]
rvalue has quit [Ping timeout: 256 seconds]
gaussianblue has joined #ruby
rvalue- is now known as rvalue
sagax has joined #ruby
konsolebox has quit [Quit: .]
<zayd>
Currently having regex issues with trying to read the numbers from the line MemFree in /proc/meminfo. The line that's causing the problem is: `File.read('/proc/meminfo').match(/[0-9].*(?!MemFree:.*)/i)[0]`. It keeps returning the numbers after MemTotal instead of returning the numbers after MemFree.
<weaksauce>
zayd can you paste a few lines from that file?
sal192 has quit [Quit: leaving]
<zayd>
weaksauce: it should be standard on most linux systems, here's mine: https://dpaste.org/C5NwH
<wnd>
I'm not familiar with negative lookahead, but based on how it sounds, I think you're picking the numbers that appear before "MemFree". How about "(/MemFree:\s*(\d+)/)[1]"?
<zayd>
i got it somewhat working with `File.read('/proc/meminfo').match(/(?<=MemFree):.*/i)[0]`, but it leaves in the leading spaces
<weaksauce>
yeah a positive lookahead would work better
<zayd>
wnd: that works, now i just have to append the kB part to it, thanks
<adam12>
Optional if you want to anchor it. File.read("meminfo")[/^MemFree:\s*(\d+)/, 1]
<adam12>
Could do something like this too, if it's always in `kb` and you need more than 1 value from it. File.read("meminfo").scan(/^(\w+):\s*(\d+)/).to_h.fetch("MemFree")