sarink has quit [Remote host closed the connection]
impermanence has joined #ruby
sarink has joined #ruby
<impermanence>
I have a cli I use that is based on a ruby api. When I call it from my command line...no issues. When I call it from a simple bash script I get fixnum is deprecated warnings.
<impermanence>
I really don't want to update any of the gems on this box because it'll probably break everything.
<impermanence>
Is there any way I can simply suppress these warnings?
<uplime>
how are you calling it in a bash script, and how is the bash script being executed?
<impermanence>
calling it in script identically as I am on the command line; script is being executed manually right now by me from command line
<impermanence>
I get that the script is a new process...
<impermanence>
my current shell is bash; shell that script executes in is bash
sarink has quit [Ping timeout: 258 seconds]
<impermanence>
even when I literally just take the actual cli command and plop it in a file and bash $that_file I get this fixnum warning
<impermanence>
but when I simply run that cli command from my command line...all good in terms of STDOUT
<impermanence>
it's making it a PITA for me to have to parse the fixnum warnings
etupat has quit [Remote host closed the connection]
cthulchu has quit [Read error: Connection reset by peer]
cthulchu has joined #ruby
cthulchu has quit [Read error: Connection reset by peer]
ccooke has joined #ruby
cthulchu has joined #ruby
cthulchu_ has quit [Ping timeout: 248 seconds]
phaul_ has joined #ruby
dionysus69 has quit [Ping timeout: 258 seconds]
lineus has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
lineus has joined #ruby
dionysus69 has quit [Client Quit]
dionysus69 has joined #ruby
Benett has joined #ruby
Benett has quit [Quit: ]
Benett has joined #ruby
william1 has quit [Ping timeout: 248 seconds]
wallace_mu has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
Benett has quit [Ping timeout: 264 seconds]
dionysus69 has joined #ruby
yann-kaelig has quit [Quit: yann-kaelig]
AJA4350 has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
phaul_ has quit [Ping timeout: 268 seconds]
DaRock has quit [Remote host closed the connection]
DaRock has joined #ruby
william1 has joined #ruby
donofrio has joined #ruby
donofrio has quit [Remote host closed the connection]
johnny56 has joined #ruby
donofrio has joined #ruby
phaul_ has joined #ruby
lacrymology has quit [Ping timeout: 268 seconds]
houhoulis has quit [Remote host closed the connection]
lucasb has joined #ruby
shokohsc has quit [Remote host closed the connection]
william1 has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
cthulchu_ has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
phaul_ has quit [Ping timeout: 258 seconds]
cthulchu has quit [Ping timeout: 248 seconds]
mozzarella has quit [Quit: WeeChat 2.4]
cthulchu_ has quit [Read error: Connection reset by peer]
cthulchu_ has joined #ruby
DaRock has quit [Remote host closed the connection]
skx86 has joined #ruby
DaRock has joined #ruby
wymillerlinux has quit [Remote host closed the connection]
drincruz has joined #ruby
Benett has joined #ruby
drincruz_ has quit [Read error: Connection reset by peer]
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
lacrymology has joined #ruby
drincruz has quit [Ping timeout: 248 seconds]
chalkmonster has quit [Quit: WeeChat 2.7]
schne1der has quit [Ping timeout: 268 seconds]
cthulchu has joined #ruby
<cjohnson>
uplime: When you want to turn arbitrary strings into totally unrelated values, the way you have it is right
cthulchu_ has quit [Ping timeout: 248 seconds]
cthulchu has quit [Read error: Connection reset by peer]
cthulchu has joined #ruby
dionysus69 has quit [Quit: dionysus69]
dionysus69 has joined #ruby
akemrir has joined #ruby
cxl has quit [Changing host]
cxl has joined #ruby
MrCrackPotBob has quit [Read error: Connection reset by peer]
impermanence has joined #ruby
Tikku has joined #ruby
cnomad has joined #ruby
<impermanence>
say I have some box and it's got a bunch of gems on it and this is a fairly important box with a ton of ruby shit on it that no one understands; I know for sure that one of these gems is out of date and is throwing a ton of FIXNUM deprecation warnings (this is not a rails box) and this is super annoying; so anyway I "feel" like if I update the gem
<impermanence>
that's throwing all these FIXNUM warnings it may solve this spam, but I'm also scared shitless that if I updated this gem it'll break a bunch of stuff; any advice?
Inline has joined #ruby
MrCrackPot has joined #ruby
william1 has joined #ruby
MrCrackPot has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 268 seconds]
MrCrackPot has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4350 has joined #ruby
mozzarella has joined #ruby
Tikku has quit [Quit: Leaving]
Tikku has joined #ruby
phaul_ has joined #ruby
MrCrackPot has quit [Ping timeout: 240 seconds]
Tikku_ has joined #ruby
Tikku has quit [Client Quit]
Tikku_ has quit [Client Quit]
Tikku has joined #ruby
drincruz has joined #ruby
phaul_ has quit [Ping timeout: 258 seconds]
MrCrackPot has joined #ruby
TCZ has quit [Quit: Bye Bye]
Tikku has quit [Client Quit]
Tikku has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
vrih_ has joined #ruby
vrih has quit [Ping timeout: 245 seconds]
mikecmpbll has joined #ruby
Tikku has quit [Client Quit]
Tikku has joined #ruby
Tikku has quit [Client Quit]
lacrymology has quit [Ping timeout: 240 seconds]
<ljarvis>
impermanence: install both versions and use the Kernel "gem" method (added by rubygems) to fix the version number
<ljarvis>
so you want `gem "name", "version"` followed by `require "gem"` and it'll load the version you specified, this will ensure the important version is still used where you need it to be (I guess you're not using bundler)
lacrymology has joined #ruby
schne1der has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
drincruz_ has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
Esa_ has joined #ruby
infinityfye has quit [Quit: Leaving]
<NL3limin4t0r>
impermanence: You could setup a development box with the same Ruby version and gem versions. Then try to upgrade that, run your tests and see if anything breaks.
<impermanence>
this box is a monolithic beast with massive DBs attached; it's a real monster (yes: that is not good) so I don't have any motivation to do that
<impermanence>
I'm just going to live with the warnings for now until I have time to switch to a different product
sarink has joined #ruby
chalkmonster has joined #ruby
<NL3limin4t0r>
Database dumps are not that hard to do, even for large databases, although it can take a while if the database is large.
<NL3limin4t0r>
That's the best I can come up with for now. If all traffic to/from the production box can be halted for a while you can make a snapshot of your box, then directly try to upgrade production. If something goes wrong, restore the snapshot. But I wouldn't reccomend that approach.
mr-kumar has quit [Ping timeout: 258 seconds]
cats has quit [Ping timeout: 252 seconds]
DaRock has quit [Ping timeout: 268 seconds]
fphilipe_ has quit [Ping timeout: 258 seconds]
jcalla has quit [Ping timeout: 246 seconds]
william1 has quit [Ping timeout: 258 seconds]
ellcs has quit [Remote host closed the connection]
chalkmonster has quit [Quit: WeeChat 2.7]
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
Fusl has quit [Max SendQ exceeded]
Fusl has joined #ruby
jcalla has joined #ruby
wallace_mu has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
davidw has joined #ruby
davidw has quit [Changing host]
davidw has joined #ruby
dionysus69 has joined #ruby
teclator has quit [Ping timeout: 246 seconds]
duderonomy has quit [Ping timeout: 268 seconds]
chalkmonster has joined #ruby
akemhp has joined #ruby
orbyt_ has joined #ruby
akemhp has quit [Excess Flood]
akemhp has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
teclator has joined #ruby
fphilipe_ has joined #ruby
wallace_mu has joined #ruby
sarink has quit [Remote host closed the connection]
fphilipe_ has quit [Ping timeout: 246 seconds]
unreal has quit [Read error: Connection reset by peer]
cthulchu has quit [Ping timeout: 248 seconds]
Axy has quit [Read error: Connection reset by peer]
<havenwood>
impermanence: haha, I just scanned what you wrote and saw "rails" but didn't realize it was inverted. are you sure you're using ruby 2.0? :O
<impermanence>
gem list | grep rails; echo $? --> 1
<impermanence>
"I'm" not using it; some guy that built all this stuff is
<havenwood>
impermanence: You shouldn't see that warning unless you're on Ruby 2.4+.
<impermanence>
well...I do.
Tikku has quit [Client Quit]
<havenwood>
impermanence: I mean, some guy shouldn't see that warning. I'd focus on why he's saying it's Ruby 2.0 when it's giving warning that start in 2.4. I just woke up. Need coffee to read properly. bbiab.
galaxie has quit [Remote host closed the connection]
galaxie has joined #ruby
jordanm has quit [Remote host closed the connection]
akemhp has joined #ruby
akemhp has quit [Remote host closed the connection]
akemhp has joined #ruby
jordanm has joined #ruby
suukim has quit [Quit: Konversation terminated!]
<adam12>
Anybody ever have to restrict an entire subset of tests (minitest) to not run except under certain scenarios? I'm trying to find an elegant pattern that can be consistent across a team and looking for alternative options.
alexherbo2 has quit [Ping timeout: 268 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<adam12>
I kinda hate the Rake test task.
cconstantine has joined #ruby
davispuh has joined #ruby
<cconstantine>
Hey folks, I'm running ruby in an application environment that is not nice with how it limits memory usage (nomad / docker). When a ruby application goes beyond the limit of how much memory it's allowed the process is force-killed. I'd really rather have the ruby vm raise an out of memory error/exception instead but I can't find a way to tell RMI a limit for how much memory (heap or otherwise) it's allowed to allocate. Does anyone know if there's a
<cconstantine>
way to tell RMI a maximum allowable memory limit like java's `-Xmx` flag?
FastJack has quit [Ping timeout: 264 seconds]
SeepingN has joined #ruby
sameerynho has joined #ruby
FastJack has joined #ruby
<adam12>
cconstantine: I've never seen one, at lease for MRI. Obviously with jRuby you can use the -Xmx flag as it just passes through to the JVM.
alexherbo2 has joined #ruby
<davidw>
Any idea why calling a method from do_thread_start would cause it to not crash? Some kind of lock or check or... ?! https://bugs.ruby-lang.org/issues/16288 (see my last comment)
<cconstantine>
adam12: Yeah, I saw that but moving to jruby would be a bit of a project.
<cconstantine>
I was hoping for a cli flag or environment variable or method call that could help me out
<adam12>
cconstantine: Absolutely :| Sometimes the hack people use for web serving Ruby apps is a periodic task that kills subprocesses.
<adam12>
cconstantine: Also, forcing the max arena for GC can help on memory usage. Neither of these restrict memory usage because the GC allocates what it wants but it might help keep memory use within bounds.
<cconstantine>
adam12: Yeah, the issue is that some of our devs are writing ActiveJob jobs that allocate WAY more memory that we have available. The issue isn't slowly creaping memory usage; it's a sudden spike where they want things like hundreds of gigs in a very short time. Obviously they shouldn't be doing that, but mistakes happen
<adam12>
havenwood: Really? I've been mostly off rspec since '09 and all my personal stuff runs on minitest, but as teams I consult on grow, it's becoming increasingly painful getting everyone a nice test experience. I end up having to use a half-dozen plugins.
<havenwood>
adam12: Yeah, the plugin creep is real.
<adam12>
havenwood: I grabbed the rspec book a few weeks ago and gave it a read and saw elegant solutions for a ton of hacks I've had to implement...
jenrzzz has quit [Ping timeout: 265 seconds]
* havenwood
clings to his hacks.
Keltia has joined #ruby
<adam12>
Not discounting minitest since I absolutely enjoy the minimalism for my gems, but for web apps, it feels like an uphill battle.
<havenwood>
mmm
<havenwood>
adam12: I'm curious about specific pain points.
cconstantine has quit [Quit: cconstantine]
<davidw>
I.hate lets(:pretend).to be(English)
<adam12>
havenwood: Not having to use Rake testtask (minintest-sprint works for this kinda but see my open PR for one issue, and I have another issue I'm not sure it's worth opening a PR for).
<havenwood>
adam12: I've been happy with Minitest plus plugins (and a few hacks) for a large Rails app at least.
<davidw>
we tried that in the 60ies ("I know! I know! Let's make programming like writing English, then everyone will be able to do it!") and I think it's a dead end
<adam12>
havenwood: Run by name is kinda broken if you're using minitest/spec. Names include spaces and any of the runners output the names without spaces. Copy and paste? Nope. Copy, paste, modify -n argument to be quoted.
<adam12>
havenwood: Around hooks need Jeremy's plugin. Fine.
cconstantine has joined #ruby
<havenwood>
adam12: Yeah, running was an issue I had too. Ended up obscuring that with Rake tasks.
<havenwood>
It's awkward to pass the seed too.
<adam12>
havenwood: Running a single test by name either needs a failing test, an external plugin (minitest-focus or minitest-tagz), or a simple class/method name for you to figure out before a failing test.
<havenwood>
adam12: Ah, I usually don't run solo tests. Hmmm.
<adam12>
havenwood: I have to implement my own 'fake' mechanism (ala OpenStruct but not happy to talk about every method it doesn't know about).
FastJack has joined #ruby
jenrzzz has joined #ruby
cconstantine has quit [Client Quit]
<adam12>
The rspec syntax of yester-year was a huge turnoff but with expect() now, it's mostly passable. Not much different than minitest/spec other than minitest/spec offers 3 different constructs for expect.
<havenwood>
adam12: One reason I lean towards minitest with larger web apps is test speed. Are you seeing improvements on that front too?
<adam12>
davidw: The plain english is kinda weird. It makes a ton more sense once you start using a few more parens. expect(foo).to be something ambiguous vs expect(foo).to be(something(ambiguous))
<havenwood>
Thousands of assertions need to be speedy or it gets frustrating fast.
cconstantine has joined #ruby
<davidw>
adam12, it works well, I use it, but I'm not a fan of the 'idiom'
<adam12>
havenwood: Haven't benchmarked it, but in reality, I'm running a ton of tests I wouldn't want to run with rspec (ala the js tests I might not care about at that exact moment) but skipping js tests is difficult.
<davidw>
I can just hear captain kirk speaking RSPEC to the computer "Computer, expect(COURSE).to have_zero(klingons)"
<adam12>
havenwood: So once I start deviating, speed becomes less of an issue. I wonder how current rspec vs minitest benchmarks actually are.
sepp2k has quit [*.net *.split]
qbrd[m] has quit [*.net *.split]
turt2live has quit [*.net *.split]
<adam12>
davidw: lulz
jenrzzz has quit [Ping timeout: 265 seconds]
galaxie has quit [*.net *.split]
lineus has quit [*.net *.split]
al2o3-cr has quit [*.net *.split]
iNs has quit [*.net *.split]
<adam12>
I'm inclined to trade a nicer single test / tdd driven experience vs overall test time. Especially if I can exclude js/slow tests by default and let the CI deal with them.
<adam12>
But rewriting and moving around test files has their risks. Wanted to see if/how other people dealt with it before I started giving it too much thought :)
<cconstantine>
I havn't migrated from minitest (or even used it), but I've been very happy with rspec
leitz has joined #ruby
<cconstantine>
my instincts would be to do it manually and confirm each test is testing what it's supposed to test (ie, make sure they fail when you break the feature it's testing)
<adam12>
Yeah. Maintaining 2 test suites is a huge concern as well, but might be the easiest to mitigate risk.
cconstantine has quit [Quit: cconstantine]
<davidw>
"Tests?! Why bother, when I have users?"
cconstantine has joined #ruby
<cconstantine>
agreed, that's rough
<uplime>
just don't make any bugs and then you don't need tests
<adam12>
O_o
<cconstantine>
Oh yeah! why didn't I think of that!?
fphilipe_ has joined #ruby
akemhp has quit [Ping timeout: 265 seconds]
cconstantine has quit [Quit: cconstantine]
fphilipe_ has quit [Ping timeout: 246 seconds]
stryek has joined #ruby
ur5us_ has joined #ruby
gpaddis has joined #ruby
cconstantine has joined #ruby
jenrzzz has joined #ruby
william1 has quit [Ping timeout: 240 seconds]
cconstantine has quit [Client Quit]
gpaddis has quit [Remote host closed the connection]
<uplime>
Thanks, I'll take a look at that. Are there any good resources for learning how to use it (and Fiber, which I have little experience with), or should the READMEs suffice?
NODE has quit [Client Quit]
<havenwood>
uplime: The resources aren't super thorough at this point, but I've been able to make everything I've tried work.
<uplime>
oh, well thats good to know
<havenwood>
uplime: I'm happy to help if you run into issues and ioquatix is super responsive.
<uplime>
thanks! I'll play around with it and will poke if i get stuck