CommunistWolf has quit [Ping timeout: 256 seconds]
Technodrome has joined #ruby
markoong has quit [Ping timeout: 240 seconds]
skryking has quit [Ping timeout: 256 seconds]
Arkantos has joined #ruby
CommunistWolf has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
cthu| has quit [Ping timeout: 250 seconds]
drincruz has quit [Ping timeout: 256 seconds]
ur5us has joined #ruby
caterfxo has joined #ruby
elphe has quit [Ping timeout: 256 seconds]
Tempesta has quit [Quit: See ya!]
BTRE has quit [Quit: Leaving]
zacts has quit [Quit: WeeChat 2.8]
gix has quit [Ping timeout: 250 seconds]
dhoc has quit [Quit: dhoc]
NODE has quit []
Benett has quit [Remote host closed the connection]
BTRE has joined #ruby
Benett has joined #ruby
dhoc has joined #ruby
NODE has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
caterfxo has quit [Quit: leaving]
zlogan has quit [Ping timeout: 246 seconds]
zacts has joined #ruby
dhoc has quit [Quit: dhoc]
brool has joined #ruby
<brool>
it seems File.readlines("file.txt") doesn't work for a web app... i am seeing "internal server error" on heroku and when i run my page locally, the error sinatra gives me is "no such file or directory" :s
<brool>
how should i pull in the contents of a file in a sinatra app then? the file is in the same directory as the app root
<brool>
i have also tried plopping the file in public/
<brool>
oh nevermind, something must have changed about the way the path is expected because i have to write the path relative to where config.ru is
buckworst has joined #ruby
troulouliou_dev has joined #ruby
elphe has joined #ruby
buckworst has quit [Client Quit]
buckworst has joined #ruby
chalkmonster has joined #ruby
SeepingN has quit [Ping timeout: 256 seconds]
lineus_ has joined #ruby
lineus has quit [Ping timeout: 240 seconds]
troulouliou_dev has quit [Quit: Leaving]
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elphe has quit [Ping timeout: 256 seconds]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
cd has quit [Quit: cd]
elphe has joined #ruby
buckworst has quit [Quit: WeeChat 2.7.1]
impermanence has quit [Remote host closed the connection]
Tempesta has joined #ruby
zacts has quit [Quit: WeeChat 2.8]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
ChmEarl has quit [Quit: Leaving]
caterfxo has joined #ruby
zacts has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brool has quit [Ping timeout: 256 seconds]
chalkmonster has quit [Quit: WeeChat 2.8]
cthu| has joined #ruby
jokester_ has joined #ruby
cthu| has quit [Ping timeout: 240 seconds]
sauvin has joined #ruby
cliluw has quit [Ping timeout: 265 seconds]
markopasha has joined #ruby
markopasha has quit [Max SendQ exceeded]
markopasha has joined #ruby
buckworst has joined #ruby
d3bug has quit [Quit: Connection closed for inactivity]
zlogan has joined #ruby
freshmaker666 has quit [Quit: ZNC 1.7.2 - https://znc.in]
freshmaker666 has joined #ruby
donofrio has quit [Remote host closed the connection]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has joined #ruby
hassox has quit [Remote host closed the connection]
TzilTzal has joined #ruby
<TzilTzal>
Does anyone know how well ActiveRecord supports foreign tables in postgresql? I've changed the table_name for my model to be a foreign table and I'm getting a PG::NotNullViolation with: null value in column "id" violates not-null constraint
<TzilTzal>
The id column is the usual one created by the migration in rake db:migrate
vondruch has joined #ruby
dviola has joined #ruby
conta1 has joined #ruby
paraxial4 has joined #ruby
buckworst has quit [Quit: WeeChat 2.8]
paraxial has quit [Ping timeout: 250 seconds]
paraxial4 is now known as paraxial
roadie has joined #ruby
sysh has joined #ruby
conta1 has quit [Quit: conta1]
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
<Cork>
TzilTzal: prob a better question for #rubyonrails
schne1der has joined #ruby
hassox has joined #ruby
hassox has quit [Ping timeout: 264 seconds]
<TzilTzal>
Cork: thanks.. will do
ur5us has quit [Ping timeout: 252 seconds]
<al2o3-cr>
hi Cork o/
bvdw has quit [Read error: Connection reset by peer]
Technodrome has joined #ruby
<Cork>
o/
bvdw has joined #ruby
conta1 has joined #ruby
ur5us has joined #ruby
<Cork>
anyone customized a class instance output in pry?
<Cork>
having a hard time finding anything about how that's done...
sysh has quit [Remote host closed the connection]
<Cork>
aah!, pretty_inspect is the key
conta1 has quit [Quit: conta1]
sergioro has quit [Quit: leaving]
shalok has quit [Remote host closed the connection]
<xco>
the class of this is Array.new(100, false).to_enum is enumerator
<ccooke>
xco: you named your variable 'array' and then did not store an array in it, causing cognitive dissonance :-)
<ccooke>
Array.new.class => Array. Array.new.to_enum.class => Enumerator. You made an array, then created a new instance of Enumerator reading from it.
<xco>
ccooke in my local language "array" means something else :D
jetchisel has joined #ruby
phaul has joined #ruby
_phaul has quit [Ping timeout: 240 seconds]
<xco>
al2o3-cr enum = [1,2,3].to_enum.size that give me nil
<al2o3-cr>
xco: try count, it doesn't know its size.
<xco>
al2o3-cr that works
<xco>
:)
<xco>
TBH i'm still confused
<xco>
oh
<xco>
i'm not anymore
<xco>
#size = Returns the size of the enumerator, or nil if it can’t be calculated lazily.
<xco>
from the documentation
<xco>
ok this answers my question :)
<xco>
thanks ccooke al2o3-cr ;)
<al2o3-cr>
🖒
Arkantos has joined #ruby
buckworst has quit [Quit: WeeChat 2.8]
brool has joined #ruby
sergioro has joined #ruby
akem_ has joined #ruby
akem has quit [Ping timeout: 240 seconds]
gix has quit [Ping timeout: 256 seconds]
cek has joined #ruby
akem_ has quit [Ping timeout: 256 seconds]
KamLy has quit [Remote host closed the connection]
KamLy has joined #ruby
akem has joined #ruby
KamLy has quit [Ping timeout: 252 seconds]
dinfuehr_ has quit [Ping timeout: 256 seconds]
linuus has quit [Ping timeout: 256 seconds]
dinfuehr has joined #ruby
markoong has quit [Read error: Connection reset by peer]
markoong has joined #ruby
linuus has joined #ruby
cthulchu has joined #ruby
chalkmonster has joined #ruby
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta1 has quit [Quit: conta1]
wymillerlinux has joined #ruby
ChmEarl has joined #ruby
hassox has joined #ruby
hassox has quit [Remote host closed the connection]
hassox has joined #ruby
fercell has quit [Quit: WeeChat 2.7.1]
skryking has joined #ruby
schne1der has quit [Quit: schne1der]
schne1der has joined #ruby
gix has joined #ruby
conta1 has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.8]
rubydoc has quit [Remote host closed the connection]
TomyWork has quit [Remote host closed the connection]
dinfuehr has quit [Ping timeout: 256 seconds]
dinfuehr has joined #ruby
cd has joined #ruby
conta1 has quit [Quit: conta1]
dinfuehr has quit [Ping timeout: 265 seconds]
dinfuehr has joined #ruby
SegFaultAX has quit [*.net *.split]
bga57 has quit [*.net *.split]
SegFaultAX has joined #ruby
dinfuehr has quit [Ping timeout: 258 seconds]
dinfuehr has joined #ruby
dinfuehr has quit [Ping timeout: 265 seconds]
crisfm has quit [Ping timeout: 256 seconds]
dinfuehr has joined #ruby
crisfm has joined #ruby
sysh has quit [Remote host closed the connection]
crisfm has quit [Ping timeout: 272 seconds]
crisfm has joined #ruby
chalkmonster has joined #ruby
rubydoc has joined #ruby
mostlybadfly has joined #ruby
crisfm has quit [Ping timeout: 250 seconds]
vondruch_ has joined #ruby
dinfuehr has quit [Ping timeout: 265 seconds]
crisfm has joined #ruby
dinfuehr has joined #ruby
vondruch has quit [Ping timeout: 265 seconds]
vondruch_ is now known as vondruch
d3bug has quit [Quit: Connection closed for inactivity]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
ellcs has quit [Ping timeout: 252 seconds]
Arkantos has joined #ruby
crisfm_ has joined #ruby
crisfm has quit [Ping timeout: 260 seconds]
d3bug has joined #ruby
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
KamLy has joined #ruby
KamLy has quit [Ping timeout: 252 seconds]
KamLy has joined #ruby
Deesl has joined #ruby
minall has quit [Quit: Konversation terminated!]
aesthe has joined #ruby
KamLy has quit [Ping timeout: 260 seconds]
ellcs has joined #ruby
cliluw has joined #ruby
DTZUZU2 has joined #ruby
DTZUZU has quit [Ping timeout: 256 seconds]
zlogan has joined #ruby
DTZUZU has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
DTZUZU2 has quit [Ping timeout: 256 seconds]
DTZUZU2 has joined #ruby
DTZUZU has quit [Ping timeout: 264 seconds]
KamLy has joined #ruby
KamLy has quit [Ping timeout: 272 seconds]
zacts has quit [Quit: WeeChat 2.8]
conta1 has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
Deesl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Deesl has joined #ruby
Deesl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Deesl has joined #ruby
DTZUZU2 has quit [Ping timeout: 260 seconds]
DTZUZU has joined #ruby
<akem>
If have a simple ruby script that locks up my terminal(urxvt, but i just tried gnome-terminal too), so i need to blindly type "reset" to get my terminal back. And that even if i don't print anything to the terminal(using puts) - https://termbin.com/t2uz
conta1 has quit [Quit: conta1]
<akem>
Any idea what could cause that terminal lockup?
chalkmonster has quit [Remote host closed the connection]
<akem>
Apparently it's the system() call for some reason, but why?
aesthe has quit [Quit: Leaving]
<akem>
I found why. Nm. Need to track down the threads, and join them then it's fine.
postmodern has joined #ruby
lucasb has joined #ruby
<akem>
Hm not really in fact, it still breaks but not all the time.
apteryx has joined #ruby
<apteryx>
hello! is rubygems some internal thing?
<apteryx>
should I be able to require 'rubygems' at the REPL?
<apteryx>
also, I'm looking at a script that does:
<apteryx>
require 'gherkin', but this fails (LoadError cannot load such file), even I have installed the 'gherkin' library/gem.
KamLy has joined #ruby
<apotheon>
Did you install gherkin using the `gem install gherkin` command?
<apteryx>
I used my package manager, which sets GEM_PATH to a directory which includes gherkin (GNU Guix).
<apotheon>
That was my next question -- whether it's in your gem path.
<apotheon>
Do you have multiple versions of Ruby installed, or just one?
<apteryx>
just one -- ruby 2.5.3p105
<apotheon>
I suppose it could be that you're using a version of Ruby incompatible with your installed version of gherkin.
<apotheon>
I guess that's not it, then.
<apteryx>
ah, wouldn't require give me a better message about this though?
<apteryx>
(if it was the case)
<apotheon>
Maybe? I'm not terribly well-versed in the norms of require load errors.
<apotheon>
akem: My best guess is that the command you execute via system() isn't returning in a timely manner.
<apteryx>
interesting. With 'gem install gherkin -i /tmp' && GEM_PATH=/tmp irb, I could then "require 'gherkin'"
<apteryx>
I'll try with the older version I'm using now
<apotheon>
akem: I haven't exhaustively read your code, though. Perhaps you could try troubleshooting by creating a shorter, simpler script that contains only the bare minimum to still trigger the problem.
_phaul has joined #ruby
<apteryx>
can I install a specific version of a gem using 'gem install' ?
Deesl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apteryx>
ah, the -v flag.
<apotheon>
akem: You could also try replacing system with p just to doublecheck the contents of the cmd variable to make sure they're what you expect. Given the fact you have conditional construction of cmd, the intermittent effects might be related to how some parts of cmd are getting added.
phaul has quit [Ping timeout: 250 seconds]
zacts has joined #ruby
<apteryx>
OK, it indeed seems like something to do with a too old version of 'gherkin'. Ruby 2.5 errors out LoadError on gherkin 3.2.0. Was OK with version 8 or latest of it.
buckworst has joined #ruby
<apotheon>
apteryx: I guess you were stung by the "OS-packaged outdated gems" problem.
umjisus has left #ruby [#ruby]
<apteryx>
I was trying to package an old gem myself, for another package which requires it... well, seems this won't work out :-)
umjisus has joined #ruby
cek has quit [Quit: Connection closed for inactivity]
rippa has joined #ruby
ccooke has quit [Quit: leaving]
Deesl has joined #ruby
<akem>
apotheon, Thanks, i created a simple version that also does lock the terminal 99% of the time: https://paste.ubuntu.com/p/pkCytxptYs/ - i print the cmd before executing it, and it's fine, but the "play" binary normaly update the terminal while playing and i redirect it to /dev/null, so i think that might be the problem...
miskatonic has joined #ruby
<apotheon>
Does the problem go away if you don't redirect to /dev/null?
<akem>
apotheon, No.
<akem>
I tried to play the same commands in an sh script, and it's fine, no lockup.
<akem>
But i can only play them one after the other. I cannot do the thread thing.
skryking has quit [Quit: Konversation terminated!]
<akem>
It must be because of the threading somehow.
cnsvc has joined #ruby
<akem>
apotheon, Yeah if i play them sequentialy in ruby, there's no lockup, only with the thread it happens. (that's also probably why sometimes it was ok, cause i thread on random)
<akem>
Maybe because they try to output at the same time? cause the "play" binary is doing some control codes, escape sequences i think.
ellcs has quit [Ping timeout: 260 seconds]
<akem>
Yeah, this is it i think. If i do a simple "echo #{cmd}" in the thread instead of running the actual command it does not lock the terminal.
<akem>
I think i won't be able to fix that. Thanks anyway.
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]