<gendarme>
also curios, what is the ruby vm like? is it stack based?
Guest68637 has quit [Ping timeout: 272 seconds]
<havenwood>
gendarme: Yeah, with CRuby it's an AST and stack based.
<havenwood>
gendarme: There's some neat experimental work around switching the VM to register transfer language.
<oncall-pokemon>
does anybody happen to know how to get back the dotted decimal netmask from IPAddr.new('255.255.255.255').mask(cidr) where lets say cidr is 19
<rubydoc>
# => [1, :RUBY_EVENT_LINE, [:putself], [:opt_send_without_block, {:mid=>:a, :flag=>28, :orig_argc=>0}],... check link for more (https://carc.in/#/r/8hcu)
fphilipe has quit [Read error: Connection reset by peer]
ellcs has joined #ruby
zlogan has quit [Ping timeout: 272 seconds]
phaul has joined #ruby
phaul has quit [Changing host]
phaul has joined #ruby
akemhp has joined #ruby
alexherbo2 has joined #ruby
phaul_ has joined #ruby
_phaul has quit [Ping timeout: 260 seconds]
fphilipe has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
akemrir has joined #ruby
alfiemax has quit [Ping timeout: 265 seconds]
alfiemax has joined #ruby
mossplix has joined #ruby
xco has joined #ruby
alfiemax has quit [Remote host closed the connection]
kristian_on_linu has joined #ruby
fphilipe has quit [Ping timeout: 260 seconds]
mossplix has quit [Remote host closed the connection]
kristian_on_linu has quit [Ping timeout: 265 seconds]
kristian_on_linu has joined #ruby
mossplix has joined #ruby
mossplix has quit [Ping timeout: 240 seconds]
brool has quit [Ping timeout: 272 seconds]
chalkmonster has quit [Quit: WeeChat 2.7]
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
fercell has joined #ruby
pandakekok9 has joined #ruby
jenrzzz has joined #ruby
mossplix has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
kristian_on_linu has quit [Ping timeout: 268 seconds]
kristian_on_linu has joined #ruby
pandakekok9 has quit [Remote host closed the connection]
tryhard21 has joined #ruby
Jonopoly has quit [Quit: WeeChat 2.5]
fphilipe has joined #ruby
pandakekok9 has joined #ruby
phaul has joined #ruby
mossplix has quit [Read error: Connection reset by peer]
mossplix has joined #ruby
Xiti has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
_phaul has joined #ruby
phaul_ has quit [Ping timeout: 272 seconds]
mossplix_ has joined #ruby
mossplix has quit [Ping timeout: 268 seconds]
lucasb has joined #ruby
suukim has joined #ruby
Nanuq has quit [Ping timeout: 272 seconds]
chalkmonster has joined #ruby
Nanuq has joined #ruby
mossplix_ has quit [Remote host closed the connection]
davispuh has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
skryking_ has quit [Quit: Konversation terminated!]
Jonopoly has joined #ruby
Nanuq has quit [Ping timeout: 246 seconds]
kristian_on_linu has quit [Remote host closed the connection]
pandorian has quit []
gray_-_wolf has joined #ruby
SuperLag has quit [Ping timeout: 260 seconds]
SuperLag has joined #ruby
TCZ has joined #ruby
pandakekok9 has quit [Ping timeout: 240 seconds]
jcalla has joined #ruby
mossplix has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Nanuq has joined #ruby
DaRock has quit [Ping timeout: 240 seconds]
drincruz has joined #ruby
TorpedoSkyline has joined #ruby
TorpedoSkyline has quit [Client Quit]
zlogan has joined #ruby
lmat has joined #ruby
<lmat>
In rails, the function asset_path works fine and "fingerprints" assets as designed. Except in IntegrationTests. When I run in an IntegrationTest, asset_path hangs and pegs one core indefinitely. Any clue about that?
<lmat>
In a view, there may be asset_path('logo.png') or whatever, and that hangs. Also any time a css or js file is served, the framework calls asset_path which also hangs.
<adam12>
lmat: Were you working on this a few days / week ago? I'm having dejavu.
<lmat>
adam12: Yeah, thought I would try back :-)
<lmat>
adam12: Often enough, talking through a problem solves it... (duck debugging)
<adam12>
lmat: Sounded like an infinite loop at the time.
<lmat>
adam12: arch linux, but this is running in a docker container, let me see.
<lmat>
oh from ruby:2.6.5 ... looking. Probably an ubuntu image, most of the time alpine images would be something like ruby-alpine. Maybe I should try switching.
<adam12>
lmat: Be great to know what loop it's stuck on. I wonder if rbspy would give you anything useful.
<lmat>
adam12: Maybe it's not a sprockets thing! "this is a Rails helper provided by Action View"
<lmat>
adam12: I'm not sure how to answer your "thre were no changes outside of Rails". I mean...there's my codebase... what changes are you looking for?
<lmat>
adam12: Oh, maybe I should say: the integration tests have never worked (as far as I've seen).
jenrzzz has joined #ruby
<adam12>
lmat: I mean, you're sure nobody has monkey patched a piece of Rails inside your app, that might cause the infinite loop. This could be something tucked away in lib/ or config/initializers, or through a gem.
<lmat>
adam12: I see. No, I'm not sure how to be sure about that :-) I'll have a look.
<lmat>
grep asset_path . -r; returns only calls to asset_path... but any function that asset_path calls could have been replaced if I understand correctly.
tricon has quit [Remote host closed the connection]
<adam12>
lmat: Yeah. Could not even be asset_path, but a method that asset_path calls somewhere down the stack.
<adam12>
lmat: asset_path works in development mode?
<adam12>
lmat: It's just integration tests that fail?
<lmat>
adam12: Exactly. That's what I meant by "but any function that asset_path calls could have been replaced..."
<lmat>
adam12: I'm not sure how to test that. I've run the web application and asset_path works there, but I don't know if I'm in development mode.
<lmat>
adam12: Yes, on my watch, I've only seen integration tests that fail. (Other kinds of tests can't call asset_path because there are no views, etc.)
<adam12>
lmat: are you able to gist config/environments/test.rb? I doubt there's anything sensitive in it.
<lmat>
heh, my Stack overflow question is first result googling "rails call asset_path from integration test" ^_^
<lmat>
(If you find my client's SSN in there, don't disclose it ;-) )
<adam12>
lmat: LOL
<lmat>
adam12: By clicking the link above, you hereby agree that you will not disclose my client's SSN, and you will disclose your own along with all your bank account numbers...
<adam12>
lmat: Nothing of interest. I was looking to see if there'd been any setting of an asset host. Anything anywhere else? grep -r asset_host .
<adam12>
lmat: All out of ideas I guess. If you can get a copy of the stacktrace from the infinite loop it might help.
<lmat>
adam12: Yes, that would be instructive! hmm so I need a debugger that can break on a signal, then I could examine the stack?
<adam12>
lmat: Try rbspy if possible. It might get you close?
<lmat>
adam12: okay, I'll go in that direction.
<adam12>
lmat: I'm not personally aware of a debugger that you can trigger without code somewhere. I don't often have the need.
<lmat>
adam12: I covet your situation!
skryking has joined #ruby
akemrir has quit [Quit: WeeChat 2.7]
ellcs has quit [Ping timeout: 265 seconds]
suukim has quit [Ping timeout: 260 seconds]
phaul_ has joined #ruby
_phaul has quit [Ping timeout: 265 seconds]
xco has joined #ruby
alfiemax has joined #ruby
SeepingN has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
TomyWork has quit [Remote host closed the connection]
dviola has joined #ruby
Jonopoly has quit [Quit: WeeChat 2.5]
stryek has joined #ruby
<lmat>
adam12: Have you used rbspy? I'm running it with a PID. Some relevant process from ps(1) are https://imgur.com/a/LsSczw9. I'm running it against the three last processes.
<lmat>
And rbspy says it's panicking because no stack traces found. I guess that means it can't find ruby running in those processes?
<lmat>
"No stack counts found"
<adam12>
lmat: Not for many months, but it worked when I tried it. There is/was no good FreeBSD build and it's where I do most of my dev / deploys.
<adam12>
lmat: It seemed like the simplest solution to solve your problem.
<adam12>
lmat: Same premise of rbspy I guess, but uses gdb and maybe strace?
<lmat>
ahh, okay
<lmat>
adam12: Another option in my eyes is to take apart the configuration in the application. Basically, keep stripping down the application until it's nothing more than the problem configuration.
<lmat>
well... until one more change fixes the problem.
<lmat>
I don't really know how configuration works in rails, so it'll be an uphill battle...
<lmat>
But I keep hitting the fact that this works in the production and development app :-!
<adam12>
lmat: It's a good solution. But you'd know better about the app than I would. If it started in 2008 and has a ton of interconecting pieces, decomposing it can be a challenge.
<lmat>
no, it's small.
<lmat>
I mean, lots of pieces, but nothing to them. Basically it's a stub of an app. Has lots of business objects and a mock-like frontent, but no guts to speak of.
<lmat>
I think it was put together as a demo.
reber_ has joined #ruby
reber has quit [Ping timeout: 265 seconds]
fercell has quit [Quit: WeeChat 2.7]
extrowerk has quit [Ping timeout: 258 seconds]
sdu has quit [Remote host closed the connection]
<lmat>
adam12: Yes, it is not asset_path directly. I've stepped ... and stepped and stepped. I never got to anything useful though.
<lmat>
By the way, I've verified that it works in development and production environments (I think)
extrowerk has joined #ruby
wallace_mu has joined #ruby
buckworst has joined #ruby
phaul has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phaul has joined #ruby
drincruz has quit [Ping timeout: 268 seconds]
<lmat>
test, production, and development configuration are really different, but it looks like that might be on purpose.
alfiemax_ has joined #ruby
cliluw has quit [Ping timeout: 260 seconds]
cliluw has joined #ruby
alfiemax has quit [Ping timeout: 268 seconds]
xco has joined #ruby
drincruz has joined #ruby
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
davidw has joined #ruby
davidw has joined #ruby
davidw has quit [Changing host]
alfiemax has joined #ruby
TCZ has quit [Quit: Bye Bye]
clemens3 has quit [Quit: WeeChat 2.1]
alfiemax_ has quit [Ping timeout: 265 seconds]
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
akemhp has quit [Quit: Leaving]
phaul has quit [Ping timeout: 265 seconds]
mossplix has quit [Remote host closed the connection]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phaul has quit [Ping timeout: 272 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
orbyt_ has joined #ruby
jastultz has quit [Quit: leaving]
duderonomy has quit [Ping timeout: 248 seconds]
jacksop has joined #ruby
jenrzzz has joined #ruby
ellcs has quit [Ping timeout: 248 seconds]
cd has joined #ruby
duderonomy has joined #ruby
alex` has joined #ruby
alex` is now known as Guest88106
alexherbo2 has joined #ruby
reber__ has joined #ruby
reber_ has quit [Ping timeout: 268 seconds]
Guest88106 is now known as alex``
phaul has joined #ruby
wildtrees has joined #ruby
wildtrees has quit [Remote host closed the connection]
wildtrees has joined #ruby
phaul has quit [Ping timeout: 260 seconds]
mossplix has joined #ruby
phaul has joined #ruby
impermanence has quit [Remote host closed the connection]
davispuh has quit [Ping timeout: 272 seconds]
mossplix has quit [Ping timeout: 265 seconds]
alfiemax_ has quit [Remote host closed the connection]
davispuh has joined #ruby
gix has joined #ruby
phaul has quit [Ping timeout: 272 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
xco has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reber__ has quit [Read error: Connection reset by peer]
Synthead has joined #ruby
reber__ has joined #ruby
Synthead has quit [Client Quit]
schne1der has quit [Ping timeout: 240 seconds]
x0n has joined #ruby
sh7d has quit [Read error: Connection reset by peer]
sh7d has joined #ruby
FastJack has joined #ruby
cthulchu_ has quit [Read error: Connection reset by peer]
cthulchu_ has joined #ruby
jacksop has quit []
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix has quit [Quit: Client exiting]
gix has joined #ruby
im0nde_ has joined #ruby
william1_ has joined #ruby
im0nde has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
sh7d has quit [Ping timeout: 268 seconds]
mossplix has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
TCZ has joined #ruby
rippa has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
fercell has quit [Quit: WeeChat 2.7]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
william1_ has quit [Ping timeout: 268 seconds]
fphilipe has quit [Ping timeout: 268 seconds]
orbyt_ has joined #ruby
jkay has joined #ruby
jkay has quit [Client Quit]
cnsvc has quit [Quit: WeeChat 2.7]
cnsvc has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
sh7d has joined #ruby
cisco has joined #ruby
duderonomy has joined #ruby
cisco has quit [Quit: Lost terminal]
jenrzzz has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
Helenah has quit [Read error: Connection reset by peer]
Helenah has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
ur5us has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
mossplix has quit [Remote host closed the connection]
ur5us has quit [Quit: Leaving]
e21 has joined #ruby
SeepingN has quit [Read error: Connection reset by peer]
SeepingN_ has joined #ruby
heth has quit [Read error: Connection reset by peer]
heth has joined #ruby
BTRE has quit [Ping timeout: 260 seconds]
reber_ has joined #ruby
tdy has quit [Quit: WeeChat 1.9.1]
reber__ has quit [Ping timeout: 260 seconds]
wildtrees has quit [Ping timeout: 272 seconds]
buckworst has joined #ruby
buckworst has quit [Client Quit]
istrasci has joined #ruby
sh7d has quit [Read error: Connection reset by peer]
sh7d_ has joined #ruby
BTRE has joined #ruby
<istrasci>
I have created a pretty standard gem, MyGem. It has a VERSION constant in lib/my_gem/version.rb, but when I use my gem in other projects, I cannot access this constant. I have `s.files = Dir["{app,config,db,lib}/**/*", ...]` in my .gemspec file. Any ideas why I can't access this constant?
Benett has quit [Quit: ]
Benett has joined #ruby
<phaul_>
have you done a require on the version? ie require 'mygem/lib/mygem/version'. You have to either expose version in the gem at top level (i think that's what the auto generated files do), or you have to require the file explicitly
<phaul_>
if the gem top level ie module MyGem; require 'mygem/version'; end is there then you should be able to see version just by require 'mygem' ; MyGem::VERSION
jenrzzz has quit [Ping timeout: 260 seconds]
<phaul_>
when auto generated I am talking about bundle gem ... command
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
visage_ has joined #ruby
xco has joined #ruby
visage_ has left #ruby [#ruby]
reber__ has joined #ruby
dviola has joined #ruby
v1sage has joined #ruby
reber_ has quit [Ping timeout: 272 seconds]
e21 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
e21 has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TorpedoSkyline has joined #ruby
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
<havenwood>
istrasci: I agree with phaul_. Require it in `lib/mygem.rb` with `require 'mygem/version'`.
cliluw has quit [Ping timeout: 265 seconds]
v1sage has quit [Quit: v1sage]
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
<phaul_>
havenwood: I've created two tkts, not that any thought have been given to how to actually do them. https://github.com/phaul/yarr/issues/4 & 5. but if anybody feels like there are more pressing things to do, Im happy to reconsider on priorites
<havenwood>
phaul_: nice!
reber__ has quit [Read error: Connection reset by peer]
<havenwood>
damn bundler for making me look in these sham bin/ directories :P