kristian_on_linu has quit [Remote host closed the connection]
_aeris has joined #ruby
_aeris_ has quit [Ping timeout: 268 seconds]
_aeris is now known as _aeris_
whysthatso has joined #ruby
elcuervo has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
elcuervo has joined #ruby
s3nd1v0g1us has quit [Quit: WeeChat 3.0.1]
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Client Quit]
m_antis has joined #ruby
traffic has joined #ruby
m_antis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DaRock has quit [Remote host closed the connection]
gearnode has quit [Ping timeout: 264 seconds]
nertzy has joined #ruby
_aeris_ has quit [Ping timeout: 268 seconds]
_aeris_ has joined #ruby
cow[moo] has joined #ruby
ghormoon_ has quit [Ping timeout: 264 seconds]
ghormoon has joined #ruby
ChmEarl has quit [Quit: Leaving]
k_sze has left #ruby ["Leaving"]
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
kktt0071 has joined #ruby
zacts has joined #ruby
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Client Quit]
Xiti has quit [Ping timeout: 264 seconds]
gix- has joined #ruby
gix has quit [Disconnected by services]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has joined #ruby
Xiti has joined #ruby
jeromelanteri has quit [Quit: Leaving]
neshpion has quit [Quit: neshpion]
gix- has quit [Ping timeout: 264 seconds]
andremedeiros has quit [Read error: Connection reset by peer]
andremedeiros has joined #ruby
envex has quit []
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rudd0 has quit [Remote host closed the connection]
m27frogy has quit [Ping timeout: 240 seconds]
tpanarch1st has joined #ruby
ramfjord has joined #ruby
orbyt_ has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
Swyper has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
deviantfero has joined #ruby
<cloud69>
I have a list of URLs that I open with open-uri, process with Nokogiri and save into an array. But later when iterating over that array in a different method, how is it possible to remember which URL the content came from? https://gist.github.com/cloud69420/7bcc1c66398f7e6babfdfc37f9742d22
<drusepth>
just commented some code at you on the gist, there's a bunch of different ways to do it but basically you just want to restructure the data of what you're storing (just the page contents) to also include the url requested in some way
<drusepth>
instead of storing [html, html, html, ...], I edited the code to store [[url, html], [url, html], ...] so you can iterate over it and retrieve both bits of data
<cloud69>
Absolutely spectacular - thank you so so much :)
<cloud69>
Brilliant!
<drusepth>
you could also e.g. have some shared hash stored somewhere that uses URLs as keys to access page content, or ahave a parallel array, or something else, but the gist is you just gotta pick a data structure that supports 2 pieces of data + iterating ;)
jla has joined #ruby
<cloud69>
:D
zacts has quit [Quit: leaving]
deviantfero has quit [Ping timeout: 264 seconds]
ramfjord has joined #ruby
jla has quit [Ping timeout: 240 seconds]
landakram has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
ramfjord has quit [Ping timeout: 264 seconds]
dfucci has joined #ruby
universal has quit [Quit: ZNC 1.6.1+deb1~ubuntu14.04.0 - http://znc.in]
universa1 has joined #ruby
blackmesa has joined #ruby
rzjian has joined #ruby
trautwein1 has joined #ruby
akem has quit [Quit: leaving]
teclator has joined #ruby
al2o3-cr has joined #ruby
Rounin has joined #ruby
fercell has joined #ruby
drusepth has quit [Ping timeout: 240 seconds]
actually1atman is now known as actuallybatman
al2o3-cr has quit [Quit: WeeChat 3.0.1]
vondruch has joined #ruby
Xiti has quit [Quit: Leaving]
Xiti has joined #ruby
cloud69 has quit [Quit: Connection closed for inactivity]
landakram has quit [Ping timeout: 240 seconds]
coniptor has quit [Ping timeout: 264 seconds]
teclator has quit [Remote host closed the connection]
coniptor has joined #ruby
teclator has joined #ruby
supercoven has joined #ruby
split-brain has joined #ruby
teclator has quit [Ping timeout: 245 seconds]
teclator has joined #ruby
teclator has quit [Client Quit]
teclator has joined #ruby
RougeR has joined #ruby
gearnode has joined #ruby
weaksauce has quit [Ping timeout: 276 seconds]
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
gearnode has quit [Ping timeout: 260 seconds]
gearnode has joined #ruby
ramfjord has joined #ruby
yann-kaelig has joined #ruby
dionysus69 has joined #ruby
dionysus69 has quit [Changing host]
dionysus69 has joined #ruby
sombra is now known as aloy
nertzy has quit [Read error: Connection reset by peer]
fercell has quit [Ping timeout: 260 seconds]
fercell has joined #ruby
Rudd0 has joined #ruby
hiroaki_ has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
ianmacd has joined #ruby
fercell has quit [Ping timeout: 240 seconds]
fercell has joined #ruby
phanstig has joined #ruby
akem has joined #ruby
rzjian has quit [Quit: WeeChat 3.0]
jla has joined #ruby
blackmesa has joined #ruby
vondruch has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 272 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
splud has quit [Ping timeout: 265 seconds]
nofxx_ has quit [Ping timeout: 240 seconds]
nofxx has joined #ruby
splud has joined #ruby
splud has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
roadt_ has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
roadt__ has quit [Ping timeout: 276 seconds]
ramfjord has quit [Ping timeout: 265 seconds]
nofxx_ has joined #ruby
fercell has quit [Ping timeout: 240 seconds]
nofxx has quit [Ping timeout: 240 seconds]
fercell has joined #ruby
splud has joined #ruby
henninb has joined #ruby
fercell has quit [Ping timeout: 260 seconds]
phanstig has quit [Quit: Leaving]
splud has quit [Ping timeout: 245 seconds]
fercell has joined #ruby
m27frogy has joined #ruby
DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU has joined #ruby
EdwardIII has quit [Ping timeout: 240 seconds]
lazypwny[m] has joined #ruby
EdwardIII has joined #ruby
fercell has quit [Ping timeout: 276 seconds]
fercell has joined #ruby
jla has quit [Ping timeout: 260 seconds]
blob64 has joined #ruby
andremedeiros has quit [Read error: Connection reset by peer]
<dg1727>
I put that after my "Async do |task_name|"
vondruch has quit [Ping timeout: 240 seconds]
gearnode has joined #ruby
<dg1727>
(also "require 'console'" at the start of the file)
<dg1727>
My Ruby program is a terminal app - no network connections
<dg1727>
When I Ctrl-C to stop my program, there are a couple lines added to the exception printout by Console.logger
<dg1727>
But until then, no output from the logger. Any suggestions on how to get the logger to output status info to the terminal continually?
<dg1727>
I found the source code of Console & confirmed that "debug" seems to be the lowest level, which means that setting the logger to that level should output *all* log messages
<dg1727>
Hmm, some useful-looking debug logging statements are *commented out* in the "async" library... that would explain part of the problem
fercell has quit [Ping timeout: 240 seconds]
fercell has joined #ruby
rkoller has joined #ruby
splud has quit [Ping timeout: 245 seconds]
andremedeiros has quit [Read error: Connection reset by peer]
andremedeiros has joined #ruby
andremedeiros has quit [Read error: Connection reset by peer]
andremedeiros has joined #ruby
cow[moo] has joined #ruby
cuerbot has joined #ruby
Swyper has quit [Ping timeout: 240 seconds]
elcuervo has quit [Ping timeout: 240 seconds]
splud has joined #ruby
postmodern has quit [Quit: Leaving]
marens has joined #ruby
marens has quit [Changing host]
marens has joined #ruby
Xeago has quit [Ping timeout: 256 seconds]
jla has joined #ruby
Xeago has joined #ruby
TCZ has joined #ruby
deviantfero has joined #ruby
vondruch has joined #ruby
gearnode has quit [Ping timeout: 264 seconds]
<User4587_>
Hi, I would like to use the Array#map method with a block variable like block = Proc.new {|x| x * 2}; [1, 2, 3].map(block), how do I do?
<nakilon>
.map &block
blob64 has quit [Read error: Connection reset by peer]
coniptor has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
LeviDuncan has quit [Read error: Connection reset by peer]
shokohsc9 has joined #ruby
shokohsc9 has quit [Client Quit]
howdoi has joined #ruby
shokohsc has joined #ruby
mniip has joined #ruby
coniptor has joined #ruby
jla has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 245 seconds]
gearnode has joined #ruby
ramfjord has joined #ruby
ChmEarl has joined #ruby
jdeen has joined #ruby
Rudd0 has quit [Ping timeout: 264 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
jdeen has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
AndreYuhai has joined #ruby
<AndreYuhai>
How to create a User model with devise that has trackable and other modules. Is there any way to do that when we are doing rails g devise User?
andremedeiros has quit [Quit: ZNC 1.8.2 - https://znc.in]
andremedeiros has joined #ruby
memcorrupt has joined #ruby
memcorrupt has joined #ruby
Xiti` has quit [Quit: Leaving]
keyvan has quit [Ping timeout: 272 seconds]
Xiti has joined #ruby
<nakilon>
what to do with "checking for ruby/thread.h... *** extconf.rb failed ***" when installing the weird gem dependency "patron"? https://dpaste.org/cvM4/slim
ramfjord has quit [Ping timeout: 260 seconds]
jdeen has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Iarfen>
how I can start a ruby file with a repl interpreter? I need that the interpreter remains awaiting for new command after starting it with the program file
<leftylink>
perhaps `irb -r` is what is being asked for here. or if not, perhaps the pry gem is more suitable. since I've never used pry before I'll have to leave it to the interested parties to look it up for themselves
splud has joined #ruby
<nakilon>
leftylink yep, I used irb -r to make a CLI
<leftylink>
fun
TCZ has joined #ruby
split-brain has quit [Remote host closed the connection]
<havenwood>
+1 irb -r
<havenwood>
Iambchop: I agree with ^
<havenwood>
gah
<havenwood>
Iarfen: ^
splud has quit [Ping timeout: 245 seconds]
<nakilon>
Iambchop he doesn't agree with you
<Iarfen>
I've already found the solution, but thanks (it was irb -r)
<nakilon>
-r the file that does something like include MyLibrary and you get a CLI with methods in it
<nakilon>
in my case that was a library with methods to call Facebook Ads Manager API and so using just a single command it became a CLI to Ads Manager
<nakilon>
that didn't even exist officially
<nakilon>
and wasn't even planned to be developed by me either