<seydar>
weird. works on one machine (mac 10.9.5), but not another (ubuntu)
marxarelli has joined #ruby
<seydar>
ah okay. that was the problem. i just had to publically ask first before either a) the problem fixed itself or b) i figured out that rvm wasn't getting the latest list
gigetoo has joined #ruby
Olipro has quit [Ping timeout: 240 seconds]
harry_ has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 276 seconds]
harry_ has joined #ruby
jobewan has joined #ruby
jcarl43 has quit [Quit: WeeChat 2.1]
shinnya has quit [Ping timeout: 256 seconds]
ramfjord has quit [Ping timeout: 276 seconds]
ramfjord has joined #ruby
n0m4d1c has joined #ruby
harry_ has quit [Remote host closed the connection]
harry_ has joined #ruby
jobewan has quit [Quit: jobewan]
seydar has quit [Quit: leaving]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
beremenushka has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
beremenushka has joined #ruby
katoline has joined #ruby
tdy has quit [Quit: WeeChat 1.9.1]
harry_ has quit [Ping timeout: 264 seconds]
cdg has quit [Remote host closed the connection]
n008f4g_ has quit [Ping timeout: 260 seconds]
tolerablyjake has joined #ruby
<katoline>
hello
alfiemax has quit [Ping timeout: 240 seconds]
clemens3 has quit [Ping timeout: 240 seconds]
katoline has left #ruby [#ruby]
riotjones has joined #ruby
kn-928 has quit [Ping timeout: 240 seconds]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4350 has quit [Remote host closed the connection]
harry_ has quit [Remote host closed the connection]
fhmax has joined #ruby
jobewan has quit [Quit: jobewan]
harrycs has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
duckpuppy has quit [Ping timeout: 263 seconds]
ledestin has joined #ruby
harrycs has quit [Ping timeout: 260 seconds]
chmurifree has joined #ruby
riotjones has joined #ruby
gizmore|2 has joined #ruby
fhmax has quit [Remote host closed the connection]
tryingruby has joined #ruby
gizmore has quit [Ping timeout: 248 seconds]
riotjones has quit [Ping timeout: 276 seconds]
darkhanb has joined #ruby
<tryingruby>
Hi All, trying ruby 101 to be used for ingesting data using logstash: But i can't get past this basic thing I am trying to do. I am not a Ruby programmer, but wondering if one could quickly point my mistake in this 4 line code: https://pastebin.com/D6c3qc2a
marxarelli is now known as marxarelli|afk
<ruby[bot]>
tryingruby: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
SeepingN has quit [Quit: The system is going down for reboot NOW!]
alfiemax has joined #ruby
gix has quit [Quit: Client exiting]
jobewan has joined #ruby
<phaul>
tryingruby: first thing I spot is that .map(&:to_s) does nothing
<phaul>
afaics, at least, those are already strings
<phaul>
but otherwise Im not seeing any obvious mistake. although it's 3 am in the morning here :)
<tryingruby>
phaul: I expect only the matched line to be printed, instead I get all lines printed out, any idea why?
dinfuehr has quit [Ping timeout: 256 seconds]
ElFerna has joined #ruby
dinfuehr has joined #ruby
<phaul>
yes you are in a repl right like irb? you are not printing anything. the repl prints the last expression which is the whole block
<tryingruby>
phaul: 3am that's too late in the night or too early in the morning ;) Anyways my file is delimited by pipe(|)
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
<phaul>
so the task is to print get an array of lines where only the lines with the String 'user' are kept?
<phaul>
s/print//
<phaul>
you could put a .grep(/user/) right on on each_line and forget about the block
<tryingruby>
phaul: yes that is correct: each line if formatted as user|xyz|sss|sssys|ssddsd|...|zzz ; where user is different user names; and i want to grep specific user and find further details related to user in an array and pass it to elasticsearch
<tryingruby>
phaul: can you please explain be why is the current code referencing a block and not a line as I think it is?
<tryingruby>
me*
<tryingruby>
phaul: I understood data is a line array with all values split in a line
<phaul>
so you were saying this code prints something. There is not a single print in this code. That's why I said it must be the REPL giving you the value of the expression you typed
noobineer has quit [Ping timeout: 276 seconds]
noobineer has joined #ruby
<phaul>
and that's the whole thing. try putting a puts on the last line in the block to see what hat evaluates to
Radar has joined #ruby
<phaul>
s/hat/that/
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
noobineer has quit [Remote host closed the connection]
<tryingruby>
phaul: I tried putting a just "puts" but same thing it prints the whole block; what do you mean by s/hat/that/ I understand this has search and replace in vi?
govg has quit [Ping timeout: 260 seconds]
noobineer has joined #ruby
noobineer has quit [Max SendQ exceeded]
<phaul>
tryingruby: I made a typo `hat' -> `that' in my previous comment.
<phaul>
so, this code does not filter out lines. you iterate on all lines with .each_line. then for all lines you apply the block.
n0m4d1c has quit [Remote host closed the connection]
<tryingruby>
phaul: here is what I tried: var=line.grep(/user/); puts var; it failed
<tryingruby>
phaul: is this correct: var=line.grep(/myuser/) ?
<tryingruby>
ah
<phaul>
you don't even need the block, this just returns an array of matching lines
<tryingruby>
phaul: got it that worked. but i get an extra => [nil] printed at the end, what is that for?
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phaul>
that's the REPL telling you the value of the last expression
<phaul>
that mechanism is simply part of irb
workmad3 has joined #ruby
<tryingruby>
phaul: I see, I plan to set variables from the matched lines and their values in elasticsearch/logstash using their libraries that implement event.set I just i hope this nil will not be an issue at that time given it is not running interactively then.
<tryingruby>
phaul: anyways thanks a lot my friend ... I will continue with finishing up what i was trying. for now this much ruby is good!! get some rest!!
cdg has joined #ruby
<phaul>
good luck with your project
Dimik has joined #ruby
riotjones has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
cagomez has joined #ruby
pilcrow has joined #ruby
phaul has quit [Ping timeout: 264 seconds]
cdg has quit [Ping timeout: 276 seconds]
riotjones has quit [Ping timeout: 264 seconds]
cagomez has quit [Ping timeout: 276 seconds]
jobewan has quit [Quit: jobewan]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
rshetty has joined #ruby
milardovich has joined #ruby
milardovich has quit [Read error: Connection reset by peer]
guacamole has quit [Client Quit]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
jenrzzz_ has quit [Ping timeout: 260 seconds]
duckpuppy has joined #ruby
rshetty has quit [Ping timeout: 256 seconds]
ivanskie has joined #ruby
duckpuppy has quit [Ping timeout: 264 seconds]
Olipro has joined #ruby
Olipro is now known as Guest72808
duderonomy has joined #ruby
fhmax has quit [Remote host closed the connection]
netherwolfe has joined #ruby
n0m4d1c has joined #ruby
STYNC has joined #ruby
netherwolfe has quit [Ping timeout: 240 seconds]
riotjones has joined #ruby
kapil___ has joined #ruby
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
n0m4d1c has quit [Remote host closed the connection]
pilne has quit [Quit: Leaving]
riotjones has quit [Ping timeout: 268 seconds]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jane_booty_doe has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax_ has quit [Remote host closed the connection]
kn-928 has joined #ruby
ElFerna has quit []
harrycs has joined #ruby
toks has joined #ruby
rshetty has joined #ruby
riotjones has joined #ruby
harry_ has joined #ruby
Dimik has quit [Ping timeout: 264 seconds]
toks has quit [Quit: Leaving]
harrycs has quit [Ping timeout: 248 seconds]
harry__ has joined #ruby
riotjones has quit [Ping timeout: 256 seconds]
rshetty has quit [Remote host closed the connection]
harry_ has quit [Ping timeout: 264 seconds]
harry_ has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
rshetty has joined #ruby
guacamole has quit [Client Quit]
r2 has quit [Ping timeout: 264 seconds]
harry__ has quit [Ping timeout: 240 seconds]
rshetty has quit [Remote host closed the connection]
<b100s>
Hello! Probably simple question: could I force Sinatra to listen on multiple IPs or/and ports ?
<baweaver>
Probably, though you probably want to use NGINX for that instead.
<harrycs>
Hi all, restarting my job search made me a little self conscious of my Twitter - so I made a tool in Ruby to purge an account of likes, tweets, and rts. Just thought I'd share this in case any others have had similar https://github.com/stebbins/cage-the-bird
darkhanb has joined #ruby
<baweaver>
you might get dinged for the eval in there if you show it off.
STYNC has quit [Ping timeout: 240 seconds]
duckpuppy has quit [Ping timeout: 256 seconds]
<harrycs>
baweaver: was that @ me or b100s?
<baweaver>
You.
<harrycs>
What do you mean by dinged for the eval?
Burgestrand has quit [Quit: Closing time!]
<baweaver>
If you show off that code as an example the eval might get some looks
<baweaver>
you could likely use public_send there intead, or even a case statement dispatch
<harrycs>
baweaver: interesting, thanks for the tip! just curious - what's the advantage of public_send over eval?
<baweaver>
public_send will only send to the instance and will only allow you to call the public interface of it
<baweaver>
eval lets you do anything
<baweaver>
like someone passes you `rm -rf` for instance
jane_booty_doe has quit [Quit: Leaving]
<b100s>
baweaver, could I run multiple "apps" in one server like `my_app = Sinatra.new { get('/') { "hi" } } my_app.run!`, so each will listen to different IP and port ?
<harrycs>
baweaver: ah, good to know! Thanks for taking a look & for the feedback!
<baweaver>
Use NGINX for it, it'll be easier on you
<baweaver>
You could
<baweaver>
Though if you're running multiple apps off of one file I would consider breaking that up anyways.
<b100s>
baweaver, noted, nginx is not my current case, unfotunately
<baweaver>
What's your current case?
<b100s>
baweaver, I have app which runs inside cloud like bluemix, so I'm not able to change anything aside my app
<b100s>
I have two interfaces and have to listen to them for handle different requests
Burgestrand has joined #ruby
rikai has quit [Quit: No Ping reply in 180 seconds.]
rikai has joined #ruby
trautwein has quit [Quit: ZNC 1.6.6 - http://znc.in]
trautwein has joined #ruby
pastorinni has quit [Remote host closed the connection]
zacts has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rshetty has quit [Remote host closed the connection]
kapil___ has quit [Quit: Connection closed for inactivity]
AJA4350 has quit [Quit: AJA4350]
RougeR has quit [Ping timeout: 276 seconds]
duckpuppy has joined #ruby
rshetty has quit [Remote host closed the connection]
duckpuppy has quit [Ping timeout: 276 seconds]
reber has joined #ruby
reber__ has joined #ruby
reber__ has quit [Remote host closed the connection]
ryan_ford has quit [Ping timeout: 276 seconds]
jyaworski has joined #ruby
__main__ has quit [Read error: Connection reset by peer]
__main__ has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaequery has joined #ruby
stoffus has joined #ruby
jaequery has quit [Client Quit]
tolerablyjake has joined #ruby
cdg has joined #ruby
jyaworski has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 276 seconds]
nowhereman_ has joined #ruby
howdoi has joined #ruby
sauvin_ has joined #ruby
oleo has quit [Quit: Leaving]
jyaworski has joined #ruby
nowhere_man has quit [Ping timeout: 256 seconds]
riotjones has joined #ruby
workmad3 has joined #ruby
aupadhye has joined #ruby
jaequery has joined #ruby
riotjones has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 256 seconds]
shuforov has joined #ruby
n008f4g_ has joined #ruby
tomphp has joined #ruby
jyaworski has quit [Ping timeout: 240 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
hays has quit [Ping timeout: 276 seconds]
pilcrow has left #ruby ["Leaving"]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aupadhye has quit [Ping timeout: 240 seconds]
venmx has joined #ruby
duckpuppy has joined #ruby
za1b1tsu has joined #ruby
duckpuppy has quit [Ping timeout: 246 seconds]
apeiros has quit [Remote host closed the connection]
n0m4d1c has quit [Remote host closed the connection]
reber has quit [Remote host closed the connection]
jcarl43 has joined #ruby
aupadhye has joined #ruby
jyaworski has joined #ruby
jane_booty_doe has quit [Quit: Leaving]
anisha_ has joined #ruby
KeyJoo has joined #ruby
riotjones has joined #ruby
_rshetty_ has joined #ruby
shuforov has quit [Quit: Leaving]
shuforov has joined #ruby
qba73 has joined #ruby
jyaworski has quit [Ping timeout: 240 seconds]
nowhere_man has joined #ruby
nowhereman_ has quit [Ping timeout: 240 seconds]
qba73 has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 248 seconds]
qba73 has joined #ruby
sauvin_ has quit [Remote host closed the connection]
kapil___ has joined #ruby
conta has joined #ruby
marr has joined #ruby
alex`` has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
n008f4g_ has quit [Ping timeout: 256 seconds]
qba73 has quit []
shpoont_ has joined #ruby
sanscoeu_ has joined #ruby
shuforov has quit [Ping timeout: 260 seconds]
andikr has joined #ruby
sauvin_ has joined #ruby
sanscoeur has quit [Ping timeout: 260 seconds]
duderonomy has quit [Ping timeout: 246 seconds]
sauvin_ is now known as bocaneri
workmad3 has joined #ruby
venmx has quit [Ping timeout: 264 seconds]
sundhell_away is now known as sundhell
Emmanuel_Chanel has quit [Remote host closed the connection]
jaequery has quit [Ping timeout: 265 seconds]
jcarl43 has quit [Quit: WeeChat 2.1]
Emmanuel_Chanel has joined #ruby
shuforov has joined #ruby
TheMFingYeti has joined #ruby
<TheMFingYeti>
Does anyone know what would cause bundle install to spit out: "NameError: undefined local variable or method `options' for #<Bundler::RubyGemsGemInstaller:0x7fd48c2cf520>" when trying to install the mysql 2.9.1 gem?
larcara has joined #ruby
riotjones has joined #ruby
riotjones has quit [Ping timeout: 240 seconds]
TheMFingYeti has quit [Quit: Page closed]
duckpuppy has joined #ruby
TheMFingYeti has joined #ruby
alfiemax_ has joined #ruby
TheMFingYeti has quit [Client Quit]
Flisk has left #ruby ["// this should never happen"]
alfiemax has quit [Ping timeout: 248 seconds]
TheMFingYeti has joined #ruby
duckpuppy has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
aufi has joined #ruby
RougeR has joined #ruby
suukim has joined #ruby
clemens3 has joined #ruby
aufi has quit [Remote host closed the connection]
schneider has joined #ruby
aufi has joined #ruby
faces has joined #ruby
imode has quit [Ping timeout: 265 seconds]
ur5us_ has joined #ruby
morfin has quit [Ping timeout: 246 seconds]
ur5us has quit [Remote host closed the connection]
facest has quit [Ping timeout: 264 seconds]
morfin has joined #ruby
_whitelogger has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
za1b1tsu has quit [Quit: Leaving]
_rshetty_ has quit [Remote host closed the connection]
Beams has joined #ruby
Burgestrand has joined #ruby
TinkerT has quit [Read error: Connection reset by peer]
_rshetty_ has joined #ruby
duckpuppy has joined #ruby
_rshetty_ has quit [Remote host closed the connection]
TinkerT has joined #ruby
Beams_ has joined #ruby
guille-moe has joined #ruby
rshetty has joined #ruby
rshetty has quit [Remote host closed the connection]
_rshetty_ has joined #ruby
venmx has joined #ruby
Beams has quit [Ping timeout: 276 seconds]
_rshetty_ has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
duckpuppy has quit [Ping timeout: 245 seconds]
KeyJoo has quit [Ping timeout: 248 seconds]
za1b1tsu has joined #ruby
riotjones has joined #ruby
kriskropd has joined #ruby
alfiemax_ has quit [Remote host closed the connection]
cagomez has joined #ruby
riotjones has quit [Ping timeout: 276 seconds]
tomphp has joined #ruby
Beams has joined #ruby
rshetty has joined #ruby
Beams_ has quit [Ping timeout: 245 seconds]
alfiemax has joined #ruby
cagomez has quit [Ping timeout: 260 seconds]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
karapetyan has joined #ruby
rshetty has quit [Ping timeout: 260 seconds]
KeyJoo has joined #ruby
RougeR has quit [Ping timeout: 264 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
riotjones has joined #ruby
karapetyan has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 264 seconds]
ellcs has joined #ruby
kriskropd has quit [Ping timeout: 276 seconds]
karapetyan has joined #ruby
shpoont_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karapetyan has quit [Ping timeout: 264 seconds]
Beams_ has joined #ruby
mfaeh has joined #ruby
Beams has quit [Ping timeout: 268 seconds]
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
pavelz has quit [Quit: leaving]
Burgestrand has quit [Quit: Closing time!]
riotjones has joined #ruby
anisha_ has quit [Read error: Connection reset by peer]
mfaeh has quit []
jottr has joined #ruby
anisha_ has joined #ruby
einarj has joined #ruby
Serpent7776 has joined #ruby
larcara has quit [Remote host closed the connection]
dr3w_ has joined #ruby
larcara has joined #ruby
duckpuppy has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
dhollinger has quit [Ping timeout: 260 seconds]
larcara has quit [Remote host closed the connection]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Burgestrand has quit [Quit: Closing time!]
larcara has joined #ruby
jottr has joined #ruby
karapetyan has quit [Remote host closed the connection]
kapil___ has quit [Quit: Connection closed for inactivity]
leitz has joined #ruby
silam has joined #ruby
<leitz>
If using 5e3 for scientific notation, is there a way to use a variable for the "3"?
smala has joined #ruby
karapetyan has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
karapetyan has quit [Remote host closed the connection]
<canton7>
leitz, "use a variable" in what sense?
<leitz>
Ah, found it. 5 * 10 ** ldmod
<leitz>
canton7, not sure if the "3" in the above is the exponent, or what. Still (re-)learning math.
<leitz>
But the goal is to have a variable for the "power of" bit.
<canton7>
yeah, "5e3" is scentific notiation for "5 * 10^3"
workmad3 has joined #ruby
hays has joined #ruby
hays has joined #ruby
hays has quit [Changing host]
hays has quit [Remote host closed the connection]
shuforov has quit [Ping timeout: 256 seconds]
<silam>
Hi
<WhereIsMySpoon>
o/
<silam>
I am using ruby-2.4.3 and while exectuing the puppet command
<silam>
./puppet agent -t --debug
apparition has joined #ruby
<silam>
I am using ruby-2.4.3 and while exectuing the puppet command ...
<silam>
./puppet agent -t --debug
<silam>
am geiing seg fault
<silam>
Debug: Dynamically-bound port lookup failed; falling back to ca_port setting Debug: Creating new connection for https://puppet:8140 /opt/iexpress/ruby/lib/ruby/2.4.0/timeout.rb:97: [BUG] Segmentation fault at 0x02beb640 ruby 2.4.3p205 (2017-12-14 revision 61247) [hppa2.0w-hpux11.31]
<silam>
Please help me on this issue
<WhereIsMySpoon>
silam: are you trying to get puppet to use an external CA?
<silam>
here i am not using any external CA .. i am just doing sample test ..
<silam>
i am doing this on HP-UX PA platform
<silam>
On HP UX IA i dint get any issues..
mahlon has quit [Ping timeout: 246 seconds]
ged has quit [Ping timeout: 268 seconds]
<silam>
WhereIsMySpoon : why seg faults is coming ... /opt/iexpress/ruby/lib/ruby/2.4.0/timeout.rb:97: [BUG] Segmentation fault at 0x02beb640
<WhereIsMySpoon>
no idea
<WhereIsMySpoon>
sorry
<silam>
thanks .. did u faced any similar isssues?
<WhereIsMySpoon>
nope
<WhereIsMySpoon>
sorry
shuforov has joined #ruby
<silam>
Thanks.
<WhereIsMySpoon>
there are some old issues on the net if you google “puppet timeout.rb segfault
gray_-_wolf has quit [Read error: Connection reset by peer]
<WhereIsMySpoon>
"
<WhereIsMySpoon>
but theyre like 4-5 years old
Psybur has joined #ruby
gray_-_wolf has joined #ruby
_rshetty_ has joined #ruby
shpoont_ has joined #ruby
rshetty has quit [Ping timeout: 264 seconds]
dr3w_ has joined #ruby
Burgestrand has joined #ruby
larcara has quit [Remote host closed the connection]
shpoont_ has quit [Client Quit]
gray_-_wolf has quit [Quit: WeeChat 2.1]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jeffreylevesque has quit [Ping timeout: 240 seconds]
duckpuppy has quit [Read error: Connection reset by peer]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
catphish has joined #ruby
<catphish>
i have a situation where some of my ruby processes are sending kill(9) to seemingly random low numbered processes, is there any obvious reason this might happen before i keep digging?
jyaworski has joined #ruby
<catphish>
most of the time it gets back "process not found" but just occasionally it kills something important
Guest92986 has quit [Ping timeout: 268 seconds]
<catphish>
hopefully strace will soon tell me
<WhereIsMySpoon>
catphish: I have no idea, but that sounds whacky :D
<WhereIsMySpoon>
catphish: are your ruby processes using ports or the database or threads in a pool or something similar? Maybe theyre trying to clear resources up but getting the wrong pids
<WhereIsMySpoon>
Just a random shot in the dark
jyaworski has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
Beams_ has quit [Remote host closed the connection]
nahra has joined #ruby
leitz has quit [Quit: Nappy time]
<catphish>
it seems to occur when i call "exit"
ldnunes has joined #ruby
Beams has joined #ruby
<catphish>
i guess a badly behaved at_exit
dr3w_ has joined #ruby
tomphp has joined #ruby
Cavallari has joined #ruby
<catphish>
looks like i was running exit in a forked process, and it had an at_exit callback that was running kill on some stale data
<WhereIsMySpoon>
whoops
yokel has quit [Remote host closed the connection]
sundhell_away is now known as sundhell
WhereIsMySpoon has quit [Quit: WhereIsMySpoon]
yokel has joined #ruby
stoffus_ has joined #ruby
bruce_lee has joined #ruby
stoffus has quit [Ping timeout: 248 seconds]
mahlon has joined #ruby
Cavallari has quit [Quit: Cavallari]
amatas has joined #ruby
larcara has quit [Remote host closed the connection]
larcara has joined #ruby
zwliew has quit [Quit: Connection closed for inactivity]
karapetyan has quit [Remote host closed the connection]
Papierkorb has left #ruby ["Konversation terminated!"]
schneider has quit [Ping timeout: 240 seconds]
yadnesh has joined #ruby
ecuanaso has joined #ruby
fyrril has joined #ruby
shuforov has joined #ruby
phaul has joined #ruby
Guest92986 has joined #ruby
silam has quit [Quit: Page closed]
RougeR has quit [Ping timeout: 240 seconds]
schneider has joined #ruby
_rshetty_ has quit [Remote host closed the connection]
shuforov has quit [Ping timeout: 268 seconds]
aufi_ has joined #ruby
Beams_ has joined #ruby
shuforov has joined #ruby
aufi has quit [Ping timeout: 240 seconds]
alfiemax has quit [Remote host closed the connection]
Beams has quit [Ping timeout: 256 seconds]
rshetty has joined #ruby
nme13 has quit [Quit: Leaving]
rsh has joined #ruby
<catphish>
i expected exit! to fix it, but strangely it hasn't :(
rshetty has quit [Ping timeout: 276 seconds]
jcalla has joined #ruby
shuforov has quit [Ping timeout: 256 seconds]
jyaworski has joined #ruby
larcara has quit [Remote host closed the connection]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fhmax has joined #ruby
shuforov has joined #ruby
RougeR has joined #ruby
RougeR has joined #ruby
larcara has joined #ruby
Strepsils has quit [Ping timeout: 248 seconds]
leotaku has left #ruby ["WeeChat 2.0"]
shuforov has quit [Ping timeout: 264 seconds]
arekushi has quit [Ping timeout: 256 seconds]
skweek has joined #ruby
cdg has joined #ruby
kn-928 has joined #ruby
skweek has quit [Excess Flood]
skweek has joined #ruby
Burgestrand has quit [Quit: Closing time!]
jyaworski has quit [Ping timeout: 264 seconds]
jyaworski has joined #ruby
hinbody has quit [Quit: leaving]
maufart__ has joined #ruby
Burgestrand has joined #ruby
ecuanaso has joined #ruby
k0mpa has joined #ruby
gentleterror has joined #ruby
aufi_ has quit [Ping timeout: 246 seconds]
jyaworski has quit [Ping timeout: 240 seconds]
gentleterror has quit [Client Quit]
darix has quit [Quit: brb]
shinnya has joined #ruby
shuforov has joined #ruby
sylario has joined #ruby
zaka has joined #ruby
<zaka>
Hello
conta has quit [Quit: conta]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta has joined #ruby
hinbody has joined #ruby
<catphish>
ehllo
ecuanaso has joined #ruby
oleo has joined #ruby
darix has joined #ruby
memo1 has joined #ruby
<ellcs>
ehlks?
<zaka>
someone who knows somethink about threads is here and can help?
<WhereIsMySpoon>
zaka: ask the question, and maybe someone will
<memo1>
hi, if i want to execute a ffmpeg command, inside a ruby program and grab all possible exceptions, how i do it?
sundhell is now known as sundhell_away
<ellcs>
@memo1 have a look at Open3
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 256 seconds]
darix has quit [Remote host closed the connection]
<zaka>
I have a class by which I create objects and add them to the array list.Each object has a doImages method. It takes around 2 minutes to create images per object. How can I start this process in many threads so that it simultaneously creates photos for example 10 objects
<phaul>
high level api that fits your needs better
<zaka>
thanks for link
orbyt_ has joined #ruby
<catphish>
fixed my problem, i was still running exit() instead of exit!() in some places, and calling an at_exit that killed things (which had already been killed by a different fork) :)
<catphish>
causing it to occasionally kill something that was reusing an old PID
n0m4d1c has joined #ruby
<memo1>
ellcs: thank you, and once i get the stderr and stdout, how i check it as a log?,
alex`` has quit [Quit: WeeChat 2.0.1]
<zaka>
no idea how to use that parallel :D
chouhoulis has joined #ruby
<WhereIsMySpoon>
catphish: yay for multiprocess programs :D
<phaul>
zaka ok, then you hae to move out t.join from the block
suukim has quit [Quit: Konversation terminated!]
<zaka>
ok it work when i do it
<zaka>
but still doing one method at once
<phaul>
start all threads in a loop. dont join them in the loop. after that join all in a separate loop
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arekushi has joined #ruby
<ellcs>
@memo1 you might i don't know the specific output you might want to catch. but you can iterate over stderr and check if there are some indicators for your exceptions
<zaka>
so i need to keep that thread in array too?
<memo1>
ellcs: i can use open3 with a try do block?
Rapture has joined #ruby
<WhereIsMySpoon>
is there not a way in ruby to stream a list in a parallel way? like java has myList.parallelStream().map/forEach which will execute the lambda given in a multithreaded way
<WhereIsMySpoon>
on the list
ur5us has joined #ruby
apparition has quit [Quit: Bye]
<WhereIsMySpoon>
oh wait, that parallel gem does like…exactly that
<phaul>
WhereIsMySpoon: the library I linked does exactly that
<WhereIsMySpoon>
zaka: follow the readme in that library
<WhereIsMySpoon>
yeah
<WhereIsMySpoon>
its super super simple
<ellcs>
popen won't throw a exception
<ellcs>
are you using the ffmpeg gem?
<ellcs>
guess not, nvm
nitrnitr has joined #ruby
larcara has quit [Remote host closed the connection]
catphish has left #ruby ["Leaving"]
<zaka>
i read some i create somethink like this results = Parallel.map($a) do |one_letter|
<zaka>
one_letter.createImage
<zaka>
end
nitrnitr has quit [Client Quit]
ur5us has quit [Ping timeout: 240 seconds]
stoffus_ has quit [Ping timeout: 246 seconds]
<WhereIsMySpoon>
zaka: sure
skweek has quit [Ping timeout: 276 seconds]
<zaka>
error :block (2 levels) in <top (required)>': undefined method `createImage' for //i:Regexp (NoMethodError)
<WhereIsMySpoon>
then whatever you’re passing in doesnt have a createImage function
<WhereIsMySpoon>
you said doImages when you first said this
<WhereIsMySpoon>
then createImages
<WhereIsMySpoon>
check youve got the right function and youre passing in the right objects to the array
memo1 has quit [Ping timeout: 256 seconds]
<zaka>
function is right because code $a.each do|i| i.createImage end work
nadir has joined #ruby
darix has joined #ruby
fhmax has joined #ruby
alex`` has joined #ruby
dionysus69 has joined #ruby
alfiemax has joined #ruby
dextrey has quit [Ping timeout: 256 seconds]
Fysicus has quit [Excess Flood]
Fysicus has joined #ruby
fhmax has quit [Ping timeout: 240 seconds]
fhmax has joined #ruby
karapetyan has joined #ruby
memo1 has joined #ruby
<memo1>
ellcs: no, im using the bash command ffmpeg
jeffreylevesque has joined #ruby
<ellcs>
memo1: so you need to check within your stderr object if there has been an error
tdelam has joined #ruby
karapetyan has quit [Ping timeout: 265 seconds]
Jittler has joined #ruby
<phaul>
is there a gem that gives you UINT64 arithmetics, preferably implemented with machine registers?
karapetyan has joined #ruby
<Jittler>
Can someone help me get rubocop to auto-format my .rb files on save in VS Code? I'm in a class learning ruby and it'd certainly help.
synthroid has joined #ruby
harrycs has joined #ruby
<Jittler>
I have Ruby, Ruby Solargraph, and ruby-rubocop packages installed. The linter works, and I added "ruby.rubocop.onSave": true to my settings.
synthroi_ has joined #ruby
govg has quit [Ping timeout: 248 seconds]
ldnunes has quit [Read error: Connection reset by peer]
ldnunes has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
govg has joined #ruby
RougeR has quit [Ping timeout: 240 seconds]
synthroid has quit [Ping timeout: 265 seconds]
<Jittler>
Okay, after some digging.. it looks like rubocop is just a linter and it doesn't do the beautify/prettify autoformat on save thing. Does anyone know a ruby autoformatter I can use? :|
drale2k has joined #ruby
RougeR has joined #ruby
synthroi_ has quit []
govg has quit [Ping timeout: 268 seconds]
fhmax has quit [Quit: Leaving]
alfiemax has quit [Remote host closed the connection]
netherwolfe has joined #ruby
fhmax has joined #ruby
fhmax_ has joined #ruby
fhmax_ has quit [Client Quit]
za1b1tsu has quit [Quit: Leaving]
Esa_ has joined #ruby
<zaka>
Process.fork is not supported by this Ruby --- what that means?
<WhereIsMySpoon>
zaka: are you on windows?
alfiemax has joined #ruby
jottr has joined #ruby
rippa has joined #ruby
rshetty has joined #ruby
sleepee has joined #ruby
sanscoeur has quit [Remote host closed the connection]
za1b1tsu has joined #ruby
Mike11 has joined #ruby
Azure has quit [Ping timeout: 276 seconds]
RougeR has quit [Ping timeout: 240 seconds]
jottr has quit [Ping timeout: 264 seconds]
<WhereIsMySpoon>
zaka: ??
jottr has joined #ruby
Serpent7776 has quit [Quit: Leaving]
dionysus69 has quit [Ping timeout: 240 seconds]
<zaka>
yes on windows
lxsameer has quit [Quit: WeeChat 1.9.1]
lxsameer has joined #ruby
<WhereIsMySpoon>
zaka: youre out of luck, you cant fork on windows
larcara has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
alfiemax_ has joined #ruby
smala has quit [Remote host closed the connection]
alfiemax has quit [Read error: Connection reset by peer]
jottr has quit [Ping timeout: 240 seconds]
konsolebox has joined #ruby
alfiemax has joined #ruby
mugurel_ has joined #ruby
<mugurel_>
Anonymous survey - your help is greatly appreciated Hello everyone, I'd like to have a better idea (that's up to date and real, not possibly fake data) of how much Web Developers / Programmers in different parts of the world are paid. If anyone has 20 - 60 seconds to spare and fill the anonymous survey, it will be very helpful. You will find the survey here: https://goo.gl/forms/gzNw7PWc3h9hWnTL2 After I get enough answers I'll al
maufart__ has quit [Ping timeout: 268 seconds]
<WhereIsMySpoon>
mugurel_: you know this data is readily available on various websites?
m27frogy has quit [Ping timeout: 246 seconds]
jottr has joined #ruby
<mugurel_>
Yes, I am aware of that, but most of them are from lengthy surveys, and some of them not up to date. Ever if I get a few questions it will help. It's worth a shot anyway.
alfiemax_ has quit [Ping timeout: 265 seconds]
jyaworski has joined #ruby
kn-928 has quit [Quit: WeeChat 2.1]
zaka has quit [Ping timeout: 263 seconds]
amatas has quit [Ping timeout: 276 seconds]
jottr has quit [Ping timeout: 268 seconds]
jottr has joined #ruby
jyaworski has quit [Ping timeout: 256 seconds]
mugurel_ has quit [Quit: Page closed]
ta_ has quit [Ping timeout: 240 seconds]
ldnunes has quit [Read error: Connection reset by peer]
<memo1>
hi, im using evenmachine and rest-client to post to a server. Every two or three weeks i get an exception "too many open files- getaddrinfo". It is solve if a restart the script. How i can solve it programmatically?
alfiemax has quit [Remote host closed the connection]
ellcs has quit [Remote host closed the connection]
troys has joined #ruby
faces has quit [Ping timeout: 268 seconds]
conta has quit [Ping timeout: 256 seconds]
jottr has quit [Ping timeout: 264 seconds]
konsolebox has joined #ruby
n0m4d1c has quit [Remote host closed the connection]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
c0ncealed has quit [Remote host closed the connection]
m27frogy has joined #ruby
Jittler has quit [Quit: Page closed]
facest has quit [Ping timeout: 240 seconds]
Bobi_ has joined #ruby
cagomez has joined #ruby
c0ncealed has joined #ruby
harry_ has joined #ruby
<Bobi_>
hello everyone
<havenwood>
Bobi_: hi
cagomez has quit [Read error: Connection reset by peer]
<Bobi_>
havenwood: hello my friend
harrycs has quit [Ping timeout: 265 seconds]
cagomez has joined #ruby
harry__ has joined #ruby
faces has joined #ruby
harry_ has quit [Ping timeout: 248 seconds]
<memo1>
WhereIsMySpoon: thank you. Im checking on my server, and it has the ulimit set to umlimit
[Butch] has joined #ruby
jcarl43 has joined #ruby
jottr has joined #ruby
kapil___ has joined #ruby
tvw has joined #ruby
fhmax has quit [Ping timeout: 240 seconds]
shuforov has quit [Ping timeout: 256 seconds]
k0mpa has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 264 seconds]
<eam>
memo1: the ulimit for open files cannot be set to unlimited
jottr has joined #ruby
<eam>
you can check the limit for a particular process via: cat /proc/$pid/limits
redlegion has quit [Remote host closed the connection]
<eam>
reasonable odds you have a descriptor leak in your app, which you would see by looking at lsof -p $pid -- examine if the descriptor table grows over time
<eam>
ruby is especially prone to this kind of error as it's common to release an object to the gc which still has descriptors attached to it
Guest92986 has quit [Ping timeout: 260 seconds]
jottr has quit [Ping timeout: 240 seconds]
venmx has quit [Ping timeout: 240 seconds]
venmx has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dr3w_ has joined #ruby
tolerablyjake has joined #ruby
synthroid has joined #ruby
jottr has joined #ruby
suukim has joined #ruby
jcarl43 has quit [Quit: WeeChat 2.1]
Beams_ has quit [Ping timeout: 256 seconds]
jcarl43 has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
darkhanb has joined #ruby
ur5us has joined #ruby
ledestin has joined #ruby
conta has joined #ruby
eckhardt_ has joined #ruby
marxarelli|afk is now known as marxarelli
apeiros has joined #ruby
jottr has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
raynold has joined #ruby
tvw has quit []
jottr has quit [Ping timeout: 246 seconds]
guacamole has joined #ruby
guacamole has quit [Client Quit]
graft has joined #ruby
nme13 has joined #ruby
sleepee has quit [Ping timeout: 240 seconds]
mjolnird has joined #ruby
mjolnird has quit [Remote host closed the connection]
jottr has joined #ruby
<nme13>
hi
jyaworski has joined #ruby
<nme13>
is there a way to sort this by date ??? please > {2=>Fri, 19 Jan 2018 17:57:23 UTC +00:00, 1=>Tue, 27 Mar 2018 15:00:11 UTC +00:00, 4=>Fri, 19 Jan 2018 13:47:23 UTC +00:00}
shuforov has joined #ruby
<nme13>
anybody here ?
n008f4g_ has joined #ruby
<nme13>
please I've found many way to sort hashes but it seems that none of them works
<nme13>
I want to sort an hash that contains datetime value, by datetime
<apeiros>
nme13: how are you currently doing it?
<apeiros>
or, what's your current approach?
SeepingN has joined #ruby
<nme13>
.sort_by{ |t| t[created_at] }
schneider has joined #ruby
<apeiros>
that does not fit the hash you provided - does your real hash look differently from your example then?
<nme13>
this hash contains ids and dates
<nme13>
no
<havenwood>
nme13: And how does the result differ from your expectation?
<nme13>
that's the result of .inspect
<apeiros>
nme13: ok, sort_by will give you the key/value pair
<nme13>
undefined method `created_at' for [2, Fri, 19 Jan 2018 17:57:23 UTC +00:00]:Array
<apeiros>
so your_hash.sort_by { |_id, date| date } # => will return a sorted array
<apeiros>
and to_h will turn that sorted array back into a hash
larcara has quit [Remote host closed the connection]
einarj has quit [Remote host closed the connection]
larcara has joined #ruby
\void has joined #ruby
<apeiros>
phaul: lookup and insertion is amortized O(1)
einarj has joined #ruby
<apeiros>
everything which loops is obviously at least O(n). sorting requires working on all values, so it doesn't differ from other collection classes and is O(nlogn)
alfiemax has joined #ruby
larcara has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
larcara has joined #ruby
dviola has quit [Quit: WeeChat 2.1]
einarj has quit [Ping timeout: 248 seconds]
jyaworski has joined #ruby
<phaul>
cool
karapetyan has joined #ruby
nahra has quit [Remote host closed the connection]
nahra has joined #ruby
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
rshetty has quit [Remote host closed the connection]
guille-moe has quit [Ping timeout: 240 seconds]
Mike11 has quit [Quit: Leaving.]
rshetty has joined #ruby
tomphp has joined #ruby
nahra has quit [Remote host closed the connection]
FrostCandy has joined #ruby
Silthias has joined #ruby
nowhere_man has joined #ruby
<phaul>
not entirely clear on what happens on the collision. So you start a second level of hashing with the unsused bits of key.hash. but even that can start collliding after a while?
larcara has quit [Remote host closed the connection]
<phaul>
or is that recursive, and whenever you collide you introduce a new level?
larcara has joined #ruby
imode has joined #ruby
Cybergeek has joined #ruby
jyaworski has quit [Ping timeout: 260 seconds]
rshetty has quit [Remote host closed the connection]
<phaul>
or the size with the second level is such that you practically can't exhaust it
<fox_mulder_cp>
how i can proper implement #each for my plain ruby object in array? now it have exeption for [] method
kapil___ has quit [Quit: Connection closed for inactivity]
<phaul>
fox_mulder_cp: sorry but your question is hard to understand. Do you want each method on the array or on the object inside the array. If so what is the type of that object?
<phaul>
can you give us a code example?
<zenspider>
"plain ruby object" ... all ruby objects are plain ruby objects
<apeiros>
zenspider: he's from rails. IME they talk about "plain ruby objects" meaning "not an AR model"
<apeiros>
(since most stuff every & all logic into models)
<zenspider>
yeah. I don't care for the distinction. it's meaningless. AR models are also plain ruby objects.
<apeiros>
sure
<zenspider>
fox_mulder_cp: making assumptions about what you want... class X... def each; @my_collection.each do |o| ... end end end
<zenspider>
it just comes from that java POJO bullshit
<zenspider>
fox_mulder_cp: don't modify someone else's data on line 9
<zenspider>
line 21, 'self.each' would be recursive. you want to call each on your actual collection
<fox_mulder_cp>
so how i can pass it as default?
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<fox_mulder_cp>
zenspider: so how i can implement it properly?
<zenspider>
fox_mulder_cp: || would work fine on line 9. you don't need to modify the incoming arg
schneider has joined #ruby
<fox_mulder_cp>
zenspider: and what about each emplementation?
<zenspider>
read above
<fox_mulder_cp>
i don't know properly implement some for collection when user it as arr = [Record.new(), Record.new(),..]
jottr has joined #ruby
<zenspider>
fox_mulder_cp: how does the content of the collection matter in this case?
jamesaxl has quit [Quit: WeeChat 2.0.1]
<fox_mulder_cp>
for #to_json mapped, in main use case, for mapping data to external api
<zenspider>
I think we're hitting a language barrier here... to_json isn't in play here. We're not talking about json as far as I can tell... we're talking about defining #each to work properly.
<zenspider>
Yes?
<fox_mulder_cp>
yes.
<fox_mulder_cp>
i create gem for powerdns, and i need map domain zone json to ruby object structure
<zenspider>
by the time you're calling #each on your W3dns::Record object, your collection should already be translated from json to ruby objects
<zenspider>
each shouldn'd DO anything but enumerate
<zenspider>
json parsing should be as far away from it as possible
<fox_mulder_cp>
zenspider: i need reverse mapping. from json all ok. but into json
<zenspider>
dude. no. each is each. it isn't ANYTHING ELSE
<zenspider>
if you can't let go of the json thing here and now, I'm done. implement each. implement to_json, implement parsing from json into your Record. They do NOT mix
<fox_mulder_cp>
zenspider: i have deep loop exeption when try to use #each for self..
<zenspider>
I already pointed out that you're recursively calling each
jottr has quit [Ping timeout: 248 seconds]
<zenspider>
that has NOTHING to do with json
<fox_mulder_cp>
so i need it proper implementation
<fox_mulder_cp>
zenspider: shit. drop to_json. i needf #each
<zenspider>
once again... read my original suggestion.
<zenspider>
this is wandering into help vampire territory. I carry stakes and holy water for just this reason...
<fox_mulder_cp>
i need for ideas for proper implementation of #each to my object with two props. english in not my native.
clemens3 has quit [Ping timeout: 240 seconds]
icarus has joined #ruby
<phaul>
fox_mulder_cp: so you want each to iterate both @content and @disabled ? are those arrays?
schneider has quit [Ping timeout: 264 seconds]
psychicist__ has quit [Ping timeout: 256 seconds]
<fox_mulder_cp>
@content and @disabled are strings. i need do some with array od W3dns::Record.neODODODODODODODODODODODODODODw
Esa_ has quit []
<phaul>
sorry. I cannot help
<zenspider>
they're NOT strings. line 9 is clearly boolean (at least for false)
za1b1tsu has quit [Quit: Leaving]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<icarus>
hello all, I'm looking at 'net/ssh', attempting to use ssh.exec! to issue a command on a remote server, however it is one that requires :RequestTTY => force, but this isn't an option for Net::SSH (http://www.rubydoc.info/github/net-ssh/net-ssh/Net/SSH); Does anyone have any recommendations for executing "ssh -ttt" commands via ruby?
<zenspider>
and while content is named such that it can be a collection, disabled is not. it is a bool-like thing
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<fox_mulder_cp>
zenspider: it's not critical now
<icarus>
I appreciate any input, thank you!
<zenspider>
icarus: meaning the command you want to run requires a TTY connection?
[Butch] has quit [Ping timeout: 240 seconds]
<icarus>
zenspider: correct! (:config doesnt register an entry in ~/.ssh/config for RequestTTY either)
tdy has joined #ruby
iszak has quit [Ping timeout: 240 seconds]
<zenspider>
man rubydoc.info is an unusuable mess.
<zenspider>
last time I had problems with net/ssh I wound up creating Rake::RemoteTask... so... this might still be a problem
<icarus>
:(
iszak has joined #ruby
<zenspider>
ok. grabbed it and grepped around. looks like you might want request_pty via ssh.open_channel
<zenspider>
`gem which ssh/connection/channel`
<zenspider>
as in: emacs -q `gem which ssh/connection/channel`
eckhardt_ has joined #ruby
<icarus>
zenspider: thanks for the assist, ill read up
<SeepingN>
Ruby Net:SSH is a PITA
<zenspider>
yuup
<SeepingN>
In general it's easy, but when you have anything different than the default settins they must test against, good luck
<SeepingN>
I have some really horrible hax
<icarus>
SeepingN: do you happen to know of any good alternatives? (yeah, in this case i just need the equivalent of "ssh -t" hah)
<SeepingN>
like when I tell the remove device to hang up (drop the tunnel, forced), it just stops responding. I have to look for a key phrase and wait 10 seconds and force hard disconnect to move on
<zenspider>
and to be clear. Rake::RemoteTask works well, but is more meant for running against N machines and the like. it's very specific about what it is for
<zenspider>
icarus: depending on what you want... I'd probably steer you towards open3 + expect.rb + IO#expect
pastorinni has quit [Remote host closed the connection]
<zenspider>
does this not work?
<zenspider>
Net::SSH.start( 'localhost' ) do |session| shell = session.shell.open( :pty => true ) ... end
<zenspider>
(honestly I have no idea--I left net/ssh out of hate probably a decade ago)
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jyaworski has quit [Ping timeout: 268 seconds]
<icarus>
"undefined local variable or method `session' for main:Object (NameError)"
<icarus>
does it not exist in net/ssh anymore?
<icarus>
I might be leaving it in a few minutes for the same reasons :)
<zenspider>
ugh. fuck me. no clue
<zenspider>
what do you want to do?
<icarus>
im putting an ssh wrapper together to run certain commands on remote servers, behind sinatra/nginx
<icarus>
I was handed some endpoints that have broken rpc endpoints, but they still work locally (yea, im hacking it together, but hey its gotta be up asap)
<fox_mulder_cp>
icarus: use ansible $)
<fox_mulder_cp>
i use ansible for controlling my nodes from rails app
ryzokuken has quit [Quit: Connection closed for inactivity]
cschneid has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
cschneid has quit [Ping timeout: 264 seconds]
nertzy has quit [Ping timeout: 263 seconds]
rahul_bajaj has joined #ruby
rabajaj has quit [Read error: Connection reset by peer]
<SeepingN>
I had to do that
<SeepingN>
in the same script I use other ssh calls
shinnya has joined #ruby
<SeepingN>
some weirdo proprietary server that just wouldn't work with net:ssh. gave up, made a file of commands to execute, and pass them to commandline ssh. pretty lame
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rabajaj has joined #ruby
cschneid has joined #ruby
<eam>
SeepingN: shelling out to the openssh binary is a pretty regular thing -- none of the ssh libraries (libssh2) have a full authentication featureset
rahul_bajaj has quit [Ping timeout: 248 seconds]
<SeepingN>
ah yes, that was it. it didn't like any of our authentication attempts