« Back to channel list

#ruby - 15 July 2016

« Back 1 day Forward 1 day »
[00:00:16] nettoweb: has joined #ruby
[00:01:53] skweek: has joined #ruby
[00:03:55] xall_: has joined #ruby
[00:07:45] mistermocha: has joined #ruby
[00:08:09] modin: has joined #ruby
[00:08:10] ur5us: has joined #ruby
[00:10:57] swills: has joined #ruby
[00:12:00] pontiki: has joined #ruby
[00:12:07] zacts: has joined #ruby
[00:12:26] jsaak: has joined #ruby
[00:14:35] memorasus: has joined #ruby
[00:16:16] SilverKey: has joined #ruby
[00:16:59] ElFerna: has joined #ruby
[00:17:45] nerium: has joined #ruby
[00:17:53] drbrain: shortdudey123: it's unlikely you'll get faster than Zlib::GzipReader for that purpose, it's pretty well optimized
[00:18:09] shortdudey123: hmmm ok, thanks
[00:18:13] drbrain: … on modern ruby you can even run it in multiple threads
[00:18:26] drbrain: it releases the GVL while decompressing bytes
[00:18:32] shortdudey123: yeah, buts its not real multithreading
[00:18:41] drbrain: no, it's real multithreading
[00:18:42] shortdudey123: still only 1 thread is run at a time
[00:18:59] shortdudey123: for jruby yes, cruby no
[00:19:01] drbrain: as many CPUs as you have are decompressing at the same time
[00:19:09] drbrain: I wrote it, I know
[00:19:13] SilverKey: has joined #ruby
[00:19:18] drbrain: well, the patch to add GVL release
[00:19:23] shortdudey123: how do you get around GIL then?
[00:19:34] drbrain: I release the GVL when calling into libz
[00:21:25] shortdudey123: oh gotcha, so threading would help with reading multiple files at once then (from the decompression stand point)?
[00:21:55] drbrain: but, as you noted above ↑ whatever ruby stuff you do is 1 thread at a time
[00:22:13] tristanp: has joined #ruby
[00:22:45] drbrain: when the ruby stuff is small you can get close to using 100% of your cores in one process
[00:22:52] giraki: has joined #ruby
[00:23:05] shortdudey123: the ruby stuff i am doing is pretty small
[00:23:19] Dimik--: has joined #ruby
[00:23:43] mattwashere: has joined #ruby
[00:25:46] drbrain: … here's the commit for GVL release: https://github.com/ruby/ruby/commit/802c468fc6e8291710b785cd099ff288202b9978
[00:27:49] dudepare: has joined #ruby
[00:30:45] ElFerna: has joined #ruby
[00:31:47] nando293921: has joined #ruby
[00:31:49] pwnd_nsfw: has joined #ruby
[00:35:12] pwnd_nsfw`: has joined #ruby
[00:35:15] astrobun_: has joined #ruby
[00:36:13] flashpoint9: has joined #ruby
[00:39:51] al2o3-cr: drbrain: as rb_thread_blocking_region been replaced with rb_thread_call_without_gvl?
[00:42:51] mattwashere: has joined #ruby
[00:43:56] DoctorMonocular: has joined #ruby
[00:45:43] dminuoso: has joined #ruby
[00:46:40] Mia: has joined #ruby
[00:49:02] shiinko: has left #ruby: ("Leaving")
[00:49:40] flashpoint9: has joined #ruby
[00:49:48] yardenbar: has joined #ruby
[00:52:48] xlegoman: has joined #ruby
[00:59:25] tristanp: has joined #ruby
[00:59:54] jenrzzz: has joined #ruby
[00:59:55] jenrzzz: has joined #ruby
[01:05:34] blackmesa: has joined #ruby
[01:06:42] xall_: has joined #ruby
[01:09:03] diprotic: has joined #ruby
[01:09:04] diprotic: has joined #ruby
[01:09:54] mistermocha: has joined #ruby
[01:14:08] JeanCarloMachado: has joined #ruby
[01:14:38] Hobogrammer: has joined #ruby
[01:22:07] coffeecupp: has joined #ruby
[01:23:12] PaulCapestany: has joined #ruby
[01:24:36] eizua: has joined #ruby
[01:25:07] Guest39441: has joined #ruby
[01:26:33] astrobun_: has joined #ruby
[01:27:55] hutch34: has joined #ruby
[01:29:06] postmodern: has joined #ruby
[01:29:39] mistermocha: has joined #ruby
[01:29:41] nettoweb: has joined #ruby
[01:33:07] sumobob_: has joined #ruby
[01:33:25] jsaak: has joined #ruby
[01:37:26] swills: has joined #ruby
[01:43:26] JeanCarloMachado: has joined #ruby
[01:43:28] douglascorrea: has joined #ruby
[01:43:59] tristanp: has joined #ruby
[01:45:54] Sammichmaker: has joined #ruby
[01:46:29] dminuoso: has joined #ruby
[01:47:55] dnewkerk: has joined #ruby
[01:47:58] aspiers: has joined #ruby
[01:48:21] nankyokusei: has joined #ruby
[01:49:30] Ropeney: has joined #ruby
[01:50:17] unreal: has joined #ruby
[01:52:25] ICantCook: has joined #ruby
[01:53:53] xall_: has joined #ruby
[01:58:13] martinium: has joined #ruby
[01:58:14] martinium: has joined #ruby
[01:58:33] l4v2: has joined #ruby
[01:59:37] mattwashere: has joined #ruby
[01:59:40] douglascorrea: has joined #ruby
[02:02:01] cs_0x6373: has joined #ruby
[02:03:25] Guest60828: has joined #ruby
[02:05:18] Mia: has joined #ruby
[02:05:51] ur5us: has joined #ruby
[02:09:37] shakes: has joined #ruby
[02:11:38] nando293921: has joined #ruby
[02:13:24] dhk: has joined #ruby
[02:13:54] Guest60828: has joined #ruby
[02:14:48] Meow-J: has joined #ruby
[02:16:56] Guest39441: has joined #ruby
[02:17:57] tristanp: has joined #ruby
[02:21:22] rickmasta: has joined #ruby
[02:22:04] ankhers: has joined #ruby
[02:22:07] znz_jp: has joined #ruby
[02:24:12] ericsupreme: has joined #ruby
[02:28:14] Robtop__: has joined #ruby
[02:28:16] Guest39441: has joined #ruby
[02:32:37] roamingdog: has joined #ruby
[02:33:32] enterprisey: has joined #ruby
[02:34:15] Guest60828: has joined #ruby
[02:34:23] rickmasta: has joined #ruby
[02:36:53] nerium: has joined #ruby
[02:39:43] leea: has joined #ruby
[02:45:45] Guest39441: has joined #ruby
[02:46:06] Axy: has joined #ruby
[02:46:42] moeabdol: has joined #ruby
[02:47:18] jishankai: has joined #ruby
[02:48:28] dminuoso: has joined #ruby
[02:48:45] macsteps: has joined #ruby
[02:50:59] flashpoint9: has joined #ruby
[02:52:14] Mirubiri: has joined #ruby
[02:58:05] enterprisey: has joined #ruby
[02:58:13] douglasc_: has joined #ruby
[03:00:46] Dimik--: has joined #ruby
[03:01:31] mattwashere: has joined #ruby
[03:02:11] moeabdol: has joined #ruby
[03:04:49] arescorpio: has joined #ruby
[03:06:52] auzty: has joined #ruby
[03:07:25] xall: has joined #ruby
[03:09:31] jphase: has joined #ruby
[03:10:28] ruby-lang079: has joined #ruby
[03:10:54] rickmasta: has joined #ruby
[03:11:09] adam12: ruby-lang079: o/
[03:12:21] ruby-lang079: i'm alone study rails
[03:12:28] ruby-lang079: this it correct
[03:12:29] ruby-lang079: https://robots.thoughtbot.com/the-perils-of-uniqueness-validations
[03:13:06] nando293921: has joined #ruby
[03:14:27] moeabdol1: has joined #ruby
[03:17:21] hahuang61: has joined #ruby
[03:18:31] flashpoint9: has joined #ruby
[03:20:36] rhg135: has joined #ruby
[03:21:51] macsteps: has joined #ruby
[03:27:13] ICantCook: has joined #ruby
[03:27:34] treaki__: has joined #ruby
[03:29:21] Guest39441: has joined #ruby
[03:30:50] rickmasta: has joined #ruby
[03:31:38] jsaak: has joined #ruby
[03:38:28] Gooer: has joined #ruby
[03:42:42] gkop: has joined #ruby
[03:48:24] zacts: has joined #ruby
[03:49:13] nankyokusei: has joined #ruby
[03:49:13] dminuoso: has joined #ruby
[03:49:20] flashpoint9: has joined #ruby
[03:50:38] howdoi: has joined #ruby
[03:52:16] tristanp: has joined #ruby
[03:52:29] rickmasta: has joined #ruby
[03:52:42] hk238: has joined #ruby
[03:55:20] pwnd_nsfw`: has joined #ruby
[03:58:50] p0p0pr37: has joined #ruby
[03:59:38] mattwashere: has joined #ruby
[04:00:30] nando293921: has joined #ruby
[04:02:36] macsteps: has joined #ruby
[04:02:49] anoyeee: has joined #ruby
[04:03:37] armyriad: has joined #ruby
[04:04:23] gix: has joined #ruby
[04:05:28] rickmasta: has joined #ruby
[04:08:22] justbleed: has joined #ruby
[04:08:27] yadobujo: has joined #ruby
[04:09:00] conta: has joined #ruby
[04:09:50] _djbkd: has joined #ruby
[04:13:14] Mirubiri: has joined #ruby
[04:14:42] drewo: has joined #ruby
[04:15:53] shevy: now I had an idea for a module
[04:16:01] shevy: given the input argument, say colours
[04:16:17] tmtwd: has joined #ruby
[04:16:44] shevy: autogenerate: @use_colours; the query method(s) use_colours? and use_colours; and the methods enable_colours() and disable_colours() additionally. so sorta a bit like a more verbose attr_accessor, adding more methods
[04:17:26] HoloIRCUser: has joined #ruby
[04:17:33] yfeldblum: has joined #ruby
[04:19:45] govg: has joined #ruby
[04:23:05] Guest60828: has joined #ruby
[04:24:01] Rodya_: has joined #ruby
[04:25:41] Mirubiri: has left #ruby: ()
[04:26:14] sumobob: has joined #ruby
[04:31:11] matp: has joined #ruby
[04:33:46] fredolinhares: has joined #ruby
[04:33:58] rickmasta: has joined #ruby
[04:34:05] A_Drone: has joined #ruby
[04:34:21] drewo: has joined #ruby
[04:37:58] shevy: ok so that is not so trivial...
[04:41:04] shevy: https://gist.github.com/shevegen/853361b2e731b0de041f1012911df4ec this code does not work as desired
[04:41:21] jphase: has joined #ruby
[04:41:35] shevy: I am trying to add, by default @colours = true to all from class Bar instantiated objects
[04:41:58] shevy: hmmm I guess I am in the wrong self
[04:43:12] Guest60828: has joined #ruby
[04:45:56] dnewkerk: has joined #ruby
[04:50:01] dminuoso: has joined #ruby
[04:50:27] xall: has joined #ruby
[04:52:07] pawnbox: has joined #ruby
[04:53:10] ur5us: has joined #ruby
[04:54:16] dminuoso: has joined #ruby
[04:55:15] dminuoso: has joined #ruby
[04:56:49] rickmasta: has joined #ruby
[05:03:31] alfiemax: has joined #ruby
[05:05:27] A_Drone: has joined #ruby
[05:06:43] jsaak: has joined #ruby
[05:08:07] mistermocha: has joined #ruby
[05:08:10] A_Drone: has joined #ruby
[05:11:39] tristanp: has joined #ruby
[05:16:11] cd-rum: has joined #ruby
[05:16:12] dnewkerk: has left #ruby: ()
[05:17:14] Cohedrin: has joined #ruby
[05:20:24] galeido: has joined #ruby
[05:20:34] LoneHerm_: has joined #ruby
[05:24:01] alfiemax: has joined #ruby
[05:29:01] xall: has joined #ruby
[05:29:59] postmodern: has joined #ruby
[05:30:07] elifoster: has joined #ruby
[05:31:55] EasyCo: has joined #ruby
[05:33:04] EasyCo: Hi team, is there a method kind of like all? where I can iterate through an array of objects and check that an attribute value is the same across all objects?
[05:33:33] leea: has joined #ruby
[05:34:13] Radar: EasyCo: .all? { |e| e["key"] == value }
[05:34:55] EasyCo: Radar, more along the lines of: [obj, obj, obj].each { |previous_object, current_object| previous_object.amount == curent_object.amount }
[05:35:06] drewo: has joined #ruby
[05:36:00] Radar: https://gist.github.com/radar/1ce7ca34308e8d54b0d5670325b6fa07
[05:36:15] anoyeee: has joined #ruby
[05:37:28] pawnbox: has joined #ruby
[05:38:02] EasyCo: Cheers Radar, that'll definitely work. So I guess there's no all? meets inject(start_value).
[05:38:54] Radar: not that I am aware of
[05:41:16] Dragon535: has joined #ruby
[05:44:42] aufi: has joined #ruby
[05:46:11] drewo: has joined #ruby
[05:50:07] nankyokusei: has joined #ruby
[05:50:33] rickmasta: has joined #ruby
[05:50:37] flashpoint9: has joined #ruby
[05:51:40] vinleod: has joined #ruby
[05:51:43] djbkd_: has joined #ruby
[05:53:11] pawnbox: has joined #ruby
[05:55:10] pawnbox: has joined #ruby
[05:59:53] drewo: has joined #ruby
[06:00:09] Xiti: has joined #ruby
[06:00:23] xlegoman: has joined #ruby
[06:02:53] raeoks: has joined #ruby
[06:06:17] hipertracker: has joined #ruby
[06:06:38] yadobujo: has joined #ruby
[06:07:17] yadobujo: has joined #ruby
[06:16:34] tmtwd: has joined #ruby
[06:16:46] alfiemax: has joined #ruby
[06:18:43] Xiti: has joined #ruby
[06:23:28] anoyeee: has joined #ruby
[06:24:01] dionysus69: has joined #ruby
[06:28:52] firstdayonthejob: has joined #ruby
[06:31:58] mistermocha: has joined #ruby
[06:33:14] andikr: has joined #ruby
[06:34:22] LuckyABA: has joined #ruby
[06:38:40] astrobun_: has joined #ruby
[06:40:48] anoyeee: has joined #ruby
[06:41:24] tristanp: has joined #ruby
[06:41:34] douglascorrea: has joined #ruby
[06:43:11] benlieb: has joined #ruby
[06:43:37] roamingdog: has joined #ruby
[06:45:18] drewo: has joined #ruby
[06:47:40] drbrain: al2o3-cr: or, renamed?
[06:49:19] Log1x: has joined #ruby
[06:50:31] DoubleMalt: has joined #ruby
[06:50:35] solars: has joined #ruby
[06:51:56] flashpoint9: has joined #ruby
[06:52:51] al2o3-cr: yeah, looks like rb_thread_blocking_region is dead
[06:53:58] jsaak: has joined #ruby
[06:54:29] pawnbox: has joined #ruby
[06:54:29] Guest60828: has joined #ruby
[06:55:56] yfeldblum: has joined #ruby
[06:55:57] yadobujo: has joined #ruby
[06:56:42] pawnbox: has joined #ruby
[06:57:41] anoyeee: has joined #ruby
[06:57:48] joconcepts: has joined #ruby
[06:59:56] finnnnnnnnnnn: has joined #ruby
[07:03:18] codecop: has joined #ruby
[07:06:33] Gooer: has joined #ruby
[07:08:11] biberu: has joined #ruby
[07:12:39] hipertracker: has joined #ruby
[07:13:15] TomyWork: has joined #ruby
[07:13:25] k3rn31: has joined #ruby
[07:14:01] stardiviner: has joined #ruby
[07:14:17] blackmesa: has joined #ruby
[07:15:29] Hounddog: has joined #ruby
[07:16:29] lkb: has joined #ruby
[07:16:39] budhram1: has joined #ruby
[07:18:25] finnnnnnnnnnn: has joined #ruby
[07:18:46] vondruch: has joined #ruby
[07:19:17] aupadhye: has joined #ruby
[07:19:36] al2o3-cr: shevy: you could do something like this: https://eval.in/605665 although i'm not sure exactly what you have in mind.
[07:20:32] al2o3-cr: or use an array and set a default value
[07:21:15] hahuang61: has joined #ruby
[07:21:22] Devalo: has joined #ruby
[07:21:30] edwinvdgraaf: has joined #ruby
[07:23:20] pawnbox: has joined #ruby
[07:24:58] al2o3-cr: https://eval.in/605667 or like this
[07:25:41] pawnbox: has joined #ruby
[07:25:51] c0mrad3: has joined #ruby
[07:26:12] Ishido: has joined #ruby
[07:26:15] blaxter: has joined #ruby
[07:26:54] anisha_: has joined #ruby
[07:30:18] Log1x: has joined #ruby
[07:34:19] aswen: has joined #ruby
[07:35:29] exadeci: has joined #ruby
[07:36:13] Silthias: has joined #ruby
[07:36:15] araujo_: has joined #ruby
[07:40:14] Devalo: has joined #ruby
[07:44:17] bluOxigen: has joined #ruby
[07:44:26] roamingdog: has joined #ruby
[07:44:37] ramfjord: has joined #ruby
[07:45:43] mistermocha: has joined #ruby
[07:46:09] Macaveli: has joined #ruby
[07:47:01] mikecmpbll: has joined #ruby
[07:47:13] Dragon535: has left #ruby: ()
[07:48:31] ngw: has joined #ruby
[07:49:57] drewo: has joined #ruby
[07:50:10] pawnbox: has joined #ruby
[07:50:35] multi_io: has joined #ruby
[07:50:59] nankyokusei: has joined #ruby
[07:51:09] shevy: I think that solves it, thanks al2o3-cr
[07:52:24] pawnbox: has joined #ruby
[07:53:13] dionysus69: has joined #ruby
[07:54:35] Guest60828: has joined #ruby
[07:58:12] ur5us: has joined #ruby
[07:59:28] budhram1: has joined #ruby
[07:59:59] ElFerna: has joined #ruby
[08:01:07] roshanavand: has joined #ruby
[08:03:01] omphe: has joined #ruby
[08:03:56] duncannz: has joined #ruby
[08:05:38] mikecmpbll: has joined #ruby
[08:06:58] jsaak: has joined #ruby
[08:08:12] tesuji: has joined #ruby
[08:14:30] k13nox: has joined #ruby
[08:14:38] Tachikomas: has joined #ruby
[08:15:35] Dimik: has joined #ruby
[08:16:04] k13nox_: has joined #ruby
[08:17:39] aswen: has joined #ruby
[08:19:10] Gooer: has joined #ruby
[08:20:23] senayar: has joined #ruby
[08:20:24] Devalo: has joined #ruby
[08:21:26] frozengeek: has joined #ruby
[08:21:57] ICantCook: has joined #ruby
[08:22:01] hahuang61: has joined #ruby
[08:22:43] frozengeek: hey all, I am having an issue, I am trying to (programatically) figure out the system-wide gemdir on el7, but "Gem.dir" keeps giving me the user gem dir.
[08:23:23] Log1x: has joined #ruby
[08:23:52] Guest60828: has joined #ruby
[08:25:18] jaruga___: has joined #ruby
[08:25:48] jackjackdripper: has joined #ruby
[08:27:58] ghr: has joined #ruby
[08:29:54] frozengeek: has joined #ruby
[08:30:12] Pumukel: has joined #ruby
[08:31:40] workmad3: has joined #ruby
[08:32:32] moeabdol1: has joined #ruby
[08:34:05] tristanp: has joined #ruby
[08:34:36] Gooer: has joined #ruby
[08:36:22] mikecmpb_: has joined #ruby
[08:36:34] workmad3_: has joined #ruby
[08:37:00] blackgoat: has joined #ruby
[08:37:37] Kedare: has joined #ruby
[08:39:33] moeabdol1: has joined #ruby
[08:43:27] benlieb: has joined #ruby
[08:43:57] douglascorrea: has joined #ruby
[08:43:59] drewo: has joined #ruby
[08:47:21] Couch: has joined #ruby
[08:47:43] nanoyak: has joined #ruby
[08:49:41] bigkevmcd: has joined #ruby
[08:53:39] flashpoint9: has joined #ruby
[08:55:44] koooge_: has joined #ruby
[08:55:45] koooge: has joined #ruby
[08:55:49] koooge__: has joined #ruby
[08:57:02] benlieb: has joined #ruby
[09:02:56] snowy: has joined #ruby
[09:03:06] tvw: has joined #ruby
[09:07:25] MEATCHICKEN: has joined #ruby
[09:07:41] yfeldblum: has joined #ruby
[09:09:55] yfeldblum: has joined #ruby
[09:10:17] toretore: has joined #ruby
[09:10:45] yfeldblum: has joined #ruby
[09:13:50] sdothum: has joined #ruby
[09:15:26] budhram1: has joined #ruby
[09:16:57] zeroDi: has joined #ruby
[09:17:04] kavanagh: has joined #ruby
[09:18:00] troulouliou_div2: has joined #ruby
[09:22:26] DevMagpie: has joined #ruby
[09:24:09] hahuang61: has joined #ruby
[09:25:08] codecop: has joined #ruby
[09:27:33] armyriad: has joined #ruby
[09:27:58] johnny56_: has joined #ruby
[09:28:32] pawnbox: has joined #ruby
[09:30:39] pawnbox: has joined #ruby
[09:32:23] jswe: has joined #ruby
[09:32:49] Guest60828: has joined #ruby
[09:34:21] armyriad: has joined #ruby
[09:37:00] lxsameer: has joined #ruby
[09:38:07] drewo: has joined #ruby
[09:39:05] armyriad: has joined #ruby
[09:47:15] coffeecupp: has joined #ruby
[09:49:14] indigomez: has joined #ruby
[09:49:31] indigomez: hi!! When SQLite3::Database.new from scratch, how do I specify a subdirectory from the source file to create the database there rather than in the root folder? Thanks!
[09:50:13] mistermocha: has joined #ruby
[09:51:50] nankyokusei: has joined #ruby
[09:51:51] jhass: just do it? pass a path
[09:52:46] indigomez: jhass: I do not find it in the documentation. Do you mean something like this?: SQLite3::Database.new ('name', path: 'path')?
[09:53:16] jhass: just SQLite3::Database.new "foo/bar.db"
[09:53:45] jhass: or SQLite3::Database.new File.join(__dir__, "foo", "bar.db")
[09:53:53] Drakx: has joined #ruby
[09:54:05] mikecmpbll: has joined #ruby
[09:54:49] indigomez: thanks jhass, this worked: SQLite3::Database.new("db/#{db_name}")
[09:55:18] jhass: note it's relative to the current working directory, not the current ruby file
[09:55:53] jhass: ?crosspost indigomez
[09:55:53] ruby[bot]: indigomez: Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[09:56:00] flashpoint9: has joined #ruby
[09:57:54] nixmaniack: has joined #ruby
[09:58:32] indigomez: my apologies and thanks for the lesson
[10:00:15] neohunter: has joined #ruby
[10:00:16] stardiviner: has joined #ruby
[10:01:32] roamingdog: has joined #ruby
[10:02:17] n1x: has joined #ruby
[10:05:03] Gooer: has joined #ruby
[10:07:49] flashpoint9: has joined #ruby
[10:09:16] Meow-J: has joined #ruby
[10:10:46] budhram1: has joined #ruby
[10:13:32] budhram1: has left #ruby: ()
[10:13:34] bkxd: has joined #ruby
[10:14:22] devyn: has joined #ruby
[10:15:53] dionysus69: has joined #ruby
[10:16:02] last_staff: has joined #ruby
[10:17:38] yfeldblum: has joined #ruby
[10:17:39] giz|work: has joined #ruby
[10:17:41] Drakx: has joined #ruby
[10:18:04] freerobby: has joined #ruby
[10:20:32] harfangk: has joined #ruby
[10:20:35] rickmasta: has joined #ruby
[10:21:46] kavanagh: has joined #ruby
[10:23:35] alfiemax: has joined #ruby
[10:24:02] c0mrad3: has joined #ruby
[10:24:47] hahuang61: has joined #ruby
[10:25:41] workmad3_: has joined #ruby
[10:31:10] Log1x: has joined #ruby
[10:32:00] yardenbar: has joined #ruby
[10:32:17] drewo: has joined #ruby
[10:34:26] Wildfyr: has joined #ruby
[10:34:26] Wildfyr: has joined #ruby
[10:38:57] johnmilton: has joined #ruby
[10:40:33] johnmilton: has joined #ruby
[10:41:14] Daneel: drbrain, thank you for your answer yesterday . i'll test on windows
[10:42:47] xall: has joined #ruby
[10:42:59] johnmilton: has joined #ruby
[10:44:13] colegatron_origi: has joined #ruby
[10:44:19] conta: has joined #ruby
[10:44:20] johnmilton: has joined #ruby
[10:45:26] tvw: has joined #ruby
[10:45:33] existensil: has joined #ruby
[10:45:47] douglascorrea: has joined #ruby
[10:46:45] consti: has joined #ruby
[10:46:53] yfeldblum: has joined #ruby
[10:47:06] johnmilton: has joined #ruby
[10:47:25] DrCode: has joined #ruby
[10:47:31] johnmilton: has joined #ruby
[10:49:00] yqt: has joined #ruby
[10:50:17] pawnbox_: has joined #ruby
[10:50:52] Bish: whats wrong with config.ru what is this run bs
[10:51:09] Bish: why do i need to invoke the webserver in this weird way, why can't it be
[10:51:09] mistermocha: has joined #ruby
[10:51:53] johnmilton: has joined #ruby
[10:53:22] tristanp: has joined #ruby
[10:54:22] Guest60828: has joined #ruby
[10:55:47] Ropeney: has joined #ruby
[10:56:11] pmodin: has joined #ruby
[10:58:18] Log1x: has joined #ruby
[10:59:37] blackmesa: has joined #ruby
[10:59:41] `tim`: has joined #ruby
[10:59:51] darix: Bish: how do run the config.ru file afterwards?
[11:00:29] whiteline: has joined #ruby
[11:01:16] shevy: mighty russian files
[11:01:19] rodfersou: has joined #ruby
[11:01:42] shevy: Bish if it helps you, I avoid .ru files :D
[11:03:04] Ropeney: has joined #ruby
[11:03:23] Ropeney: has joined #ruby
[11:03:57] apeiros: Bish: why don't you read docs? why do you call anything you haven't remotely understood bs? why don't you try to understand ideas behind software?
[11:05:57] giz|work: .ru is opened with your orger
[11:06:12] giz|work: it can display .ru orgs just fine
[11:06:58] zacstewart: has joined #ruby
[11:08:28] whiteline: has joined #ruby
[11:09:11] elepedus: has joined #ruby
[11:09:39] JeanCarloMachado: has joined #ruby
[11:12:57] ins64: has joined #ruby
[11:13:07] ur5us: has joined #ruby
[11:15:39] Bish: apeiros: well, i have looken into that manner before, when i decided for webmachine
[11:15:47] Bish: and i knew i hated it
[11:16:06] apeiros: seems to me you mostly hate it out of ignorance
[11:16:09] Bish: and today i wanted to look into rack again, and see this config.ru cra
[11:16:17] Bish: i just cannot remember
[11:16:35] Bish: and even the fact that i only find this config stuff
[11:18:00] AngryBuzzy: has joined #ruby
[11:18:16] Wildfyr: >> puts 'test
[11:18:17] ruby[bot]: Wildfyr: # => /tmp/execpad-e2383f8be362/source-e2383f8be362:2: unterminated string meets end of file ...check link for more (https://eval.in/605870)
[11:18:20] Wildfyr: >> puts 'test'
[11:18:21] ruby[bot]: Wildfyr: # => test ...check link for more (https://eval.in/605871)
[11:18:34] Bish: successful test?
[11:18:50] apeiros: ?experiment Wildfyr
[11:18:50] ruby[bot]: Wildfyr: Please use your local irb or pry (see ?pry) to experiment, ruby[bot]'s eval functionality is for demonstration purposes only.
[11:18:56] Bish: you only got it wrong once tho, gj
[11:19:19] ruby[bot]: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
[11:19:35] Mia: has joined #ruby
[11:19:36] Mia: has joined #ruby
[11:25:49] hahuang61: has joined #ruby
[11:26:23] drewo: has joined #ruby
[11:29:53] hk238: has joined #ruby
[11:35:25] nixmaniack: has joined #ruby
[11:36:17] benlieb: has joined #ruby
[11:39:47] vdamewood: has joined #ruby
[11:41:50] apeiros: moin adaedra
[11:41:50] ldnunes: has joined #ruby
[11:43:13] Hanmac: has joined #ruby
[11:43:33] roamingdog: has joined #ruby
[11:43:37] hipertracker: has joined #ruby
[11:46:11] mdw: has joined #ruby
[11:47:21] mdw: has joined #ruby
[11:51:53] mistermocha: has joined #ruby
[11:52:02] jsaak: has joined #ruby
[11:52:41] nankyokusei: has joined #ruby
[11:53:35] hipertracker: has joined #ruby
[11:54:20] pawnbox: has joined #ruby
[11:56:41] bruce_lee: has joined #ruby
[11:56:41] bruce_lee: has joined #ruby
[11:58:03] marr: has joined #ruby
[11:58:54] AngryBuzzy: has joined #ruby
[11:59:00] JeanCarloMachado: has joined #ruby
[11:59:20] synthroid: has joined #ruby
[12:00:50] Ishido: has joined #ruby
[12:01:03] synthroid: has joined #ruby
[12:01:32] tvw: has joined #ruby
[12:02:15] LoneHerm_: has joined #ruby
[12:03:33] stardiviner: has joined #ruby
[12:03:39] King_DuckZ: has joined #ruby
[12:05:02] King_DuckZ: hi, what's the best way for a script to call itself recursively with a different working dir? I'm thinking to do Dir.chdir(blah){|p| Kernel.system(__FILE__)}
[12:05:52] King_DuckZ: but what if the user didn't invoke my script directly? ie: instead of ./my_script he did ruby my_script
[12:05:56] ruby-lang364: has joined #ruby
[12:05:59] ruby-lang364: hi anyone here
[12:06:29] omphe: has joined #ruby
[12:06:30] ruby-lang364: I have a question
[12:06:34] ruby-lang364: Anyone here can tell me?
[12:07:22] King_DuckZ: ruby-lang364: you have a question.
[12:08:27] mistermocha: has joined #ruby
[12:08:36] omphe: has joined #ruby
[12:08:37] ljc: has joined #ruby
[12:08:41] shevy: King_DuckZ you have two parameters
[12:09:09] ruby-lang364: actually am doing this in my controller
[12:09:14] ruby-lang364: users[index]["created_at"] ? DateTime.parse(users[index]["created_at"]).strftime("%A, %d %b %Y %l:%M %p") : "", users[index]["confirmed_at"] ? DateTime.parse(users[index]["confirmed_at"]).strftime("%A, %d %b %Y %l:%M %p") : "", users[index]["last_login_at"] ? DateTime.parse(users[index]["last_login_at"]).strftime("%A, %d %b %Y %l:%M %p") : "",
[12:09:15] shevy: __FILE__ == $PROGRAM_NAME
[12:09:23] jhass: ?gist ruby-lang364
[12:09:24] ruby[bot]: ruby-lang364: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[12:09:28] jhass: ?rails ruby[bot]
[12:09:28] ruby[bot]: ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[12:09:35] jhass: ?rails ruby-lang364
[12:09:35] ruby[bot]: ruby-lang364: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[12:10:18] ruby-lang364: I want to convert that https://gist.github.com/ijunaidfarooq/64a51c459c3a7844d35b8bede771662f time to Irelands one
[12:10:26] apeiros: King_DuckZ: whether you invoke a script via ./foo or ruby ./foo does not change the working dir
[12:10:48] ruby-lang364: is there anyway to convert it with adding something aftering doing strftime?
[12:11:31] jhass: King_DuckZ: just make sure your toplevel code is like one line of code, MyApp::CLI.new(ARGV), then you can just call it inside Dir.chdir or not
[12:11:36] King_DuckZ: apeiros: I know, I've put the Dir.chdir block for that, but if some user has ruby in a strange place and the shebang line doesn't work, then the way I invoke it does make a difference
[12:11:54] ruby-lang364: any way to do that?
[12:13:03] King_DuckZ: jhass: I see, nice idea
[12:15:10] blackmesa: has joined #ruby
[12:16:42] zacstewart: has joined #ruby
[12:17:59] nixmaniack: has joined #ruby
[12:18:32] mdw7: has joined #ruby
[12:19:00] umdstu: has joined #ruby
[12:20:32] drewo: has joined #ruby
[12:21:19] malconis: has joined #ruby
[12:24:18] ngw: has joined #ruby
[12:25:09] tristanp: has joined #ruby
[12:25:28] deadnull: has joined #ruby
[12:26:52] hahuang61: has joined #ruby
[12:27:01] erik_paperik: has joined #ruby
[12:27:50] jschoolcraft: has joined #ruby
[12:27:56] flashpoint9: has joined #ruby
[12:28:28] erik_paperik_: has joined #ruby
[12:28:47] aswen: has joined #ruby
[12:30:44] lacce: has joined #ruby
[12:32:03] M-shine: has joined #ruby
[12:33:33] indigomez: has joined #ruby
[12:35:45] hipertracker: has joined #ruby
[12:36:11] pawnbox: has joined #ruby
[12:37:11] aupadhye: has joined #ruby
[12:38:02] ponga: has joined #ruby
[12:38:13] AngryBuzzy: has joined #ruby
[12:38:20] pawnbox: has joined #ruby
[12:39:39] dvinciguerra_: has joined #ruby
[12:52:28] mistermocha: has joined #ruby
[12:53:03] sts: has joined #ruby
[12:53:21] sts: hello folks. Anyone knows how I could refactor this? https://gist.github.com/anonymous/2eaaf30673cca7b7564a926ca40a6b67
[12:53:58] apeiros: lock.strip, and then change your split expression so it removes whitespace too.
[12:54:17] ytti: lock.split(',')
[12:54:30] ytti: lock.split(',').map { |e| e.strip! }
[12:54:47] apeiros: ytti: that's broken
[12:55:02] ytti: maybe evne .map(&:strip)
[12:55:17] `tim`: has joined #ruby
[12:55:21] sts: e might be nil or?
[12:55:29] apeiros: PSA: don't use bang methods if you want the return value
[12:55:39] apeiros: strip! e.g. returns nil if nothing was changed.
[12:55:46] ytti: [3] pry(main)> "foo , bar,baz, zum".split(',').map(&:strip)
[12:55:47] ytti: => ["foo", "bar", "baz", "zum"]
[12:55:55] apeiros: >> lock="hello ,world"; lock.split(',').map { |e| e.strip! }
[12:55:56] ruby[bot]: apeiros: # => ["hello", nil] (https://eval.in/605945)
[12:56:41] apeiros: anyway, I'd go with better regex for split over map+split
[12:57:05] ytti: i would only ever do regexp, if i can't find other solution
[12:57:19] ytti: i think split on char + map is lot cleaner than regexp
[12:57:22] M-Kodo: has joined #ruby
[12:57:28] apeiros: I think otherwise
[12:57:36] ytti: ack, obviously subjective
[12:58:50] apeiros: of course there's still the question why lock isn't properly sanitized. maybe the problem should be solved earlier in the chain.
[12:59:50] harfangk: has joined #ruby
[13:00:56] imperator: has joined #ruby
[13:03:38] mikecmpb_: has joined #ruby
[13:05:40] sai: has joined #ruby
[13:08:35] AlexJakeGreen: has joined #ruby
[13:10:32] nerium: has joined #ruby
[13:14:00] iamawesome: has joined #ruby
[13:14:08] iamawesome: has left #ruby: ()
[13:14:43] drewo: has joined #ruby
[13:14:47] troyronda: has joined #ruby
[13:16:33] JeanCarloMachado: has joined #ruby
[13:17:27] douglascorrea: has joined #ruby
[13:20:12] rickmasta: has joined #ruby
[13:21:20] elepedus: has joined #ruby
[13:25:43] edwinvdg_: has joined #ruby
[13:28:12] Kedare: has joined #ruby
[13:31:31] roamingdog: has joined #ruby
[13:33:11] minimalism: has joined #ruby
[13:33:41] hutch34: has joined #ruby
[13:35:14] JeanCarloMachado: has joined #ruby
[13:38:08] rippa: has joined #ruby
[13:43:07] Guest60828: has joined #ruby
[13:44:19] mrbignum: has joined #ruby
[13:46:32] gregf_: >> "foo , bar,baz, zum".scan(/(\w+)(?:\s*,\s*)?/)
[13:46:33] ruby[bot]: gregf_: # => [["foo"], ["bar"], ["baz"], ["zum"]] (https://eval.in/605967)
[13:47:06] troyronda: has left #ruby: ()
[13:48:24] matp: has joined #ruby
[13:49:43] kavanagh: has joined #ruby
[13:50:48] snowy: has joined #ruby
[13:51:03] AlexRussia: has joined #ruby
[13:51:07] apeiros: gregf_: assumes the values are only \w+
[13:53:06] nerium: has joined #ruby
[13:53:32] mistermocha: has joined #ruby
[13:53:33] nankyokusei: has joined #ruby
[13:54:07] apeiros: I *think* the correct solution with scan would be .scan(/[^\s,](?:(?!\s*(?:,|\z)).)*/)
[13:54:26] apeiros: but that's already quite a bit more complex and brittle. so there I'd actually prefer split+map+strip :)
[13:54:32] flashpoint9: has joined #ruby
[13:54:49] Xiti: has joined #ruby
[13:56:18] kaleido: regex is expensive anyways, isnt it?
[13:56:37] flughafen_: has joined #ruby
[13:56:37] apeiros: as a blanket statement, no
[13:56:58] apeiros: there's plenty of cases where even a complex regex is less expensive than say ruby's method call overhead.
[13:58:40] mattwashere: has joined #ruby
[13:58:55] kaleido: interesting. its still painful to look at :)
[13:58:56] Rodya_: has joined #ruby
[14:00:01] JeanCarloMachado: has joined #ruby
[14:00:37] alfiemax: has joined #ruby
[14:01:42] TheHodge: has joined #ruby
[14:02:28] cdg: has joined #ruby
[14:03:01] roamingdog: has joined #ruby
[14:03:49] diegoviola: has joined #ruby
[14:05:33] nadir: has joined #ruby
[14:05:43] augcesar: has joined #ruby
[14:06:50] M-mistake: has joined #ruby
[14:06:51] ngw: has joined #ruby
[14:07:00] tristanp: has joined #ruby
[14:07:27] catphish: has joined #ruby
[14:08:18] gregf_: apeiros: ah - sure ;)
[14:08:30] catphish: i'm trying to track down a memory leak, i'm using "ObjectSpace.dump_all" but the sum of the "bytesize" in the output doesn't seem close to my process's actual resident size? am i missing something obvious?
[14:08:48] drewo: has joined #ruby
[14:10:52] gduine: has joined #ruby
[14:11:33] catphish: i wasn't expecting an exact match, but the rss is about 15x larger than the objects reported
[14:12:06] fmcgeough: has joined #ruby
[14:15:37] swills: has joined #ruby
[14:18:45] Dysp: has joined #ruby
[14:20:03] gomix: has joined #ruby
[14:20:35] Dysp: Mjello. I am writing some plugins that are to be used in rails by my friend. I am trying to expand on some basic classes, like adding a sum method to Array. But if my friend passes strings, obviously the code will break. How should I approach this and handle the error? Should I use the built in error class or is that ill-adviced? Should I build my own error-kind class to communicate to him what he is doing wrong?
[14:21:19] SilverKey: has joined #ruby
[14:22:17] Papierkorb: Dysp: Rails uses ActiveSupport which already adds #sum to Enumerable and thus Array
[14:22:32] Dysp: That was not my question :)
[14:22:49] Dysp: And I know. But a part of me learning how to program is to do things myself from the beginning.
[14:23:31] Dysp: Then when the day arrives when I have to implement more advanced stuff than "sum", I have already learnt how to test, code and implement such methods.
[14:23:45] Papierkorb: for rails specific questions ask in #RubyOnRails
[14:23:53] Dysp: It is not a rails question.
[14:24:04] Papierkorb: Why are you talking about rails plugins and #sum then?
[14:24:23] Dysp: I am talking about coding a plugin that has zero to do with Rails.
[14:24:51] Dysp: That it is going to be used in Rails is not of any importance; I just added the information because it sometimes help to clarify context.
[14:27:52] hahuang61: has joined #ruby
[14:27:55] benlieb: has joined #ruby
[14:28:27] mikecmpbll: has joined #ruby
[14:28:43] eljimmy: has joined #ruby
[14:30:06] bodgix: has joined #ruby
[14:31:16] JeanCarloMachado: has joined #ruby
[14:31:39] naftilos76: has joined #ruby
[14:34:11] Rodya_: has joined #ruby
[14:34:35] Mia: has joined #ruby
[14:35:48] bodgix: hello all. I'm struggling with a trivial problem. I want to write a long regexp in multiple lines. but I don't know why it's not matching when I write it in multiple lines with %r{}xm it works if I write it in a single line using //m : https://gist.github.com/anonymous/6ac84c4b016b9060153351ec205894c3
[14:36:34] yqt: has joined #ruby
[14:36:41] mgiagante: has joined #ruby
[14:37:04] spiette: has joined #ruby
[14:38:19] Mia: has joined #ruby
[14:38:19] Mia: has joined #ruby
[14:38:58] apeiros: bodgix: yeah, um, can you like paste readable code instead of your irb session?
[14:42:34] llua: has joined #ruby
[14:42:49] johnny56_: has joined #ruby
[14:44:17] craigp: has joined #ruby
[14:47:38] codecop: has joined #ruby
[14:51:20] flashpoint9: has joined #ruby
[14:53:17] ngw: has joined #ruby
[14:54:58] edwardly: has joined #ruby
[14:54:59] edwardly: has joined #ruby
[14:55:56] SilverKey: has joined #ruby
[14:57:47] LuckyABA: has joined #ruby
[15:00:26] silverdust: has joined #ruby
[15:00:55] tvon: has joined #ruby
[15:01:03] silverdust: How may I add a authorization header to Net::HTTP.get ?
[15:01:46] bodgix: apeiros: ok
[15:02:34] ferr: has joined #ruby
[15:03:01] drewo: has joined #ruby
[15:03:25] gisli: has joined #ruby
[15:04:20] bodgix: https://gist.github.com/anonymous/28df35cb1364d91c12212b290f312b81
[15:06:58] diegoviola: has joined #ruby
[15:08:04] gisli: has left #ruby: ("WeeChat 1.2")
[15:08:09] Es0teric: has joined #ruby
[15:09:02] ferr: has joined #ruby
[15:11:54] aryaching: has joined #ruby
[15:14:13] yadobujo: has joined #ruby
[15:14:15] face: has joined #ruby
[15:14:29] benlieb: has joined #ruby
[15:14:30] craigp: has joined #ruby
[15:15:31] mistermocha: has joined #ruby
[15:17:28] JeanCarloMachado: has joined #ruby
[15:18:27] JakFrist: has joined #ruby
[15:20:46] Log1x: has joined #ruby
[15:20:46] Log1x: has joined #ruby
[15:21:39] yardenbar: has joined #ruby
[15:22:19] silverdust: Where can I fit in a request header in this Net::HTTP.get(URI.parse(some_uri)) ?
[15:27:10] aryaching: has joined #ruby
[15:27:41] tristanp: has joined #ruby
[15:27:57] nerium: has joined #ruby
[15:28:30] kaleido: req.content_type = 'application/json'
[15:28:34] kaleido: something like that?
[15:28:36] hahuang61: has joined #ruby
[15:29:38] kaleido: or maybe req['Cookie'] = "long random string"
[15:30:31] Rodya_: has joined #ruby
[15:31:12] blackmesa: has joined #ruby
[15:33:30] Guest60828: has joined #ruby
[15:34:30] craigp: has joined #ruby
[15:34:46] ntt: has joined #ruby
[15:35:37] aryaching: has joined #ruby
[15:36:00] ntt: Hi, I'm trying to launch a ruby script from crontab. In the script there is IPTABLES="sudo /sbin/iptables". If I try to launch the script from the console all works but if I try lo use crontab the iptables part doesn't works. Someone can help me please? I'm using ruby 1.8.7 with rvm
[15:36:09] hmdkny: has joined #ruby
[15:36:13] banisterfiend: has joined #ruby
[15:36:41] imperator: kaleido, get = Net::HTTP::Get.new(uri); get.add_field(key, value)
[15:36:56] shinnya: has joined #ruby
[15:37:05] imperator: but personally i would just use rest-client, or some other http lib
[15:38:54] TheodoreBe: has joined #ruby
[15:42:59] yardenbar: has joined #ruby
[15:43:33] mattwashere: has joined #ruby
[15:44:55] Vingador: has joined #ruby
[15:47:27] bmurt: has joined #ruby
[15:49:30] mistermocha: has joined #ruby
[15:50:15] [Butch]: has joined #ruby
[15:50:21] apeiros: bodgix: //x ignores spaces, so /slow_query_log_file = slow-log.*/ != /slow_query_log_file = slow-log.*/x
[15:51:00] bodgix: ah got you
[15:51:06] bodgix: of course. thanks apeiros
[15:51:28] bodgix: when I remove x it doesn't work because of \n I presume though
[15:51:48] dionysus69: has joined #ruby
[15:54:06] crameth: has joined #ruby
[15:54:25] nankyokusei: has joined #ruby
[15:54:40] yerek: has joined #ruby
[15:54:50] LoneHerm_: has joined #ruby
[15:55:15] dvinciguerra_: has joined #ruby
[15:55:17] davedev24: has joined #ruby
[15:55:19] cxybeb: has joined #ruby
[15:56:59] cschneid_: has joined #ruby
[15:57:11] drewo: has joined #ruby
[15:58:20] amclain: has joined #ruby
[15:58:53] renderful: has joined #ruby
[16:01:24] freerobby: has joined #ruby
[16:01:35] polishdub: has joined #ruby
[16:02:25] JeanCarloMachado: has joined #ruby
[16:02:49] silverdust: Thanks kaleido , imperator . That gives me a 400 bad request. I'll look into rest-client
[16:03:08] silverdust: With curl and postman I get a proper response
[16:03:12] eljimmy: has joined #ruby
[16:03:58] JakFrist: has joined #ruby
[16:06:11] mattwashere: has joined #ruby
[16:07:47] otherj: has joined #ruby
[16:09:10] Log1x: has joined #ruby
[16:10:06] jhass: bodgix: if you want . to match \n add /m
[16:11:29] mistermocha: has joined #ruby
[16:15:08] macsteps: has joined #ruby
[16:16:55] mistermocha: has joined #ruby
[16:16:59] dvinciguerra_: has joined #ruby
[16:17:18] moeabdol1: has joined #ruby
[16:17:35] xlegoman: has joined #ruby
[16:18:29] Cohedrin: has joined #ruby
[16:19:13] ramfjord: has joined #ruby
[16:20:27] neohunter: What could be the reeason for passanger not picking up the right ruby version when using as apache module?
[16:20:39] neohunter: I've a PassengerRuby with the right version, but is using the default one
[16:20:59] agent_white: has joined #ruby
[16:23:05] brucebag: has joined #ruby
[16:23:25] AngryBuzzy: has joined #ruby
[16:23:39] ntt: Hi, I'm trying to launch a ruby script from crontab. In the script there is IPTABLES="sudo /sbin/iptables". If I try to launch the script from the console all works but if I try lo use crontab the iptables part doesn't works. Someone can help me please? I'm using ruby 1.8.7 with rvm. I think it is a permission problem with the command iptables
[16:24:10] matp: has joined #ruby
[16:27:11] jhass: ntt: I doubt your OS tells you "doesn't work" as error message
[16:27:45] JakFrist: has joined #ruby
[16:28:17] Log1x: has joined #ruby
[16:28:18] Log1x: has joined #ruby
[16:28:42] nixmaniack: has joined #ruby
[16:28:58] SilverKey: has joined #ruby
[16:29:23] ntt: jhass: in the script there is a part where I read the iptables status. If I execute the script from the console variables are correctly filled. If I execute the script from crontab variables are empty. I have something similar to v = (%x[#{IPTABLES} -t mangle -vnx -L '_AUTH_IN_...... )
[16:29:24] tristanp: has joined #ruby
[16:29:38] hahuang61: has joined #ruby
[16:29:47] ntt: where IPTABLES="sudo /sbin/iptables"
[16:29:57] flashpoint9: has joined #ruby
[16:30:08] ntt: obviously the user that runs the script has permission for sudo without password
[16:31:23] miqlas-H: has joined #ruby
[16:31:29] jhass: so what's the log of the crontab run?
[16:32:18] dvinciguerra_: has joined #ruby
[16:32:39] Zackio: has joined #ruby
[16:32:45] ntt: CROND[21797]: (cloud-user) CMD (/bin/bash -l -c 'ruby /home/cloud-user/owcpm/lib/custom_workers/cp_upkeep.rb -d >> /tmp/cp_upkeep.log')
[16:32:51] ntt: jhass: this is the only log
[16:32:56] ascarter: has joined #ruby
[16:33:22] jhass: 2>&1 and share the cp_upkeep.log
[16:33:30] preyalone: has joined #ruby
[16:33:34] macsteps: has joined #ruby
[16:34:36] lkba: has joined #ruby
[16:35:30] jsaak: has joined #ruby
[16:35:39] chip_: has joined #ruby
[16:36:28] blackmesa: has joined #ruby
[16:38:18] ntt: I'm trying with this row in crontab:
[16:38:18] ntt: /bin/bash -l -c 'ruby /home/cloud-user/owcpm/lib/custom_workers/cp_upkeep.rb -d 2>&1 /tmp/cp_upkeep.log'
[16:38:19] ntt: I see that the script start but cp_upkeep.log is empty
[16:38:22] ntt: What I'm wrong?
[16:38:37] SCHAAP137: has joined #ruby
[16:38:48] jhass: 2>&1 only redirects stderr to stdout, it does not redirect stdout
[16:39:10] jhass: that you still need to do separately
[16:39:14] ntt: so.... no errors? How is this possible?
[16:39:29] jhass: not what I said?
[16:40:18] ntt: How can I redirect stderr to stdout and stdout to cp_upkeep.log?
[16:40:45] jhass: you already figured out how to redirect stdout above...
[16:40:56] ntt: yes... But I don't know how to concatenate
[16:41:06] jhass: 2>&1 >> /tmp/cp_upkeep.log
[16:41:13] ntt: ok... I'm sorry
[16:42:16] JeanCarloMachado: has joined #ruby
[16:42:37] dangerousdave: has joined #ruby
[16:43:29] drewo: has joined #ruby
[16:43:34] ntt: jhass.... I see the same as with only stdout redirection
[16:43:37] galeido: has joined #ruby
[16:44:10] DanyC: has joined #ruby
[16:44:13] jhass: try to run the "failing" command directly in the crontab?
[16:44:28] craigp: has joined #ruby
[16:44:39] Tempesta: has joined #ruby
[16:44:40] Tempesta: has joined #ruby
[16:45:35] ntt: http://pastebin.com/aZhhkBQN
[16:45:36] ruby[bot]: ntt: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/bf93ab4086a63c5505c3d7969200c031
[16:45:51] ruby[bot]: ntt: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[16:46:14] cdg: has joined #ruby
[16:46:24] harfangk: has joined #ruby
[16:46:33] armyriad: has joined #ruby
[16:47:21] mdw: has joined #ruby
[16:49:24] ntt: jhass: can you check the gist?
[16:49:49] jhass: remove the grep?
[16:50:25] ntt: r = (%x[#{IPTABLES} -vnL -t nat])
[16:50:25] ntt: I'm trying with this
[16:50:33] ntt: it works if executed from console
[16:50:44] ntt: not if launched with crontab
[16:51:08] TomyLobo: has joined #ruby
[16:54:14] jhass: stop saying "doesn't work", always describe (expected/)actual behavior
[16:55:09] mistermo_: has joined #ruby
[16:55:27] anisha: has joined #ruby
[16:57:41] dvinciguerra_: has joined #ruby
[16:57:52] _djbkd: has joined #ruby
[16:58:34] eljimmy: has joined #ruby
[16:59:09] ntt: jhass: I think the problem is crontab. Created a crontab row = */1 * * * * /bin/bash -c -l 'sudo touch /var/www/html/test_cron' <--- This cronjob is executed with the user "cloud-user". It has sudo permission without insert the password. If I try from bash, I can create the file test_cron without insert the password. If I launch from crontab this doesn't work
[16:59:17] jrafanie: has joined #ruby
[16:59:26] nixmaniack: has joined #ruby
[17:00:05] jhass: time to ask your OS'es help channel then
[17:00:34] Ishido: has joined #ruby
[17:01:50] freerobby1: has joined #ruby
[17:01:58] Terens1: has joined #ruby
[17:02:49] Terens1: what is more suited for ioctl commands? map with c code or use bindata to match structs etc
[17:05:32] Papierkorb: Terens1: I'd try with the ffi gem first, and if I don't get it to work that way, resort to C code
[17:05:42] leea: has joined #ruby
[17:06:27] jsaak: has joined #ruby
[17:08:26] benlieb: has joined #ruby
[17:08:43] King_DuckZ: has left #ruby: ()
[17:08:50] tristanp: has joined #ruby
[17:09:57] jonee: has joined #ruby
[17:10:20] mattwashere: has joined #ruby
[17:11:28] doodlehaus: has joined #ruby
[17:11:28] ruby[bot]: +b doodlehaus!*@*$#ruby-banned
[17:11:29] ruby[bot]: ruby[bot] kicked doodlehaus: banned before
[17:12:12] Rodya_: has joined #ruby
[17:12:20] harfangk: has joined #ruby
[17:12:43] Guest21: has joined #ruby
[17:13:18] Guest21: Hi, is there any way i can dynamically change a model's table_name ? Currently I have defined a block, but it is calculated only once and then cached indefinately.
[17:13:57] Papierkorb: Guest21: what is that model? An ORM model? Something else?
[17:14:11] Guest21: An ActiveRecord::Base model, yes
[17:14:28] AndrewIsHere: has joined #ruby
[17:14:29] Papierkorb: Guest21: try asking in #RubyOnRails
[17:14:41] maikowblue: has joined #ruby
[17:14:43] Guest21: oh I apologise
[17:14:55] tristanp_: has joined #ruby
[17:18:05] mattwashere: has joined #ruby
[17:19:04] iamvery: has joined #ruby
[17:21:48] Ebok: has joined #ruby
[17:22:56] Coldblackice: has joined #ruby
[17:23:53] firstdayonthejob: has joined #ruby
[17:26:26] apeiros: time to add a "?whatareyoutalkingabout"? :)
[17:26:33] apeiros: (how the hell do I shorten that?)
[17:28:12] drbrain: apeiros: o_O
[17:30:38] hahuang61: has joined #ruby
[17:31:00] Guest21: has joined #ruby
[17:32:45] dvinciguerra_: has joined #ruby
[17:32:49] TheodoreBe: has joined #ruby
[17:32:51] Guest60828: has joined #ruby
[17:33:19] dgynn: has joined #ruby
[17:33:32] troulouliou_div2: has joined #ruby
[17:34:08] Rodya_: has joined #ruby
[17:34:51] hahuang65: has joined #ruby
[17:34:56] craigp: has joined #ruby
[17:35:05] SilverKey: has joined #ruby
[17:36:55] JeanCarloMachado: has joined #ruby
[17:37:04] _djbkd: has joined #ruby
[17:37:40] blackmesa: has joined #ruby
[17:39:01] SilverKey: has joined #ruby
[17:40:05] whathappens: has joined #ruby
[17:40:07] TheodoreBe: has joined #ruby
[17:42:47] hipertracker: has joined #ruby
[17:43:07] tristanp: has joined #ruby
[17:44:36] Ebok: has joined #ruby
[17:45:00] bronson: has joined #ruby
[17:48:13] DoubleMalt: has joined #ruby
[17:48:18] theery: has joined #ruby
[17:48:46] pawnbox_: has joined #ruby
[17:48:57] freerobby: has joined #ruby
[17:49:51] Napear: has joined #ruby
[17:50:50] LuckyABA: has joined #ruby
[17:52:49] pontiki: has joined #ruby
[17:53:25] apeiros: leea: heh, yeah
[17:54:00] apeiros: drbrain: as in "please elaborate your context - what framework, tool, etc. are you talking about? if it is rails, then please join #rubyonrails"
[17:54:20] firstdayonthejob: has joined #ruby
[17:55:18] nankyokusei: has joined #ruby
[17:56:33] mistermo_: has joined #ruby
[17:58:30] replay: has joined #ruby
[17:58:56] hipertracker: has joined #ruby
[17:59:14] codecop: has joined #ruby
[18:00:47] johnmilton: has joined #ruby
[18:02:35] JeanCarloMachado: has joined #ruby
[18:03:03] blackmesa: has joined #ruby
[18:03:34] LoneHerm_: has joined #ruby
[18:05:43] kirun: has joined #ruby
[18:05:56] _djbkd: has joined #ruby
[18:06:53] ruby[bot]: Please add more context to your question, what are you doing, why are you doing it, which libraries are involved. Post some code to gist if it clarifies your question.
[18:08:16] chip_: has joined #ruby
[18:11:07] erlend: has joined #ruby
[18:11:25] mikecmpbll: has joined #ruby
[18:11:37] whathappens: has joined #ruby
[18:13:22] elifoster: has joined #ruby
[18:15:31] crystal77: has joined #ruby
[18:16:53] kiyote23_: has joined #ruby
[18:17:35] johnmilton: has joined #ruby
[18:17:57] benlieb: has joined #ruby
[18:20:03] mattwashere: has joined #ruby
[18:20:08] erlend: has joined #ruby
[18:20:13] whathapp_: has joined #ruby
[18:20:15] _djbkd: has joined #ruby
[18:21:40] whathappens: has joined #ruby
[18:23:52] Napear: has left #ruby: ()
[18:24:00] tristanp_: has joined #ruby
[18:28:09] flughafen_: has joined #ruby
[18:28:13] Rodya_: has joined #ruby
[18:30:33] xall: has joined #ruby
[18:30:40] tristanp: has joined #ruby
[18:32:45] hck89: has joined #ruby
[18:32:45] TheSpiderPig: has joined #ruby
[18:32:53] Rodya_: has joined #ruby
[18:32:56] drewo: has joined #ruby
[18:32:59] Guest60828: has joined #ruby
[18:34:34] AngryBuzzy: has joined #ruby
[18:36:21] nerium: has joined #ruby
[18:36:31] mikecmpbll: has joined #ruby
[18:39:09] whathapp_: has joined #ruby
[18:42:06] symm-: has joined #ruby
[18:42:11] TheSpiderPig: has left #ruby: ("Leaving")
[18:43:07] craigp: has joined #ruby
[18:44:14] nankyokusei: has joined #ruby
[18:46:13] Rodya_: has joined #ruby
[18:48:02] Gooer: has joined #ruby
[18:49:42] kaleido: >> a = b ; b = a ; p a + b
[18:49:43] ruby[bot]: kaleido: # => undefined local variable or method `b' for main:Object ...check link for more (https://eval.in/606089)
[18:51:14] omphe: has joined #ruby
[18:52:00] kiyote23: has joined #ruby
[18:52:22] kies: has joined #ruby
[18:52:34] ekinmur: has joined #ruby
[18:52:55] l4v2: has joined #ruby
[18:53:42] alexherbo2: has joined #ruby
[18:54:09] sergey_makagon: has joined #ruby
[18:54:17] l4v2: how do I get a discription of what a method does when I run “string”.method in irb?
[18:55:12] jhass: irb doesn't support that, use ri or pry
[18:55:15] tvon: has joined #ruby
[18:55:17] ruby[bot]: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
[18:55:31] bronson: has joined #ruby
[18:55:36] mistermocha: has joined #ruby
[18:55:43] hipertracker: has joined #ruby
[18:55:51] l4v2: what about rails console? same thing then
[18:56:02] jhass: there's a pry-rails
[18:56:03] moeabdol1: has joined #ruby
[18:57:04] l4v2: Rails console doesn’t give info on the method either then right
[18:57:21] jhass: it's irb by default unless you replace it with pry
[18:58:27] yfeldblum: has joined #ruby
[18:58:52] ramfjord: has joined #ruby
[18:59:10] kaleido: pry makes me smile inside
[18:59:52] moeabdol2: has joined #ruby
[19:01:30] drewo: has joined #ruby
[19:03:21] hackerdude: has joined #ruby
[19:03:40] tristanp: has joined #ruby
[19:04:31] eljimmy: has joined #ruby
[19:04:46] LoneHermit: has joined #ruby
[19:05:24] spudowiar: has joined #ruby
[19:06:01] zacts: has joined #ruby
[19:07:24] dopamean_: has joined #ruby
[19:10:47] Dimik: has joined #ruby
[19:11:38] jackjackdripper: has joined #ruby
[19:11:42] jackjackdripper1: has joined #ruby
[19:11:54] jackjackdripper: has joined #ruby
[19:12:00] freerobby: has joined #ruby
[19:12:03] jackjackdripper: has joined #ruby
[19:12:14] jackjackdripper1: has joined #ruby
[19:12:24] jackjackdripper: has joined #ruby
[19:12:27] govg: has joined #ruby
[19:12:35] jackjackdripper1: has joined #ruby
[19:12:45] jackjackdripper: has joined #ruby
[19:12:53] maloik: has joined #ruby
[19:12:56] jackjackdripper1: has joined #ruby
[19:13:06] jackjackdripper: has joined #ruby
[19:13:06] isberg: has joined #ruby
[19:14:04] gregf: has joined #ruby
[19:15:32] jackjackdripper: has joined #ruby
[19:16:55] mib_mib: has joined #ruby
[19:17:20] mib_mib: does [1,2,3,4].collect.with_index iterate the array only one time? or twice for both enumerators?
[19:17:35] vF3hNGxc47h8: has joined #ruby
[19:18:07] jhass: only once
[19:18:26] mib_mib: also, does this differ from say [1,2,3,4].collect {|x| [x,x]}.select {|x,y| x} which does iterate twice correct?
[19:18:45] mib_mib: but could in fact iterate once no?
[19:19:10] jhass: yes, with some (internal) trickery. That's what #lazy / Enumerator::Lazy does
[19:19:19] postmodern: has joined #ruby
[19:19:30] sai: has joined #ruby
[19:19:31] funrep: hi, how do i define a variable in my controller so that its available in code blocks in the view? (rails 5.0)
[19:19:35] mib_mib: is there a way to convert the second one to only iterate once easily? (without rewriting it to an 'each' statement)
[19:19:42] jhass: ?rails funrep
[19:19:42] ruby[bot]: funrep: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[19:19:47] mib_mib: using lazy
[19:20:06] jhass: sure just call lazy
[19:20:09] jhass: see the docs for it
[19:21:15] mattwashere: has joined #ruby
[19:21:44] dionysus69: has joined #ruby
[19:23:30] Rodya_: has joined #ruby
[19:24:34] Guest60828: has joined #ruby
[19:24:47] hipertracker: has joined #ruby
[19:26:47] colegatron_origi: has joined #ruby
[19:27:10] dennisvennink: has joined #ruby
[19:27:40] troulouliou_div2: has joined #ruby
[19:28:06] nanoyak: has joined #ruby
[19:30:00] troulouliou_div2: has joined #ruby
[19:30:13] nando293921: has joined #ruby
[19:30:55] omphe: has joined #ruby
[19:32:17] hahuang61: has joined #ruby
[19:36:45] Rodya_: has joined #ruby
[19:37:54] l4v2: has joined #ruby
[19:38:19] tristanp_: has joined #ruby
[19:38:28] eqt: has joined #ruby
[19:39:01] Xiti: has joined #ruby
[19:39:40] dionysus70: has joined #ruby
[19:41:38] flashpoint9: has joined #ruby
[19:44:17] craigp: has joined #ruby
[19:45:10] mikecmpbll: has joined #ruby
[19:48:06] dminuoso: has joined #ruby
[19:49:23] blackgoat: has joined #ruby
[19:49:39] solars: has joined #ruby
[19:50:23] ramfjord: has joined #ruby
[19:51:03] mistermocha: has joined #ruby
[19:53:16] roma1: has joined #ruby
[19:53:36] TheodoreBe: has joined #ruby
[19:54:34] flughafen_: has joined #ruby
[19:58:00] mistermocha: has joined #ruby
[20:00:17] Ishido: has joined #ruby
[20:02:16] synthroid: has joined #ruby
[20:04:48] ghr: has joined #ruby
[20:06:24] zacts: I'm getting a ruby-2.3.1 build failure on FreeBSD-11: https://gist.github.com/zacts/d1c2a29ed434abcc25be2fe4cc73a469
[20:06:37] jmarinelli: has joined #ruby
[20:07:58] ramfjord: has joined #ruby
[20:08:08] yuung: i have a large csv file (~1 million lines) that i need to parse and transform with ruby. i don't want to read all of it into memory at once; rather i'd like to stream it. my question is, is there a method in IO that lets me read line-by-line, garbage collecting each old line after its been processed?
[20:08:18] zacts: This is FreeBSD-11 BETA1 btw
[20:08:35] jhass: yuung: CSV.foreach should do that already
[20:08:41] tristanp: has joined #ruby
[20:08:42] asianMike: has joined #ruby
[20:08:48] yuung: jhass, cool - is it guaranteed to gc line by line?
[20:09:07] craigp: has joined #ruby
[20:09:12] jhass: invoking the gc after each line would be way too slow
[20:09:37] yourname2: has joined #ruby
[20:09:50] yuung: jhass i see; maybe not line by line, but in the end i don't want to read the whole file into memory at once. does CSV::foreach do that?
[20:09:56] jhass: it only reads one line at a time and discards the reference to the previous one at the same time
[20:10:06] yuung: jhass ah okay
[20:10:14] yuung: that makes more sense :)
[20:10:23] jhass: yuung: you already asked that, I wouldn't recommend you the method if it wouldn't
[20:11:59] bungoman: has joined #ruby
[20:12:30] yqt: has joined #ruby
[20:13:27] Oclair: has joined #ruby
[20:13:30] _djbkd: has joined #ruby
[20:14:05] tristanp: has joined #ruby
[20:14:18] ghr: has joined #ruby
[20:14:31] hipertracker: has joined #ruby
[20:16:47] dennisvennink: has joined #ruby
[20:18:00] dionysus69: has joined #ruby
[20:19:23] nando293921: has joined #ruby
[20:22:01] roma1: has left #ruby: ()
[20:24:28] wrkrcoop: has joined #ruby
[20:24:49] ghr: has joined #ruby
[20:24:53] wrkrcoop: I’m getting a date in this format: "12/02/2014 11:45:23 UTC" and i have to get it into something like this: "2015-01-01T21:12:23Z"
[20:24:57] wrkrcoop: is there an easy way to do that?
[20:25:08] leea: has joined #ruby
[20:26:56] Papierkorb: >> require 'time'; Time.parse("12/02/2014 11:45:23 UTC").iso8601
[20:27:05] Papierkorb: << require 'time'; Time.parse("12/02/2014 11:45:23 UTC").iso8601
[20:27:30] wrkrcoop: ahhh tank you
[20:28:48] wrkrcoop: what is iso8601
[20:29:41] sergey_makagon: has joined #ruby
[20:30:06] drbrain: https://en.wikipedia.org/wiki/ISO_8601
[20:30:09] Papierkorb: wrkrcoop: ISO-8601 defines your target format, as in, your target format is great as it's standarized
[20:37:24] havenwood: wrkrcoop: Seems you're in Rails and want time with zone? Just for ideas: DateTime.strptime('12/02/2014 11:45:23 UTC', '%d/%m/%Y %H:%M:%S').in_time_zone('UTC').iso8601_time_zone('UTC').iso8601
[20:37:35] wrkrcoop: havenwood: not in rails
[20:37:51] havenwood: ah, bad paste anyways
[20:37:52] havenwood: wrkrcoop: note the zone: "2015-01-01T21:12:23Z"
[20:38:14] wrkrcoop: does that mean Time.parse("12/02/2014 11:45:23 UTC").iso8601 wont give me what i want?
[20:38:26] havenwood: wrkrcoop: nvm me, i don't know what you want
[20:38:36] nankyokusei: has joined #ruby
[20:39:12] polishdub: has joined #ruby
[20:39:26] wrkrcoop: why do i get argument out of range for this: Time.parse("09/30/2015 00:00:00 UTC").iso86
[20:39:33] havenwood: wrkrcoop: no, it looks good
[20:39:39] wrkrcoop: but thats what i get
[20:39:50] ghr: has joined #ruby
[20:39:51] havenwood: wrkrcoop: require 'time'
[20:40:13] AngryBuzzy: has joined #ruby
[20:40:21] havenwood: wrkrcoop: use strptime to match your format
[20:41:05] drbrain: wrkrcoop: ruby doesn't know if you're year/month day or day/month/year
[20:41:20] drbrain: day/month/year or month/day/year
[20:41:28] wrkrcoop: do i have to use DateTime.strptime?
[20:41:30] drbrain: so it tried the one you didn't choose
[20:41:34] drbrain: Time.strptime too
[20:41:53] havenwood: wrkrcoop: Something like?: Time.strptime('09/30/2015 00:00:00 UTC', '%m/%d/%Y %H:%M:%S %Z').iso8601
[20:43:01] wrkrcoop: Time.strptime("09/30/2015 00:00:00 UTC", '%m/%d/%Y %H:%M:%S %Z').iso861
[20:43:01] wrkrcoop: undefined method `iso861' for 2015-09-30 00:00:00 UTC:Time
[20:43:20] drbrain: iso8601 (add a 0)
[20:44:11] wrkrcoop: should i be concerned that i dont have a z at the end of my new string?
[20:44:36] wrkrcoop: they expect my data to look like: 2015-01-01T21:12:23Z but i just got "2015-09-30T00:00:00+00:00" for a different time
[20:44:47] drbrain: >> Time.strptime("09/30/2015 00:00:00 UTC", '%m/%d/%Y %H:%M:%S %Z').iso8601
[20:44:49] ruby[bot]: drbrain: # => undefined method `strptime' for Time:Class (NoMethodError) ...check link for more (https://eval.in/606120)
[20:44:59] drbrain: >> require 'time'; Time.strptime("09/30/2015 00:00:00 UTC", '%m/%d/%Y %H:%M:%S %Z').iso8601
[20:45:00] ruby[bot]: drbrain: # => "2015-09-30T00:00:00Z" (https://eval.in/606121)
[20:45:05] drbrain: you should ↑
[20:45:24] wrkrcoop: Thank you drbrain and havenwood
[20:45:32] drbrain: wrkrcoop: try:
[20:45:41] drbrain: require 'time'; Time.strptime("09/30/2015 00:00:00 UTC", '%m/%d/%Y %H:%M:%S %Z').utc.iso8601
[20:45:43] bronson: has joined #ruby
[20:45:46] jhass: Papierkorb: you need to be identified with nickserv
[20:46:02] drbrain: wrkrcoop: make it Time.strptime(…).utc.iso8601
[20:47:26] TheodoreBe: has joined #ruby
[20:48:13] TheodoreBe: has joined #ruby
[20:48:33] drbrain: .utc should
[20:48:58] drbrain: Z means UTC so it should force the iso8601 output to always be Z
[20:50:07] dminuoso: has joined #ruby
[20:50:21] Madplatypus: has joined #ruby
[20:52:36] chosen1: has joined #ruby
[20:53:13] polishdub: has joined #ruby
[20:54:28] icarus: has joined #ruby
[20:54:52] omphe: has joined #ruby
[20:56:50] whathappens: has joined #ruby
[20:57:10] mistermocha: has joined #ruby
[20:57:33] drewo: has joined #ruby
[20:57:46] fullofcaffeine: has joined #ruby
[20:57:49] Ebok: has joined #ruby
[20:58:09] drewo: has joined #ruby
[20:58:46] sumobob: has joined #ruby
[20:58:51] mistermo_: has joined #ruby
[20:58:58] Renich: has joined #ruby
[20:59:25] et09: has joined #ruby
[20:59:42] mistermocha: has joined #ruby
[21:00:21] ghr: has joined #ruby
[21:00:53] `tim`: has joined #ruby
[21:01:46] Rodya_: has joined #ruby
[21:02:08] tristanp: has joined #ruby
[21:03:13] skade: has joined #ruby
[21:03:44] blackmesa: has joined #ruby
[21:07:19] LoneHermit: has joined #ruby
[21:07:36] flughafen_: has joined #ruby
[21:08:49] sucks: has joined #ruby
[21:09:18] whathappens: has joined #ruby
[21:10:30] omphe: has joined #ruby
[21:12:13] SilverKey: has joined #ruby
[21:13:57] SHyx0rmZ: has joined #ruby
[21:14:00] Devalo: has joined #ruby
[21:14:52] ghr: has joined #ruby
[21:15:48] AndrewIsHere: has joined #ruby
[21:16:35] xall: has joined #ruby
[21:22:13] gizmore: has joined #ruby
[21:24:36] tmwnni: has joined #ruby
[21:26:13] tmwnni: has left #ruby: ()
[21:27:22] ghr: has joined #ruby
[21:30:26] gregf: has joined #ruby
[21:31:40] skweek: has joined #ruby
[21:31:56] synthroid: has joined #ruby
[21:33:08] `tim`: has joined #ruby
[21:34:36] hahuang61: has joined #ruby
[21:34:41] Dreamer3: has joined #ruby
[21:35:04] bruce_lee: has joined #ruby
[21:35:04] bruce_lee: has joined #ruby
[21:36:42] weaksauce: has joined #ruby
[21:36:42] tristanp: has joined #ruby
[21:36:57] ghr: has joined #ruby
[21:37:05] spudowiar: has joined #ruby
[21:37:46] veduardo: has joined #ruby
[21:38:20] banisterfiend: has joined #ruby
[21:39:57] alfiemax: has joined #ruby
[21:40:14] marens: has joined #ruby
[21:40:41] SilverKey: has joined #ruby
[21:46:15] AndrewIsHere: has joined #ruby
[21:48:09] JeanCarloMachado: has joined #ruby
[21:50:54] dminuoso: has joined #ruby
[21:52:09] drewo: has joined #ruby
[21:52:53] Nawn: has joined #ruby
[21:53:07] mistermocha: has joined #ruby
[21:53:24] ghr: has joined #ruby
[21:54:10] Nawn: has joined #ruby
[21:55:22] symm-: has joined #ruby
[21:55:43] colegatron_origi: has joined #ruby
[21:56:00] c355E3B: has joined #ruby
[21:57:38] swills: has joined #ruby
[21:59:23] DarkElement: has joined #ruby
[21:59:51] finnnnnnnnnnn: has joined #ruby
[22:00:29] S1kx: has joined #ruby
[22:00:44] DarkElement: I am trying to make a web scraper to get the mp3s for words that I search up on forvo, like this one: http://forvo.com/word/magenta . However, I am having trouble actually obtaining the mp3 from the link, since it opens a new page where a dialog box pops up, and doesn't have the actual .mp3 file there. Do you guys have any ideas? Been trying with the Nokogiri, open-uri, and Mechanize gems so far.
[22:04:07] drbrain: DarkElement: the file that plays when you click one of the arrows?
[22:04:18] DarkElement: Yea... never mind...
[22:04:40] hipertracker: has joined #ruby
[22:05:09] drbrain: use your browser inspector to find the Play function
[22:05:16] drbrain: looks like the URL is constructed there
[22:05:17] blackmesa: has joined #ruby
[22:05:31] drbrain: Safari says it's in main.min.js
[22:05:54] ghr: has joined #ruby
[22:06:27] manveru: DarkElement: the link actually has the mp3 link in base64
[22:06:38] DarkElement: That's why never mind
[22:06:48] DarkElement: Just trying to find the full url to append that to
[22:06:58] manveru: check your network tab when you play a file
[22:07:15] leea: http://audio.forvo.com/audios/mp3/q/c/qc_9182986_39_71342_1875237.mp3
[22:08:18] LoneHermit: has joined #ruby
[22:08:32] DarkElement: I should have already done that
[22:08:51] fredolinhares: has joined #ruby
[22:09:25] drbrain: ha, even better
[22:10:09] mistermocha: has joined #ruby
[22:11:46] tristanp: has joined #ruby
[22:12:06] crystal77: has joined #ruby
[22:13:42] Devalo: has joined #ruby
[22:13:53] nettoweb: has joined #ruby
[22:15:05] freerobby: has joined #ruby
[22:15:26] omphe: has joined #ruby
[22:15:43] sucks: has joined #ruby
[22:16:54] LoneHerm_: has joined #ruby
[22:18:26] skade: has joined #ruby
[22:20:31] Ebok: has joined #ruby
[22:20:45] ramfjord: has joined #ruby
[22:22:40] Rodya_: has joined #ruby
[22:24:16] yuung: has joined #ruby
[22:25:25] ghr: has joined #ruby
[22:26:15] DarkElement: has left #ruby: ("Leaving")
[22:28:07] sucks: has joined #ruby
[22:28:25] tristanp_: has joined #ruby
[22:31:01] bronson: has joined #ruby
[22:33:11] Nahra: has joined #ruby
[22:34:17] JeanCarloMachado: has joined #ruby
[22:35:24] tristanp: has joined #ruby
[22:35:28] ghr: has joined #ruby
[22:39:27] nankyokusei: has joined #ruby
[22:40:12] whathappens: has joined #ruby
[22:42:57] cd-rum: has joined #ruby
[22:43:21] whathappens: has joined #ruby
[22:44:30] smathy: has joined #ruby
[22:44:56] ghr: has joined #ruby
[22:45:31] cd-rum_: has joined #ruby
[22:45:54] mistermocha: has joined #ruby
[22:46:30] AngryBuzzy: has joined #ruby
[22:47:25] bronson: has joined #ruby
[22:47:43] chosen1_: has joined #ruby
[22:51:00] arthurl: has joined #ruby
[22:51:38] malconis: has joined #ruby
[22:51:39] dminuoso: has joined #ruby
[22:52:50] xall: has joined #ruby
[22:58:58] yfeldblum: has joined #ruby
[23:00:43] drewo: has joined #ruby
[23:01:11] tristanp: has joined #ruby
[23:02:02] ghr: has joined #ruby
[23:10:15] flashpoint9: has joined #ruby
[23:11:28] ghr: has joined #ruby
[23:15:00] fredolinhares: has joined #ruby
[23:17:41] arthurl: hi guys- trying to bring up a rails app in production mode- appear to be having some trouble with the asset pipeline- i'm able to bring up the app in development mode without issue- but this is what i see in production: https://gist.github.com/alyssenko/886c83d353629d5d55d486039213cfeb
[23:17:50] arthurl: any thoughts or input would be much appreciated- been looking into this for the past 3 hours
[23:17:59] SCHAAP137: has joined #ruby
[23:18:24] Robtop__: has joined #ruby
[23:20:58] ghr: has joined #ruby
[23:21:10] havenwood: arthurl: For Rails-specific questions the #RubyOnRails channel is best!
[23:21:30] arthurl: havenwood thank you sir- i tried asking there but didn't receive a response
[23:21:43] whathappens: has joined #ruby
[23:23:25] mrBen2k2k2k: has joined #ruby
[23:24:01] nettoweb: has joined #ruby
[23:25:38] Vingador: has joined #ruby
[23:25:47] tristanp: has joined #ruby
[23:26:59] bkxd: has joined #ruby
[23:29:59] DarkElement: has joined #ruby
[23:30:02] DarkElement: The prepending url is actually different in the headers each time. You guys know how to get that with ruby?
[23:30:11] asianMike: has left #ruby: ()
[23:30:55] shevy: no idea but I would insist on a .headers method!
[23:31:04] ghr: has joined #ruby
[23:32:02] hipertracker: has joined #ruby
[23:32:47] DarkElement: what would the method be applied on
[23:33:13] anuxivm: has joined #ruby
[23:35:27] fullofcaffeine: has joined #ruby
[23:37:42] wrkrcoop: i need to create an object where i can access .body and [“status”]
[23:37:44] wrkrcoop: its for a spec
[23:37:55] wrkrcoop: i thought i coudl use OpenStruct
[23:38:04] wrkrcoop: raw_response = OpenStruct.new
[23:38:04] wrkrcoop: data = { "status" => "Fail" }.to_json
[23:38:05] wrkrcoop: raw_response = OpenStruct.new(data)
[23:38:06] wrkrcoop: raw_response.status = false
[23:38:07] wrkrcoop: didn’t work
[23:40:20] mrBen2k2k2k: has joined #ruby
[23:41:03] sai: has joined #ruby
[23:41:19] synthroid: has joined #ruby
[23:42:20] tristanp: has joined #ruby
[23:42:26] mistermocha: has joined #ruby
[23:43:00] ghr: has joined #ruby
[23:43:10] flashpoint9: has joined #ruby
[23:43:51] nando293921: has joined #ruby
[23:43:55] ur5us: has joined #ruby
[23:44:32] benlieb: has joined #ruby
[23:45:40] shevy: x = OpenStruct.new({ "status" => "Fail" }); x.status # => "Fail"
[23:46:07] shevy: I would assume that your .to_json modified stuff, you have a string then
[23:46:39] AlexRussia: has joined #ruby
[23:47:13] shevy: Does anyone know of a simple way to "grab hash key at position 2"?
[23:48:07] shevy: e. g. hash = { cat: 'Tom', mouse: 'Jerry', dog: 'Spike' }; hash[2] <--- won't work of course as there is no key called 2 but I sort of have to grab the key at a user-specified position, e. g. when the user inputs "45". My current approach would be to use .each which is probably not very clever
[23:50:21] Rodya_: has joined #ruby
[23:52:02] Oclair_: has joined #ruby
[23:52:24] dminuoso: has joined #ruby
[23:54:39] iamvery: has joined #ruby
[23:56:27] Papierkorb: shevy: you can benchmark that against doing something like hash[hash.keys[position]]
[23:57:30] ghr: has joined #ruby
[23:57:37] benlieb: has joined #ruby
[23:58:24] flashpoint9: has joined #ruby
[23:59:52] weaksauce: has joined #ruby