« Back to channel list

#ruby - 25 May 2017

« Back 1 day Forward 1 day »
[00:01:23] dru`: is there any way to overload a class's () operator without overwriting method_missing or hoisting methods onto Kernel?
[00:01:47] rakm: has joined #ruby
[00:02:02] rakm: has left #ruby: ()
[00:02:43] MrSparkle: has joined #ruby
[00:05:45] Papierkorb: dru`: do you mean `some_instance.()` or `MyClass()`?
[00:06:47] dru`: some_instance(x, y) preferably
[00:07:00] zenspider: there is no () operator
[00:07:05] dru`: I've got a Method instance I'm just looking to shorthand some_instance(*params) instead of having to do some_instance[*params]
[00:07:13] zenspider: `some_instance x, y` is equally valid
[00:07:13] dru`: (aliasing to .call)
[00:07:20] nullobject: has joined #ruby
[00:07:29] Rich_Morin_: has joined #ruby
[00:08:23] jusa: has joined #ruby
[00:08:36] Papierkorb: dru`: `.call` is aliased to `.()`, but there's no `()`
[00:09:22] dru`: ah, didn't realize there was a .(), that should be good enough for now
[00:09:26] roamingdog: has joined #ruby
[00:09:28] dru`: thanks :)
[00:12:37] mitt3ns: has joined #ruby
[00:14:14] houhoulis: has joined #ruby
[00:14:32] havenwood: has joined #ruby
[00:14:32] havenwood: has joined #ruby
[00:16:14] MrSparkle: has joined #ruby
[00:18:02] Rich_Morin_: has joined #ruby
[00:20:38] millerti: has joined #ruby
[00:24:39] railswebdev: has joined #ruby
[00:26:32] charliesome: has joined #ruby
[00:26:44] roamingdog: has joined #ruby
[00:28:06] Trynemjoel: has joined #ruby
[00:32:43] Antiarc: has joined #ruby
[00:33:43] Fysicus: has joined #ruby
[00:35:47] cam27: has joined #ruby
[00:38:37] ascarter: has joined #ruby
[00:39:46] unreal: has joined #ruby
[00:41:06] Pumukel: has joined #ruby
[00:44:14] gnufied: has joined #ruby
[00:45:15] enterprisey: has joined #ruby
[00:49:04] Vile`: has joined #ruby
[00:50:47] enderby: has joined #ruby
[00:54:56] apparition: has joined #ruby
[00:56:17] roamingdog: has joined #ruby
[00:57:22] mikecmpbll: has joined #ruby
[00:59:54] railswebdev: has joined #ruby
[01:03:02] gusrub: has joined #ruby
[01:04:20] eightlimbed: has joined #ruby
[01:04:53] gizmore|2: has joined #ruby
[01:09:13] duderonomy: has joined #ruby
[01:09:24] Krebsgewehr: has joined #ruby
[01:12:41] gnufied: has joined #ruby
[01:17:03] bpmedley: has joined #ruby
[01:17:29] mkaito: has joined #ruby
[01:26:39] mim1k: has joined #ruby
[01:27:23] roamingd_: has joined #ruby
[01:28:07] roamingdog: has joined #ruby
[01:28:26] bruce_lee: has joined #ruby
[01:28:26] bruce_lee: has joined #ruby
[01:28:57] roamingdog: has joined #ruby
[01:29:47] roamingdog: has joined #ruby
[01:30:05] jenrzzz: has joined #ruby
[01:30:05] jenrzzz: has joined #ruby
[01:30:32] roamingdog: has joined #ruby
[01:31:22] roamingdog: has joined #ruby
[01:33:26] nobitanobi: has joined #ruby
[01:35:06] milardovich: has joined #ruby
[01:37:40] BSAlb: has joined #ruby
[01:40:29] t-recx: has joined #ruby
[01:41:51] Pumukel: has joined #ruby
[01:43:07] eightlimbs: has joined #ruby
[01:44:41] jackjackdripper: has joined #ruby
[01:47:01] d^sh: has joined #ruby
[01:47:02] brent__: has joined #ruby
[01:50:20] gothicsouth: has joined #ruby
[01:52:57] moei: has joined #ruby
[01:53:20] cdg: has joined #ruby
[01:55:45] BiHi: has joined #ruby
[01:55:48] PatrikasZvaigzde: has joined #ruby
[01:58:32] rc48: has joined #ruby
[02:01:58] railswebdev: has joined #ruby
[02:02:24] cschneid_: has joined #ruby
[02:02:59] Jameser: has joined #ruby
[02:03:32] Fysicus: has joined #ruby
[02:06:28] jrafanie: has joined #ruby
[02:06:29] jackjackdripper: has joined #ruby
[02:08:09] Jameser: has joined #ruby
[02:09:20] jusa: has joined #ruby
[02:10:23] bmurt_: has joined #ruby
[02:13:27] mahanakorn: has joined #ruby
[02:16:31] charliesome: has joined #ruby
[02:20:02] pb122: has joined #ruby
[02:20:24] genpaku: has joined #ruby
[02:26:15] pankaj_: has joined #ruby
[02:26:25] MarkBilk: has joined #ruby
[02:35:25] evie_hammond: has joined #ruby
[02:36:15] jrafanie: has joined #ruby
[02:37:48] gothicsouth: has joined #ruby
[02:43:08] Pumukel: has joined #ruby
[02:43:44] jenrzzz: has joined #ruby
[02:45:10] dru`: Thanks for the help earlier btw, getting closer to what I'm envisioning with https://github.com/drusepth/inline-tests/blob/master/02_test_ranges.rb :) /cc zenspider <3
[02:46:20] olivier__: has joined #ruby
[02:47:33] railswebdev: has joined #ruby
[02:52:09] milardovich: has joined #ruby
[02:53:31] uZiel: has joined #ruby
[02:53:43] segmond: has joined #ruby
[03:01:30] jackjackdripper: has joined #ruby
[03:05:06] olivier__: has joined #ruby
[03:10:50] Trynemjoel: has joined #ruby
[03:13:54] jrafanie_: has joined #ruby
[03:15:04] nunchuck: has joined #ruby
[03:18:10] uZiel: has joined #ruby
[03:20:53] milardovich: has joined #ruby
[03:27:13] mim1k: has joined #ruby
[03:30:47] __Yiota: has joined #ruby
[03:32:03] bkxd: has joined #ruby
[03:33:58] uZiel: has joined #ruby
[03:34:09] nobitanobi: has joined #ruby
[03:36:16] postmodern: has joined #ruby
[03:38:47] railswebdev: has joined #ruby
[03:42:19] gix: has joined #ruby
[03:43:59] olivier__: has joined #ruby
[03:45:00] Pumukel: has joined #ruby
[03:45:19] gusrub: has joined #ruby
[03:51:31] jusa: has joined #ruby
[03:53:56] __Yiota: has joined #ruby
[03:57:23] claw: has joined #ruby
[03:59:21] AnoHito_: has joined #ruby
[04:00:00] rc48: has joined #ruby
[04:01:23] haylon: has joined #ruby
[04:04:29] statikowsky: has joined #ruby
[04:07:20] __Yiota: has joined #ruby
[04:09:35] patarr: has joined #ruby
[04:11:32] charliesome: has joined #ruby
[04:14:01] roamingdog: has joined #ruby
[04:16:32] mattcc: has joined #ruby
[04:26:00] mim1k: has joined #ruby
[04:34:03] renchan: has joined #ruby
[04:34:40] jenrzzz: has joined #ruby
[04:34:41] jenrzzz: has joined #ruby
[04:42:46] ascarter: has joined #ruby
[04:46:43] cfec0b8d: has joined #ruby
[04:47:56] bkxd_: has joined #ruby
[04:51:11] AnoHito: has joined #ruby
[04:54:09] nobitanobi: has joined #ruby
[05:00:25] hndk: has joined #ruby
[05:03:54] armyriad: has joined #ruby
[05:04:21] gothicsouth: has joined #ruby
[05:11:43] Cohedrin: has joined #ruby
[05:15:12] Bock: has joined #ruby
[05:16:12] cbyrda: has joined #ruby
[05:17:33] aupadhye: has joined #ruby
[05:19:07] rgr: has joined #ruby
[05:26:25] skweek: has joined #ruby
[05:32:26] watersoul: has joined #ruby
[05:32:37] uZiel: has joined #ruby
[05:34:29] bkxd: has joined #ruby
[05:37:26] watersoul: has joined #ruby
[05:37:38] mtkd: has joined #ruby
[05:38:41] jenu: has joined #ruby
[05:42:17] tvw: has joined #ruby
[05:46:44] Pumukel: has joined #ruby
[05:53:43] jenu: has left #ruby: ()
[05:54:39] jenu: has joined #ruby
[05:55:02] jenu: has left #ruby: ()
[05:55:45] jenu: has joined #ruby
[05:57:17] jenu: has left #ruby: ()
[05:58:33] armyriad: has joined #ruby
[06:01:46] Alina-malina: has joined #ruby
[06:01:53] rc48: has joined #ruby
[06:02:13] jenrzzz: has joined #ruby
[06:02:13] jenrzzz: has joined #ruby
[06:03:41] Alina-malina: has joined #ruby
[06:04:09] charliesome: has joined #ruby
[06:06:58] KeyJoo: has joined #ruby
[06:08:02] sp4rrow: has joined #ruby
[06:08:50] sp4rrow: has joined #ruby
[06:09:44] DeeJayh_: has joined #ruby
[06:10:35] patarr: has joined #ruby
[06:13:19] Mia: has joined #ruby
[06:13:19] Mia: has joined #ruby
[06:17:09] quobo: has joined #ruby
[06:17:55] bkxd: has joined #ruby
[06:24:20] CacoS: has joined #ruby
[06:28:50] anisha: has joined #ruby
[06:29:27] PorcoRex: has joined #ruby
[06:29:50] PorcoRex: Good evening.
[06:35:49] rgr: has joined #ruby
[06:38:06] rfoust: has joined #ruby
[06:43:28] uZiel: has joined #ruby
[06:44:59] nofxx: has joined #ruby
[06:45:09] ltem: has joined #ruby
[06:45:59] cjhowe: has joined #ruby
[06:46:22] conta: has joined #ruby
[06:47:28] lacuna: has joined #ruby
[06:47:35] Pumukel: has joined #ruby
[06:47:49] cjhowe: has joined #ruby
[06:49:43] stormbytes: simple string comparison syntax question
[06:49:43] stormbytes: https://pastebin.com/HBpFpMTA
[06:49:45] ruby[bot]: stormbytes: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/8101c0dc8dbaf3b9c3498d3e064ece65
[06:49:45] ruby[bot]: stormbytes: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[06:50:07] nofxxx: has joined #ruby
[06:50:21] stormbytes: as i was saying, simple syntax question. You can see from the short ex. what i'm trying to do
[06:50:55] stormbytes: testing if i.to_s == p, if yes, then do stuff.. (don't really need the turnery side of it)
[06:52:01] stee_3: has joined #ruby
[06:54:53] nobitanobi: has joined #ruby
[06:56:56] govg: has joined #ruby
[06:57:29] uZiel: has joined #ruby
[06:58:20] chat: has joined #ruby
[07:01:27] zenspider: stormbytes: looking
[07:01:44] stormbytes: i'm looking for a shorthand if-statement
[07:02:03] zenspider: you're gonna have to pose a question at some point
[07:02:32] stormbytes: nevermind, i'm asking the wrong question.
[07:02:36] zenspider: maybe you want: next unless i.to_s == p; puts "hello"
[07:02:43] zenspider: maybe you want puts "hello" if i.to_s == p
[07:02:44] stormbytes: i need to use a simple if/else stmt
[07:02:49] zenspider: I can't tell from your lack of q
[07:03:02] zenspider: you DEFINITELY want to start using 2 spaces instead of a tab
[07:03:30] zenspider: and you could also pull the puts up so you choose the arg instead
[07:03:56] stormbytes: not following that last thing
[07:04:00] stormbytes: pull the puts up?
[07:04:13] zenspider: q ? puts a : puts b => puts q ? a : b
[07:04:55] zenspider: what are you actually trying to do anyways? I haven't seen each_index used in a looong time. Nor should you want/need to to_s the index
[07:05:02] raatiniemi: has joined #ruby
[07:05:29] stormbytes: getting an option value from ARGV that should represent an array index
[07:05:31] bkxd: has joined #ruby
[07:05:50] zenspider: so to_i the arg and get the value you want?
[07:05:55] stormbytes: since ARGV returns a string I'm comparing it to array_index.to_s
[07:06:04] stormbytes: the other way around
[07:06:28] zenspider: "should represent an array index" -> array[arg.to_i]
[07:06:58] stormbytes: that presumes you know for sure the input is in fact a valid string representation of an integer value
[07:07:01] stormbytes: which i don't
[07:07:06] stormbytes: easier to bring the horse to the water
[07:07:11] zenspider: and you can use OptionParser to do all of that, including the to_i
[07:07:36] zenspider: no, it isn't easier. you can, in fact, check that it is a valid string representation of an int. last I checked, computers do that ALL the time
[07:07:39] stormbytes: getting there... its been my first week back to Ruby after 3+ years of javascript
[07:08:01] aufi: has joined #ruby
[07:08:47] zenspider: ri OptionParser ... it'll help
[07:08:53] stormbytes: assuming the array is [0, 1, 2], you'd have to check (1) convert the input to_i and then check to see if its within the range of array elems.
[07:09:13] stormbytes: the way I do it is array_index.to_s == input ?
[07:09:33] stormbytes: i'm listening
[07:09:41] zenspider: I've already said it above
[07:09:57] stormbytes: i'm not looking for adventures tonight, but thanks for the tip
[07:10:02] zenspider: >> [0, 1, 2, 3]["1".to_i]
[07:10:03] ruby[bot]: zenspider: # => 1 (https://eval.in/804817)
[07:10:25] zenspider: really not rocket surgery here. get the value as a string, make an int from it, get the value from the array with it
[07:10:29] stormbytes: way over my head
[07:10:36] jgnagy: has joined #ruby
[07:11:02] stormbytes: whats wrong with my way of doing exactly that?
[07:11:03] zenspider: but somehow enumerating all the indicies, stringifying them, comparing those... not over your head. gotcha.
[07:11:23] DeeJayh_: has joined #ruby
[07:11:38] stormbytes: if i.to_s == p
[07:11:39] stormbytes: puts ports[i]
[07:11:56] ruby[bot]: It's popcorn time! 🍿🍿🍿
[07:12:16] ljarvis: that is not enough popcorn
[07:12:22] stormbytes: will look at that when i'm rested
[07:12:41] statikowsky: has joined #ruby
[07:12:43] Radar: Why convert the index to a string instead of converting p to an integer?
[07:12:55] stormbytes: because p might be gibberish
[07:13:00] zenspider: stormbytes: OK. I'm not convinced that you're trolling yet. let's say your array is, for whatever reason, 1 million items long... and let's say that the user does --index 999999
[07:13:12] zenspider: how many operations does your version do?
[07:13:19] zenspider: how many operations does my version do?
[07:13:19] Radar: stormbytes: gibberish? How so? How is p defined?
[07:13:33] zenspider: Radar: give me a sec
[07:13:33] stormbytes: Radar p is user input on stdin
[07:13:39] stormbytes: zenspider trolling?
[07:13:58] Radar: zenspider: Can't let you have all the fun ;)
[07:14:51] zenspider: >> Integer(42)
[07:14:52] ruby[bot]: zenspider: # => 42 (https://eval.in/804823)
[07:14:54] zenspider: >> Integer("42")
[07:14:55] ruby[bot]: zenspider: # => 42 (https://eval.in/804824)
[07:15:00] zenspider: >> Integer("gibberish")
[07:15:02] ruby[bot]: zenspider: # => invalid value for Integer(): "gibberish" (ArgumentError) ...check link for more (https://eval.in/804825)
[07:15:07] dionysus69: has joined #ruby
[07:15:13] zenspider: really really easy to validate ints
[07:15:35] zenspider: still haven't answered my question ... how many ops for p="999999" ?
[07:15:53] stormbytes: 1. i wasn't familiar with that, and 2. you still haven't pointed out any real advantage over my way of doing it, other than personal preference
[07:16:16] zenspider: oh fuck you... answer my question. that's the answer to 2
[07:16:25] stormbytes: zenspider again, thanks for the tip. i'm not up to a long exchange tonight. We can pick this up earlier in the day if you like
[07:16:32] ljarvis: stormbytes: come on, zenspider has been quite clear about a clear advantage and his latest question is digging into that even more
[07:17:01] stormbytes: like I said, thanks for the tip
[07:17:15] zenspider: you can't even think through how many operations your f'd up "algorithm" will take in the simplest thought exercise. "thought" for you, I guess.
[07:18:14] zenspider: and please tell me you don't code like that in javascript...
[07:18:26] stormbytes: dude, let it go. nite
[07:18:32] zenspider: ...but you probably do
[07:19:03] mattp_: has joined #ruby
[07:19:13] jusa: has joined #ruby
[07:19:36] zenspider: huh... I just stumbled upon something interesting/unexpected... if this javascript parser can't parse the file in 2 seconds, it probably can't parse it in 5 minutes... totally changes the way it should do timeouts
[07:20:09] zenspider: fascinating... now I want to retry this on the harder files to see if that's accurate
[07:20:30] zenspider: also, ember is like, 250kloc in a single file. :/
[07:21:31] zenspider: well, yeah... I didn't write it. I'm just trying to analyze it. (tho, WHY? why do people check in vendored files and then push them to codeclimate to analyze???)
[07:24:29] zenspider: stormbytes: and it is "ternary"... 1) composed of three parts. 2) using three as a base. just fyi
[07:25:24] zenspider: anyone know what docker means by "Sending build context to Docker daemon <n> MB" ?
[07:25:34] zenspider: it didn't used to do that and now it does everytime I image
[07:25:37] alazred: has joined #ruby
[07:28:47] stormbytes: zenspider I have no idea how many operations. what difference does it make? your code is more efficient? Okay, great. I don't know how to do error handling in Ruby (yet) (eg. try/catch blocks) but since your example seems to raise an exception I presume it would have to be handled in that fashion
[07:30:24] zenspider: thanks for the tip
[07:31:37] stormbytes: here's another: jamming the RIGHT key into a lock results in a broken key :)
[07:34:44] charliesome: has joined #ruby
[07:35:57] mark_66: has joined #ruby
[07:36:08] apparition: has joined #ruby
[07:37:07] nofxxxx: has joined #ruby
[07:37:22] antgel: has joined #ruby
[07:38:40] biberu: has joined #ruby
[07:38:47] mikecmpbll: has joined #ruby
[07:41:05] DoubleMalt: has joined #ruby
[07:41:19] DeeJayh_: has joined #ruby
[07:42:32] benjen: has joined #ruby
[07:45:47] ur5us: has joined #ruby
[07:46:43] nobitanobi: has joined #ruby
[07:48:01] djbkd: has joined #ruby
[07:48:45] Pumukel: has joined #ruby
[07:49:02] ur5us_: has joined #ruby
[07:55:47] zenspider: followup... the docker "Sending build context" thing is proportional to the size of the contents of the directory that the Dockerfile is in. either using .dockerignore or removing crap speeds it up
[07:58:44] nofxxx: has joined #ruby
[08:00:11] Sammichmaker: has joined #ruby
[08:01:04] statikowsky: has joined #ruby
[08:01:47] haylon: has joined #ruby
[08:02:50] statikowsky: has joined #ruby
[08:03:23] rc48: has joined #ruby
[08:04:03] govg: has joined #ruby
[08:08:33] Beams: has joined #ruby
[08:10:02] dionysus69: has joined #ruby
[08:10:15] mikecmpbll: has joined #ruby
[08:11:21] patarr: has joined #ruby
[08:18:00] iMadper: has joined #ruby
[08:21:06] unshadow: has joined #ruby
[08:21:55] minimalism: has joined #ruby
[08:22:21] chat_: has joined #ruby
[08:23:17] User458764: has joined #ruby
[08:25:45] aufi: has joined #ruby
[08:28:07] leitz: has joined #ruby
[08:34:46] chat_: has joined #ruby
[08:36:15] bkxd: has joined #ruby
[08:37:08] lacuna: has joined #ruby
[08:37:49] bilal80: has joined #ruby
[08:37:50] teclator: has joined #ruby
[08:38:12] dasher00: has joined #ruby
[08:39:37] lacuna: has joined #ruby
[08:41:24] DeeJayh_: has joined #ruby
[08:41:29] workmad3: has joined #ruby
[08:42:52] govg: has joined #ruby
[08:43:43] mim1k: has joined #ruby
[08:45:56] Zelest: has joined #ruby
[08:47:11] Zelest: has left #ruby: ()
[08:49:55] Pumukel: has joined #ruby
[08:55:09] uZiel: any way to do element wise operations on two arrays? like a + b should result in adding the corresponding elements of a and b
[08:56:06] herwin: I guess you're looking for a.zip(b)
[09:00:36] lxsameer: has joined #ruby
[09:01:11] dhollin3: has joined #ruby
[09:02:36] konsolebox: has joined #ruby
[09:06:14] zaargy: has joined #ruby
[09:06:24] zaargy: has left #ruby: ()
[09:06:45] ljarvis: or they mean [1, 2] + [2, 3] #=> [3, 5]
[09:07:57] armando: has joined #ruby
[09:08:13] ljarvis: in which case yeah, a.zip(b).map { |a, b| a + b } or do it the long (but probably more efficient) way of looping
[09:09:35] chichou: has joined #ruby
[09:11:24] aufi: has joined #ruby
[09:16:38] romank: has joined #ruby
[09:17:59] silentoxygen: has joined #ruby
[09:18:40] bkxd: has joined #ruby
[09:19:57] jusa: has joined #ruby
[09:20:33] ur5us: has joined #ruby
[09:27:11] Caius: zip takes a block I think
[09:28:36] Caius: res = []; [1, 2, 3].zip([4, 5, 6]) { |a, b| res << a + b }; res # => [5, 7, 9]
[09:29:20] samuil: has joined #ruby
[09:29:27] govg: has joined #ruby
[09:30:01] Caius: "If a block is given, it is invoked for each output array, otherwise an array of arrays is returned."
[09:30:08] samuil: has left #ruby: ()
[09:33:55] insane_tesla: has joined #ruby
[09:34:21] alazred: has joined #ruby
[09:34:22] alazred: has joined #ruby
[09:37:22] volty: has joined #ruby
[09:46:01] ljarvis: ah yeah, i always forget that
[09:47:35] anisha_: has joined #ruby
[09:48:37] gusrub: has joined #ruby
[09:50:51] canton7: bleh, I don't like side-effects in functional blocks like that
[09:51:26] Pumukel: has joined #ruby
[09:51:55] anisha_: has joined #ruby
[09:58:08] dionysus69: has joined #ruby
[09:58:34] marr: has joined #ruby
[09:59:12] aufi: has joined #ruby
[10:04:09] bkxd: has joined #ruby
[10:04:29] arup_r: has joined #ruby
[10:07:34] nhhc: has joined #ruby
[10:11:45] anisha_: has joined #ruby
[10:12:21] patarr: has joined #ruby
[10:14:17] ur5us: has joined #ruby
[10:15:56] ferr: has joined #ruby
[10:20:41] Hanna: has joined #ruby
[10:23:08] alazred: has joined #ruby
[10:23:08] alazred: has joined #ruby
[10:26:19] bruce_lee: has joined #ruby
[10:26:19] bruce_lee: has joined #ruby
[10:31:24] yqt: has joined #ruby
[10:32:15] DeeJayh_: has joined #ruby
[10:32:20] chichou: has joined #ruby
[10:32:30] patarr: has joined #ruby
[10:34:02] cjhowe: has joined #ruby
[10:35:45] apeiros: canton7: same. I'd even go as far as write that as zip+map: [1, 2, 3].zip([4, 5, 6]).map { |a,b| a+b }
[10:36:19] apeiros: for what it's worth, it's even shorter
[10:36:39] apeiros: res = []; [1, 2, 3].zip([4, 5, 6]) { |a, b| res << a + b }
[10:36:39] apeiros: res = [1, 2, 3].zip([4, 5, 6]).map { |a, b| a + b }
[10:37:09] canton7: yeah, I'd do the same
[10:37:23] linoge: has joined #ruby
[10:37:29] apeiros: can even do .map(&:sum) now :D
[10:38:18] alazred: has joined #ruby
[10:38:18] alazred: has joined #ruby
[10:38:35] gnufied: has joined #ruby
[10:39:03] im0nde: has joined #ruby
[10:42:42] aupadhye: has joined #ruby
[10:45:20] linoge: has joined #ruby
[10:45:32] roamingdog: has joined #ruby
[10:48:53] charliesome: has joined #ruby
[10:50:27] linoge: So, I've got this collection of objects each of which have a unique identifier. Is there any common idiom to turn that collection into a class that allows dictionary/hash like access?
[10:51:24] zenspider: apeiros: I'm kinda surprised how much slower zip+map is, esp w/ &:sum. odd. I would have thought that knowing the size ahead of time would be an improvement
[10:51:50] apeiros: I didn't measure, how big is the difference?
[10:52:04] apeiros: if it's that much slower, I think that also means the method-call overhead came down a lot in the last few versions
[10:52:23] zenspider: they're all like 1.7x slower
[10:52:30] apeiros: linoge: Hash[] and Array#to_h are the common ones
[10:52:51] apeiros: linoge: e.g. your_objs.map { |obj| [obj.key_property, obj] }.to_h
[10:53:02] apeiros: zenspider: ok, that's indeed a lot.
[10:53:24] apeiros: zenspider: sad, I think that'll promote (IMO) harder to read code
[10:53:44] zenspider: linoge: hashes have hash-like access... but you can `def [](key); ...; end` in your class to provide whatever type of access you want
[10:54:06] zenspider: not that people measure much these days :P
[10:54:21] apeiros: I guess that's the upside of current state of affairs :)
[10:56:51] mim1k: has joined #ruby
[10:58:41] zenspider: ACTION goes to bed
[11:00:05] muelleme: has joined #ruby
[11:01:30] Fernando-Basso: has joined #ruby
[11:05:24] burgestrand: has joined #ruby
[11:06:06] apeiros: gn8 zenspider
[11:13:41] spk_: has joined #ruby
[11:17:08] ddffg: has joined #ruby
[11:20:52] jusa: has joined #ruby
[11:21:30] DeeJayh_: has joined #ruby
[11:23:02] houhoulis: has joined #ruby
[11:25:50] rc48: has joined #ruby
[11:28:09] nobitanobi: has joined #ruby
[11:28:21] nobitano_: has joined #ruby
[11:30:15] HoierM_: has joined #ruby
[11:32:39] bsartek: has joined #ruby
[11:32:56] alazred: has joined #ruby
[11:32:57] alazred: has joined #ruby
[11:39:44] bkxd: has joined #ruby
[11:41:54] bsartek: has joined #ruby
[11:44:10] gregf_: has joined #ruby
[11:49:06] olivier__: has joined #ruby
[11:49:38] romeoh: has joined #ruby
[11:53:17] Pumukel: has joined #ruby
[11:53:57] ur5us_: has joined #ruby
[11:56:34] HoierM_: has joined #ruby
[11:57:24] brendan-: has joined #ruby
[11:58:59] olivier__: has joined #ruby
[12:00:08] synthroid: has joined #ruby
[12:01:23] bmurt: has joined #ruby
[12:03:27] synthroid: has joined #ruby
[12:06:19] gnufied: has joined #ruby
[12:06:35] haylon: has joined #ruby
[12:15:34] bmurt: has joined #ruby
[12:15:52] romeoh: has joined #ruby
[12:19:28] nanoz: has joined #ruby
[12:19:40] olivier__: has joined #ruby
[12:20:21] charliesome: has joined #ruby
[12:21:40] charliesome: has joined #ruby
[12:23:33] Pumukel: has joined #ruby
[12:28:00] pupsicle: has joined #ruby
[12:28:23] dasher00: has joined #ruby
[12:29:30] GinoMan: has joined #ruby
[12:36:09] d^sh: has joined #ruby
[12:36:35] nixmaniack: has joined #ruby
[12:37:59] volty: has joined #ruby
[12:38:23] DeeJayh_: has joined #ruby
[12:43:38] d^sh: has joined #ruby
[12:44:31] _aeris_: hello #ruby !
[12:44:45] bambanx: has joined #ruby
[12:44:56] _aeris_: is there any way to force the output of YAML.dump to use type for some field ?
[12:45:45] _aeris_: for example, having 10:00 on input is correctly converted from time to integer, but no way to go back to 10:00 on dump
[12:47:13] rgr: has joined #ruby
[12:48:34] jtperreault: has joined #ruby
[12:54:05] apeiros: hell _aeris_
[12:54:59] cdg: has joined #ruby
[12:56:06] roamingdog: has joined #ruby
[12:56:41] uZiel: has joined #ruby
[13:00:30] mim1k: has joined #ruby
[13:03:14] jrafanie: has joined #ruby
[13:09:30] Alina-malina: has joined #ruby
[13:18:11] swills: has joined #ruby
[13:18:27] cschneid_: has joined #ruby
[13:19:14] haylon: has joined #ruby
[13:20:02] olivier__: has joined #ruby
[13:21:46] jusa: has joined #ruby
[13:23:11] bmurt: has joined #ruby
[13:24:01] swills: has joined #ruby
[13:24:06] etehtsea: has joined #ruby
[13:27:59] griffindy: has joined #ruby
[13:28:01] cek: has joined #ruby
[13:28:34] olivier__: has joined #ruby
[13:28:47] cek: find me a shorter way to do Hash[hsh.keys.map{|x| [x, []]}])
[13:29:12] cjohnson: File.exists? Am I right in understanding that "exists?" is just the method name and there's no magic pertaining to the ?
[13:29:25] cek: cjohnson: same as with !
[13:29:33] cjohnson: what do you mean cek
[13:29:46] cjohnson: !true is not false?
[13:29:47] cek: buy a ruby book
[13:30:01] cjohnson: I'm reading one now and it introduced File.exists? without explaining the question mark
[13:30:20] _aeris_: this is just part of the method name
[13:30:27] cjohnson: Cool, thanks
[13:31:35] _aeris_: cek > hsh.map { |x, _| [x, []] }.to_h ? :D
[13:32:22] DLSteve: has joined #ruby
[13:32:31] olivier__: has joined #ruby
[13:32:44] olivier__: has joined #ruby
[13:33:12] cyphase: has joined #ruby
[13:33:34] cek: much better, but what about map{} chunk, maybe reduce of some sort
[13:34:13] apeiros: "find me", nice to see that your attitude is still shit cek. I expect you to do better or I'll show you the door.
[13:34:33] cek: apeiros: who are you?
[13:34:47] apeiros: the guy with the keys to the door.
[13:35:05] cek: stop bullying people
[13:35:14] apeiros: !kick cek try again
[13:35:14] ruby[bot]: +bbb $a:cek$#ruby-banned cek!*@*$#ruby-banned *!*@gateway/web/irccloud.com/x-jisfsoqmscjhtncw$#ruby-banned
[13:35:14] ruby[bot]: ruby[bot] kicked cek: again
[13:35:24] dru`: has joined #ruby
[13:35:34] synthroid: has joined #ruby
[13:35:48] __Yiota: has joined #ruby
[13:36:05] uZiel: has joined #ruby
[13:37:01] yxhuvud: hsh.transform_values {[]} in ruby 2.4 FWIW.
[13:37:03] cjohnson: Ok so another question about the method naming, it seems like def bar=(val) ... end actually does do magic
[13:37:10] ruby[bot]: -bbb $a:cek$#ruby-banned cek!*@*$#ruby-banned *!*@gateway/web/irccloud.com/x-jisfsoqmscjhtncw$#ruby-banned
[13:37:12] cjohnson: it creates a setter for the instance variable bar
[13:37:27] apeiros: cjohnson: not really, no
[13:37:39] ljarvis: bar= does not car about any ivars
[13:37:41] apeiros: the only magic foo= methods have is their return value
[13:38:25] apeiros: >> class X; def foo=(value); return value*2; end; x = X.new; res = x.foo = 2; [res, x.instance_variables]
[13:38:26] ruby[bot]: apeiros: # => /tmp/execpad-df57528eb2e6/source-df57528eb2e6:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/805264)
[13:38:37] apeiros: >> class X; def foo=(value); return value*2; end; end; x = X.new; res = x.foo = 2; [res, x.instance_variables]
[13:38:37] Jakaria: has joined #ruby
[13:38:38] ruby[bot]: apeiros: # => [2, []] (https://eval.in/805265)
[13:38:46] Jakaria: need a help..... how can I use relationship of a model in a test class??? I am using factory-girl... when I write this in a test, it shows "null" in the terminal... >> puts user.role.to_json
[13:39:01] apeiros: cjohnson: ^ as can be seen, no ivar was set, and the return value wasn't 4, it's 2 (always the right-hand side of the "assignment")
[13:39:09] Jakaria: I am using Rails 5
[13:39:17] ljarvis: ?rails Jakaria
[13:39:17] ruby[bot]: Jakaria: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[13:39:44] cschneid_: has joined #ruby
[13:39:56] Jakaria: tnx @ruby[bot]....
[13:40:24] ruby[bot]: here's your cookie: πŸͺ
[13:40:27] cjohnson: hrm... I will investigate. thanks apeiros and ljarvis
[13:40:27] josealobato: has joined #ruby
[13:40:43] swills: has joined #ruby
[13:40:56] Jakaria: is it a bot???
[13:41:29] ljarvis: Jakaria: yes, it tries to pretend it's not, which is why we tried to make it obvious in the name
[13:41:44] olivier__: has joined #ruby
[13:42:47] sepp2k: has joined #ruby
[13:42:54] apeiros: it's actually not a bot. I pay somebody to act like one.
[13:43:05] apeiros: the name is a misdirection and part of the scheme.
[13:43:33] apeiros: their SLA includes a 0.3s respond time on commands
[13:44:03] ljarvis: ACTION desparately tries to avoid forcing a > 0.3s response 
[13:46:04] bvcosta: has joined #ruby
[13:47:33] haylon: has joined #ruby
[13:47:44] centrx: has joined #ruby
[13:47:44] centrx: has joined #ruby
[13:47:59] gregf_: has joined #ruby
[13:48:52] apparition: has joined #ruby
[13:50:23] BSaboia: has joined #ruby
[13:51:22] haylon: has joined #ruby
[13:52:24] BSAlb: has joined #ruby
[13:53:16] dcluna: has joined #ruby
[13:55:53] robnester: has joined #ruby
[13:56:07] ResidentBiscuit: has joined #ruby
[13:56:07] fluffypoodle789: has joined #ruby
[13:57:05] railswebdev: has joined #ruby
[13:57:36] rf_cancer: has joined #ruby
[13:57:53] apeiros: hi fluffypoodle789
[13:58:15] rf_cancer: has left #ruby: ()
[13:59:23] olivier__: has joined #ruby
[13:59:41] g0d355__: has joined #ruby
[13:59:44] dcluna: has joined #ruby
[13:59:47] user12434: has joined #ruby
[13:59:58] user12434: has left #ruby: ()
[14:01:12] bheesham: has joined #ruby
[14:01:13] apeiros: +b $a:cek!*@*$#ruby-banned
[14:01:17] apeiros: -o apeiros
[14:01:23] apeiros: fluffypoodle789: not related to you ;-)
[14:02:13] dionysus70: has joined #ruby
[14:04:01] jrafanie: has joined #ruby
[14:05:21] olivier__: has joined #ruby
[14:05:51] olivier__: has joined #ruby
[14:07:43] olivier__: has joined #ruby
[14:08:41] kabuli: has joined #ruby
[14:08:52] olivier__: has joined #ruby
[14:09:13] thnee: has joined #ruby
[14:10:16] thnee: How is it possible the 'bundle install' installed a gem under /var/lib/gems/2.3.0/gems/ as root:root when I ran the command as my normal user??
[14:10:43] kabuli: @thnee you did sudo, maybe? :/
[14:10:44] olivier__: has joined #ruby
[14:10:55] thnee: kabuli: as I said, I ran it as my normal user, not root
[14:11:26] nanoz]: has joined #ruby
[14:11:28] dcluna: has joined #ruby
[14:11:38] thnee: does it like interanlly use sudo or something?
[14:13:42] kabuli: @thnee afaik, it's you who was to either input sudo or sudo with password but am not a pro.
[14:19:02] mim1k: has joined #ruby
[14:21:38] __Yiota: has joined #ruby
[14:22:03] kabuli: I can't get ActiveRecord to accept SQL in order to find records which description contains a given string. May you help me with the error? β€” CODE, PARAMS and ERROR: https://gist.github.com/anonymous/fc2b129c5bbc753278b430afa3b9f159 PS: when there are no keywords, country and category seem to return zero results. Thx!
[14:22:26] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[14:23:23] kabuli: @Zarthus I am not using #RubyOnRails, but just ActiveRecord to handle de DB as objects.
[14:23:41] Zarthus: people in RoR probably still are best suited to help you :)
[14:23:42] patarr: has joined #ruby
[14:28:26] lupine: has joined #ruby
[14:32:24] rc48: has joined #ruby
[14:32:59] jrafanie_: has joined #ruby
[14:34:09] mikecmpbll: has joined #ruby
[14:35:03] aspiers: has joined #ruby
[14:37:37] d10n-work: has joined #ruby
[14:38:57] Alina-malina: has joined #ruby
[14:41:10] olivier__: has joined #ruby
[14:44:02] nadir: has joined #ruby
[14:45:51] dru`: Good morning syntax senpais
[14:47:20] chouhoulis: has joined #ruby
[14:47:23] volty: has joined #ruby
[14:49:29] GodFather: has joined #ruby
[14:52:24] jphase: has joined #ruby
[14:52:40] workmad3_: has joined #ruby
[14:53:00] jrafanie: has joined #ruby
[14:53:32] mordof: has joined #ruby
[14:54:43] mordof: we're currently running ruby 2.3.1 in production, and having issues with lambdas and arguments with default values, so we're upgrading to 2.3.4. I saw this on the release for 2.3.4 "An API incompatibility has been found for Ruby 2.3.4. It is the accidental removal of the API function rb_thread_fd_close" Can anyone help me understand what this
[14:55:05] mordof: there is a patch for it, but i'm wondering what I should look out for, if anything, since that is mentioned
[14:56:58] yqt: has joined #ruby
[14:58:11] yehowyada: has joined #ruby
[14:59:59] centrx: mordof: I think that only matters if you're using FFI (accessing the C API directly)
[15:00:09] centrx: mordof: not regular ruby code
[15:00:13] centrx: mordof: It could affect some gems though
[15:00:26] centrx: mordof: It couldn't be too disastrous or they would have released a new version already
[15:00:30] centrx: mordof: another option is upgrade to Ruby 2.4.1
[15:00:35] centrx: mordof: that's the latest version
[15:03:16] mordof: centrx: struggling to find a good changelog from ruby 2.3.1 up to ruby 2.4.1 in human terms related to the regular ruby code, not the commit log, lol
[15:03:20] mordof: otherwise it'd be an easier choice
[15:03:34] cschneid_: has joined #ruby
[15:04:26] mustmodify___: has left #ruby: ()
[15:04:56] centrx: mordof: These are the main changes: https://www.ruby-lang.org/en/news/2016/12/25/ruby-2-4-0-released/
[15:04:59] mordof: the patch versions don't change anything though right? so really i should just be looking for an article that shows what's different between ruby 2.3 and 2.4?
[15:05:16] centrx: mordof: Ruby has had few/no breaking changes since like 1.9
[15:05:26] centrx: just new features and performance improvements mainly
[15:05:40] centrx: mordof: right 2.3 to 2.4
[15:05:52] bathtub_shark: has joined #ruby
[15:06:23] mordof: 2.2 had some stuff that completely broke our application (though that may had been a patch fix which resolved those)
[15:06:32] mordof: so we skipped that version entirely, heh
[15:07:07] mordof: regardless - i'll check out the differences, thanks :)
[15:08:51] Zarthus_: has joined #ruby
[15:09:35] rippa: has joined #ruby
[15:12:45] mikecmpbll: has joined #ruby
[15:13:31] cam27: has joined #ruby
[15:14:22] roamingdog: has joined #ruby
[15:15:12] roamingdog: has joined #ruby
[15:15:52] bsartek: has joined #ruby
[15:15:57] roamingdog: has joined #ruby
[15:16:48] roamingdog: has joined #ruby
[15:17:00] mim1k: has joined #ruby
[15:17:08] pb122: has joined #ruby
[15:17:38] roamingdog: has joined #ruby
[15:19:23] mordof: I'm a little nervous about the changes to the Hash, but it looks like it still preserves order (we're depending on that in some places) so i guess we'll just go for it and see how that goes
[15:19:31] mordof: i like the potential speed increase though
[15:20:01] havenwood: mordof: There're no breaking changes to Hash like in 1.8 to 1.9. The internal implementation details shouldn't come at any cost to the uer.
[15:20:28] haylon: has joined #ruby
[15:21:07] havenwood: mordof: We're happily using 2.4.1 in prod.
[15:23:06] jgnagy: has joined #ruby
[15:23:17] mordof: havenwood: cool, thanks for the confirm. i thought that's how it looked with the explanation, but was kinda difficult to tell as i'm not terribly familiar with how the doubly linked list implementation preserved/set order of elements either
[15:23:56] eightlimbed: has joined #ruby
[15:24:16] jrafanie: has joined #ruby
[15:25:29] centrx: mordof: What broke when you updated to 2.2?
[15:26:04] mordof: splats in keyed parameters for methods
[15:26:21] mordof: the new parameter definition style for methods*
[15:26:33] mordof: it wasn't passing the values into the method properly like 2.1 or 2.3 were
[15:26:36] mordof: so we just skipped 2.2
[15:28:33] mordof: i don't remember the exact situation, it was a weird edge case for how we were calling something... so it ended up being a *args that came from one method, passing it through to another - both using the new parameter definition....
[15:29:46] mordof: the final result was that, instead of the method being called with it matching the key: values properly, it tried to pass everything in as the first key'd value... so then it was complaining that the other keys had no values
[15:30:02] mordof: meanwhile the data being passed in clearly had all the keys satisfied
[15:30:57] centrx: anyway, generally Ruby upgrades very smooth
[15:31:49] mordof: at the time, we weren't trying to do a full production upgrade. we were in the process of bumping up from 2.1, and one of our developers was running 2.2... i think a bunch of us were testing out 2.3 on our dev machines but he upgraded a bit earlier before 2.3 was available
[15:32:03] mordof: so he encountered some oddities, and we just said "whatever, 2.3 is already here and it works.. so ditch 2.2"
[15:32:50] dasher00: has joined #ruby
[15:33:24] mordof: agreed - everythign has been pretty smooth i guess... we usually upgrade rails at the same time, so that's where a lot of the craziness comes from, lol
[15:33:32] skweek: has joined #ruby
[15:33:39] ghormoon: has joined #ruby
[15:38:19] hxegon: has joined #ruby
[15:39:25] ghormoon: has joined #ruby
[15:41:16] jackrandom: has joined #ruby
[15:45:12] pelegreno___: has joined #ruby
[15:45:38] brent__: has joined #ruby
[15:46:24] Muz: has joined #ruby
[15:48:42] gr0gg|ex: has joined #ruby
[15:48:50] webnanners: has joined #ruby
[15:49:16] gnarld_: has joined #ruby
[15:51:08] jasondotstar: has joined #ruby
[15:51:09] gusrub: has joined #ruby
[15:54:46] romank: has joined #ruby
[15:56:08] govg: has joined #ruby
[15:58:39] raspado: has joined #ruby
[15:58:44] roamingdog: has joined #ruby
[15:59:28] jetWhidbey: has joined #ruby
[15:59:57] audy: has joined #ruby
[16:01:10] raspado_: has joined #ruby
[16:02:55] roshanavand: has joined #ruby
[16:03:18] skweek: has joined #ruby
[16:10:25] uZiel: has joined #ruby
[16:10:47] hobodave: has joined #ruby
[16:14:34] t-recx: has joined #ruby
[16:20:25] perniciouscaffei: has joined #ruby
[16:20:49] cdg: has joined #ruby
[16:21:03] d^sh: has joined #ruby
[16:23:57] d^sh: has joined #ruby
[16:24:48] synthroid: has joined #ruby
[16:25:49] boombox_: has joined #ruby
[16:27:20] arup_r: has joined #ruby
[16:28:15] justizin: has joined #ruby
[16:31:55] AgentVenom: has joined #ruby
[16:34:26] rgr_: has joined #ruby
[16:37:33] nitric: has joined #ruby
[16:38:01] gusrub: has joined #ruby
[16:38:29] eightlimbed: has joined #ruby
[16:40:20] robnester: has joined #ruby
[16:41:53] rc48: has joined #ruby
[16:46:29] BlueDragons: has joined #ruby
[16:48:02] jrafanie: has joined #ruby
[16:48:07] pupsicle1: has joined #ruby
[16:49:03] rfoust: has joined #ruby
[16:49:13] cjhowe: has joined #ruby
[16:49:40] yeticry: has joined #ruby
[16:50:01] cjhowe: has joined #ruby
[16:50:48] cjhowe: has joined #ruby
[16:50:55] bernd27: has joined #ruby
[16:52:14] DeeJayh: has joined #ruby
[16:53:15] DeeJayh_: has joined #ruby
[16:53:22] armyriad: has joined #ruby
[16:57:18] skweek: has joined #ruby
[16:57:42] roshanavand: has joined #ruby
[16:59:46] ascarter: has joined #ruby
[17:01:57] duderonomy: has joined #ruby
[17:02:35] raspado: has joined #ruby
[17:03:51] gothicsouth: has joined #ruby
[17:05:29] whathappens: has joined #ruby
[17:07:48] GodFather: has joined #ruby
[17:08:37] bmurt: has joined #ruby
[17:09:16] Cohedrin: has joined #ruby
[17:10:40] JBbanks: has joined #ruby
[17:10:58] cdg: has joined #ruby
[17:11:27] jusa: has joined #ruby
[17:14:52] SeepingN: has joined #ruby
[17:14:55] JBbanks: has joined #ruby
[17:15:00] jrafanie_: has joined #ruby
[17:15:34] mordof: whoever told me the update to ruby 2.4 from 2.3 wasn't big lied, lol
[17:16:41] centrx: what's wrong?
[17:16:55] mordof: Fixnum deprecated *sighs*
[17:16:58] mordof: that breaks soo many things
[17:17:21] centrx: only for C extensions
[17:17:31] mordof: Fixnum class itself is deprecated in ruby
[17:17:34] mordof: can't be used anymore
[17:17:54] havenwood: well, there's a deprecation warning - it can be used
[17:18:07] olivier__: has joined #ruby
[17:18:13] havenwood: it is deprecated
[17:18:31] mordof: hrm.. right.. i may just be panicking/an idiot here... that means it still functions as normal for the time being then right?
[17:18:37] JBbanks: has joined #ruby
[17:18:42] havenwood: Fixnum #=> Integer
[17:19:04] olivier__: has joined #ruby
[17:19:09] centrx: mordof: deprecated just means it will be removed in the future
[17:19:20] apeiros: mordof: yes, it will still function normally
[17:19:23] havenwood: mordof: Yeah, it's just giving you a headsup that it is deprecated.
[17:19:32] centrx: mordof: don't use it for new implementations, and plan to get rid of it, but it will work fine now
[17:19:33] mordof: k... 0.is_a? Fixnum still evaluates to true
[17:19:38] mordof: ACTION sighs a giant sigh of relief
[17:19:42] jgpawletko: has joined #ruby
[17:20:15] havenwood: mordof: As you bump to newer versions of gems they should handle it gracefully
[17:20:33] havenwood: mordof: In your own code swap "Fixnum" or "Bignum" for "Integer"
[17:20:48] mordof: ACTION nods
[17:20:49] apeiros: global search & replace ain't that hard :-p
[17:20:53] olivier__: has joined #ruby
[17:20:57] Renich: has joined #ruby
[17:21:04] mordof: apeiros: gems are the main concern here. i'm not referring to Fixnum anywhere in our code
[17:21:17] rc48: has joined #ruby
[17:21:26] mordof: it triggered some pretty big version bumps on a number of gems that could be pretty volatile
[17:21:28] mordof: so i panicked
[17:22:01] centrx: quick, delete all your code
[17:22:03] olivier__: has joined #ruby
[17:22:22] mordof: ACTION runs rm -Rf * inside his working directory
[17:22:34] mordof: ACTION leaves work permanently
[17:22:42] apeiros: you forgot the backups
[17:22:52] mordof: ACTION deactivates the aws account
[17:23:01] mordof: ACTION deletes source control
[17:23:32] govg: has joined #ruby
[17:23:34] mordof: elasticsearch version bump... 1.0.14 -> 5.0.4 ... :/
[17:23:38] mordof: i'm not sure how i feel about this, lol
[17:23:49] olivier__: has joined #ruby
[17:24:09] apeiros: haha, maybe they pulled a java? (i.e. 1.5 -> 5.0)
[17:24:59] olivier__: has joined #ruby
[17:25:01] mordof: hey maybe... *checks*
[17:25:31] mordof: they went from 2 to 5.. so i missed a single major revision
[17:26:46] eightlimbed: has joined #ruby
[17:30:03] havenwood: 0.0.26 released on Feb 1 then 5.04 released Apr 7 ;-P
[17:30:43] havenwood: they maintain different versions of the gem to parallel elasticsearch versions
[17:35:54] mordof: what is this new class 'Warning' about also?
[17:36:51] apeiros: about unrescuable errors
[17:37:15] mordof: to be able to give deprecation warnings and the like i guess?
[17:37:26] chouhoulis: has joined #ruby
[17:37:32] synthroid: has joined #ruby
[17:37:47] Cohedrin: has joined #ruby
[17:38:18] mordof: ACTION renames his Warning class
[17:39:14] apeiros: it's a module. I don't really know what it is about. but it provides a #warn method
[17:40:13] mordof: in a pry console... it behaves identically to just using puts...
[17:40:18] mordof: i'm so confused why this is added :/
[17:40:31] apeiros: I'm quite certain it'll write to stderr, not stdout
[17:40:46] mordof: ah, so the same as STDERR.puts
[17:40:53] apeiros: and from the code I know it verifies the string is ascii only
[17:41:04] apeiros: probably more like $stderr.puts
[17:41:08] apeiros: don't use the constants
[17:41:21] mordof: using the constants are bad?
[17:41:24] mordof: why is that
[17:41:47] apeiros: it's inconsistent with Kernel behavior. they use the globals.
[17:42:23] apeiros: i.e. if you do `$stdout = SomeOtherIO`, then `puts "foo"` and `STDOUT.puts "foo"` will behave differently.
[17:42:25] mordof: i'm guessing because $stderr could be reconfigured to point somewhere else?
[17:42:34] mordof: good point.
[17:42:50] apeiros: I consider the constants to mostly be backups
[17:43:07] mordof: so STDERR/STDOUT are the default interfaces, but you can configure to use different ones across the board easily by setting $stderr and $stdout
[17:43:18] mordof: and *everything* uses those?
[17:43:33] apeiros: everything from core afaik
[17:43:42] DoubleMalt: has joined #ruby
[17:43:43] mordof: apeiros: thanks :)
[17:46:06] d^sh: has joined #ruby
[17:47:52] Cohedrin: has joined #ruby
[17:49:26] Alina-malina: has joined #ruby
[17:49:39] dru`: as ruby devs, anyone want to weigh in on how they'd improve the syntax of some inline unit tests like https://github.com/drusepth/inline-tests/blob/master/examples/04_operators.rb if your bossman suggested using this framework? :)
[17:50:15] bsartek: has joined #ruby
[17:51:20] apeiros: dru`: that's interesting. but I'd prefer inline contracts (pre-, postconditions and class invariants). sadly ruby lacks "old".
[17:51:51] apeiros: proper tests IMO take too much space to be inlined
[17:52:37] dru`: very good point
[17:53:27] Alina-malina: has joined #ruby
[17:54:19] dru`: hrm, I'm trying to tackle how awful it is that unit tests aren't immediately/easily found for any arbitrary function, but I'm definitely unsure of the testing syntax after writing some examples and seeing how much they explode method lengths
[17:54:54] velocity64: has joined #ruby
[17:54:56] apeiros: uh, proper conventions should help with that
[17:55:36] pb122: has joined #ruby
[17:59:40] velocity64: has joined #ruby
[18:01:59] ascarter: has joined #ruby
[18:07:31] marxarelli: has joined #ruby
[18:08:15] haylon: has joined #ruby
[18:09:14] jackjackdripper: has joined #ruby
[18:11:04] Hanna: has joined #ruby
[18:14:26] im0nde: has joined #ruby
[18:17:45] haylon: has joined #ruby
[18:18:19] workmad3: has joined #ruby
[18:20:16] Authenticator: Has anyone gotten Mutual-TLS working with Typhoeus? I can't figure out what options it wants and I keep getting an ssl_certproblem error when trying to specify the client cert/key/pass.
[18:21:45] postmodern: has joined #ruby
[18:24:10] jenrzzz: has joined #ruby
[18:24:10] jenrzzz: has joined #ruby
[18:24:50] ascarter: has joined #ruby
[18:26:20] dru`: If I have a function that takes a block to yield to (e.g. def foo; yield 5; end) and call it with foo { |x| puts x }, is there any way I can get a reference to the block that's being yielded to (|x| { puts x }) from within foo?
[18:26:46] xaxisx: has joined #ruby
[18:28:18] mordof: dru`: i *think* def foo(&block); block.call(5); end ends up being the same thing? if yield 5 still works in that, i'm not sure...
[18:28:21] mordof: i haven't done much of that
[18:28:31] mordof: and i have no idea what the implications are
[18:30:06] dru`: ah, you're right
[18:30:31] CacoS: has joined #ruby
[18:30:46] dru`: I got things mixed up since it'll take a block even if you don't specify one in the params
[18:31:50] mordof: you're welcome
[18:32:26] centrx: has joined #ruby
[18:32:27] centrx: has joined #ruby
[18:39:11] _whitelogger: has joined #ruby
[18:44:55] jackjackdripper1: has joined #ruby
[18:45:40] Authenticator: Typhoeus issue solved - the keypassword option is :keypasswd (note spelling) and you need to set the sslcerttype to 'p12' (if using a pkcs12 format keystore...)
[18:48:10] jackjackdripper: has joined #ruby
[18:56:16] Mia: has joined #ruby
[18:56:42] mim1k: has joined #ruby
[18:56:45] jobewan: has joined #ruby
[18:57:40] vondruch: has joined #ruby
[18:58:04] watersoul: has joined #ruby
[18:58:33] Dimik: has joined #ruby
[18:58:52] loechel: has joined #ruby
[18:59:09] haylon: has joined #ruby
[19:01:32] jrafanie: has joined #ruby
[19:02:12] TinkerTyper: has joined #ruby
[19:03:49] ironcamel: has joined #ruby
[19:05:13] bodie_: has joined #ruby
[19:05:32] brent__: has joined #ruby
[19:05:54] clamstar: has joined #ruby
[19:06:13] weaksauce: has joined #ruby
[19:08:30] gnarf: has joined #ruby
[19:10:10] gothicsouth: has joined #ruby
[19:10:12] cjhowe: has joined #ruby
[19:11:06] haylon: has joined #ruby
[19:14:09] Kug3lis: has joined #ruby
[19:14:11] mikecmpbll: has joined #ruby
[19:14:39] mim1k: has joined #ruby
[19:15:36] gnarld_: has joined #ruby
[19:18:46] quobo: has joined #ruby
[19:24:37] dviola: has joined #ruby
[19:26:25] mtkd: has joined #ruby
[19:31:11] bsartek: has joined #ruby
[19:31:43] dionysus69: has joined #ruby
[19:31:51] mim1k: has joined #ruby
[19:39:48] spheric: has joined #ruby
[19:40:41] Ferdroid: has joined #ruby
[19:41:47] GodFather: has joined #ruby
[19:43:05] __Yiota: has joined #ruby
[19:44:29] Ferdroid: has left #ruby: ()
[19:45:08] Cohedrin: has joined #ruby
[19:46:55] jrafanie: has joined #ruby
[19:47:02] baweaver: alo zenspider
[19:47:34] baweaver: you ever played with protocol buffers?
[19:47:48] baweaver: heard they're broken in Ruby, trying to find out why.
[19:47:52] ur5us: has joined #ruby
[19:47:55] Ferdroid: has joined #ruby
[19:49:05] zenspider: I have not. you talking about google's thingy? Mike Moore might have hooks into that now
[19:53:39] haylon: has joined #ruby
[19:53:58] stormbytes: is there a way to handle OptionParser::MissingArgument rather than getting the error output on stderr
[19:54:01] Coldblackice_: has joined #ruby
[19:56:07] zenspider: stormbytes: `ri OptionParser` and search for "optional"
[19:56:42] stormbytes: I never got ri to work
[19:56:47] zenspider: so get ri to work
[19:56:49] stormbytes: says Nothing known for everything
[19:56:55] zenspider: ri OptionParser.make_switch is more direct
[19:57:10] havenwood: stormbytes: how did you install Ruby? we can help you to get ri working.
[19:57:21] stormbytes: brew install ruby
[19:57:57] zenspider: `brew options ruby` => --with-doc
[19:58:18] stormbytes: ah, so.. i just re-install?
[19:58:41] stormbytes: will that reinstall ruby + docs or just add the docs?
[19:59:01] Cohedrin: has joined #ruby
[19:59:04] havenwood: stormbytes: brew reinstall ruby --with-doc
[19:59:10] havenwood: brew will reinstall ruby with docs
[20:04:52] raul782: has joined #ruby
[20:06:58] stormbytes: havenwood ty
[20:07:17] mim1k: has joined #ruby
[20:07:32] nobitanobi: has joined #ruby
[20:07:39] Murda: has joined #ruby
[20:08:03] stormbytes: zenspider checked the docs on OptionParser switch, don't see anything on how to handle the output of OptionParser::MissingArgument, which is what i'd like to do
[20:08:16] Murda: How can I install gem globally?
[20:08:32] havenwood: Murda: Just plain ole: gem install
[20:08:32] stormbytes: don't all gems install globally?
[20:08:56] Murda: Dont I need sudo privileges?
[20:09:11] stormbytes: i don't miss NPM
[20:09:22] zenspider: stormbytes: read my suggestion again
[20:09:22] havenwood: Murda: That depends on your setup. RubyGems can be configured to install gems for the local user or in a system location.
[20:09:56] zenspider: Murda: it depends on how your ruby was installed... if IT was installed with sudo, then your gem install will probably need sudo
[20:09:57] elomatreb: If you want to have executables from gems you need a directory in your PATH
[20:10:22] Murda: Worked with installing as root
[20:10:24] havenwood: Murda: You can set GEM_HOME or the `--user-install` flag will install in user's home directory instead of GEM_HOME.
[20:11:11] havenwood: Option flags can be set per command or globally in the ~/.gemrc file.
[20:12:31] Cohedrin: has joined #ruby
[20:14:29] rfoust: has joined #ruby
[20:15:53] jenrzzz: has joined #ruby
[20:15:53] jenrzzz: has joined #ruby
[20:15:58] cdg: has joined #ruby
[20:15:59] Ashkin: has joined #ruby
[20:16:23] Ashkin: has left #ruby: ()
[20:17:23] cdg: has joined #ruby
[20:17:54] raul782: has joined #ruby
[20:20:46] shinnya: has joined #ruby
[20:22:28] rfoust: has joined #ruby
[20:25:32] patarr1: has joined #ruby
[20:29:14] dionysus69: is it possible to use selenium webdriver in headless mode?
[20:30:54] rfoust: has joined #ruby
[20:31:24] bsartek: has joined #ruby
[20:34:07] eightlimbed: has joined #ruby
[20:35:49] zenspider: ok... so a client got a rails app started while developing on windows. The Gemfile.lock has binary dependencies for windows. When I did bundle on osx, it added extra lines for pure ruby deps. Like: bcrypt (3.1.11) & bcrypt (3.1.11-x86-mingw32). Is that the right thing for it to do?
[20:36:01] zenspider: seems like it'll be a versioning nightmare to me
[20:42:40] raul782: has joined #ruby
[20:44:03] muelleme: has joined #ruby
[20:44:16] rfoust: has joined #ruby
[20:49:41] hndk: has joined #ruby
[20:50:30] rfoust: has joined #ruby
[20:51:58] agent_white: has joined #ruby
[20:52:40] BTRE: has joined #ruby
[20:53:14] ecuanaso: has joined #ruby
[20:53:58] nobitanobi: has joined #ruby
[20:55:47] nhhc: has joined #ruby
[20:59:53] volty: has joined #ruby
[21:00:40] mordof: zenspider: you can put those inside operating system checks
[21:01:02] mordof: the gemfile entries at least
[21:01:37] tomphp: has joined #ruby
[21:04:40] zenspider: mordof: what do you mean? it still seems like I might bump a version but it'll only happen on the pure ruby side and windows will have to bump separately... no?
[21:04:45] minimalism: has joined #ruby
[21:11:06] bsartek: has joined #ruby
[21:15:46] havenwood: tell those windows devs to use the windows subsystem for linux >.>
[21:16:30] elomatreb: So, Wine? :P
[21:16:55] elomatreb: Nevermind, it's actually called that oo
[21:17:52] jenrzzz: has joined #ruby
[21:17:52] jenrzzz: has joined #ruby
[21:19:41] mordof: has joined #ruby
[21:19:53] t0d0r: has joined #ruby
[21:19:56] havenwood: https://msdn.microsoft.com/en-us/commandline/wsl/about
[21:20:30] havenwood: https://github.com/Microsoft/BashOnWindows
[21:21:15] havenwood: I'll I've done on it is setup a few folk with working Ruby/Rails/Postgres. But it does *just work* for that.
[21:22:21] zenspider: havenwood: only one other dev and they're willing to switch to mac to make things smoother... but in the meantime...
[21:22:23] ur5us: has joined #ruby
[21:23:43] zenspider: cool. I'll throw those urls at them and see what sticks
[21:24:50] Azure: has joined #ruby
[21:27:09] olivier__: has joined #ruby
[21:28:18] roamingdog: has joined #ruby
[21:30:00] jrafanie: has joined #ruby
[21:30:23] tvw: has joined #ruby
[21:32:34] olivier__: has joined #ruby
[21:33:22] ur5us: has joined #ruby
[21:34:31] gothicsouth: has joined #ruby
[21:34:54] ecuanaso: has joined #ruby
[21:36:11] zenspider: it DOES seem to update both sides at the same time
[21:36:13] Kevin: has joined #ruby
[21:36:34] brent__: has joined #ruby
[21:38:48] roshanavand: has joined #ruby
[21:39:33] kevinSJ: has joined #ruby
[21:40:03] eightlimbed: has joined #ruby
[21:44:36] HoierM_: has joined #ruby
[21:46:33] jusa: has joined #ruby
[21:58:41] _moep_: has joined #ruby
[22:00:07] GinoMan: has joined #ruby
[22:02:40] _moep_: hello, I try to use ruby with rbenv, but Im not able to install ruby 2.2.4. imho its searching for YAML. Ruby 2.1.0 is installed, but Im not able to install bundler for 2.1.0 - it asks "there is still a ruby 2.2.4". How can I fix it?
[22:02:56] relyks: has joined #ruby
[22:03:11] bsartek: has joined #ruby
[22:03:22] jrafanie_: has joined #ruby
[22:06:25] t0d0r: _moep_: can you paste command that you are trying
[22:07:16] bvcosta: has joined #ruby
[22:07:28] _moep_: t0d0r: when I try to install it?
[22:10:32] Rich_Morin: has joined #ruby
[22:11:42] j0bk: has joined #ruby
[22:11:52] t0d0r: _moep_: yes
[22:12:14] t0d0r: how did you try to install ruby 2.2.4
[22:12:32] _moep_: rbenv install 2.2.4
[22:13:03] t0d0r: and it fails with error?
[22:14:23] _moep_: but it fails with the argument that its missing yaml (but under debian all related yaml stuff is installed). when I choose 2.1.0 it fetchs yaml-0.1.6 from cloudfront
[22:15:26] rfoust: has joined #ruby
[22:17:53] patarr: has joined #ruby
[22:18:16] Pumukel: has joined #ruby
[22:19:07] olivier__: has joined #ruby
[22:20:22] havenwood: _moep_: libyaml-dev
[22:20:41] tvw: has joined #ruby
[22:20:49] _moep_: havenwood: as I said: its installed
[22:22:18] Rich_Morin_: has joined #ruby
[22:22:46] ecuanaso: has joined #ruby
[22:23:42] raul782: has joined #ruby
[22:24:45] havenwood: _moep_: I'm uncertain what your issue is but the latest Ruby 2.2 is 2.2.7, with multiple bug and security fixes since 2.2.4. It's ABI compatible.
[22:24:57] relyks: i'm having trouble coming up with a solution to this problem. i have an array with objects. each object has 2 properties. i'm trying to optimize based on a constraint. i want the array to be sorted based on the minimum of the first property and the maximum of the second property. like let's say the array consists of type person. each person has a number of dogs and number of cats. i'm trying to find the person with the least number of cats and m
[22:24:57] relyks: ost number of dogs. does anyone have an idea of how i could approach this?
[22:25:04] havenwood: _moep_: Does it fail on 2.2.7?
[22:25:22] _moep_: havenwood: let my check it
[22:26:08] havenwood: relyks: How do you determine least cats and most dogs? Dogs minus cats?
[22:27:04] havenwood: >> [[1, 5], [4, 6], [9, 2]].max_by { |cats, dogs| dogs - cats } # relyks
[22:27:05] _moep_: havenwood: the newest is 2.3.0 or 2.4.0-dev
[22:27:05] ruby[bot]: havenwood: # => [1, 5] (https://eval.in/805478)
[22:27:14] relyks: havenwood: i think that's what i'm having trouble figuring out
[22:27:17] havenwood: _moep_: The best Ruby to use is 2.4.1, the latest stable.
[22:27:24] jshjsh: has joined #ruby
[22:27:38] havenwood: _moep_: If you can't upgrade from Ruby 2.2 at the moment, the latest Ruby 2.2 is 2.2.7.
[22:28:23] _moep_: I could use 2.3 but it fails every time
[22:28:24] havenwood: _moep_: 2.2 doesn't receive bugfixes but still receives security updates.
[22:28:39] havenwood: 2.2. is in the security maintenance phase.
[22:28:40] relyks: havenwood: wtf, that totally works :D how did you come with that?
[22:28:46] relyks: thanks so much :)
[22:29:04] havenwood: relyks: Dogs and cats playing in my head, then they started fighting so I wrote that code.
[22:29:05] _moep_: havenwood: ah ok. thats why Im asking^^
[22:29:20] roamingdog: has joined #ruby
[22:29:46] havenwood: _moep_: We can probably help you get up to 2.3.4 or 2.4.1 (latest stable 2.3 and 2.4) if you want.
[22:29:59] havenwood: _moep_: Or if you don't want, 2.2.7 should just work.
[22:31:14] relyks: havenwood: i'm having trouble understanding why subtracting one from the other works
[22:32:07] relyks: i'll think about it more. thanks so much havenwood :)
[22:32:23] havenwood: relyks: you're welcome, any time
[22:33:15] _moep_: havenwood: I dont have one of these in my install tree. It is 2.2.7 rbx-2.2.7?
[22:33:36] Rich_Morin: has joined #ruby
[22:33:44] havenwood: _moep_: Ruby 2.2.7. Regular CRuby.
[22:33:54] havenwood: _moep_: Update ruby-build if you're using Rbenv for installation.
[22:34:19] havenwood: I'm sure they have the definition.
[22:35:04] havenwood: _moep_: You can always use ruby-install for Rbenv as well, if you run into issues with ruby-build: https://github.com/postmodern/ruby-install#integration
[22:37:29] _moep_: havenwood: ok thanks! I have try
[22:38:33] _moep_: havenwood: so if I choose this: ruby-install --install-dir ~/.rbenv/versions/2.4.0 ruby 2.4.0 my problem would be solved?
[22:39:04] havenwood: _moep_: use Ruby 2.4.1
[22:39:34] _moep_: but with the same tool?
[22:39:38] havenwood: _moep_: but yes, that's worth a shot - you may still have libyaml issues but we can probably help you get those sorted
[22:39:58] havenwood: ruby-install --latest --install-dir ~/.rbenv/versions/2.4.1 ruby 2.4.1
[22:40:24] postmodern: has joined #ruby
[22:43:03] _moep_: havenwood: I want to install it as systemuser and I didnt set a password
[22:43:13] zenspider: dogs minus cats is wrong
[22:43:20] _moep_: and now It asks me for sudo
[22:43:56] havenwood: zenspider: Is it dog-to-cat ratio they're looking for? I didn't get it.
[22:44:14] havenwood: I think subtracting cats is always wrong.
[22:44:26] bathtub_shark: has joined #ruby
[22:45:08] zenspider: relyks: maybe: owners.sort_by { |o| [o.cats, -o.dogs] }... least cats will be first, ties on least cats will be most dogs. doesn't guarantee dogs tho.
[22:45:30] d^sh: has joined #ruby
[22:46:01] relyks: why is it wrong?
[22:46:32] relyks: using havenwood's code as an example, i did owners.sort_by { |cats, dogs| cats - dogs }
[22:47:01] relyks: zenspider: i have no idea how your snippet works :D
[22:47:43] relyks: oh wait, i see how it works
[22:47:44] havenwood: relyks: If you want to sort say first by cats, then if the cat number is the same order secondarily by dogs, you can use an array with [cat, dog] in your block.
[22:47:59] relyks: yeah that makes sense
[22:48:04] havenwood: or negative dogs, whatever you want to secondarily sort by
[22:49:51] _moep_: how can I skip the sudo part? its a systemuser
[22:51:38] zenspider: relyks: least cats and most dogs, in that priority order?
[22:52:20] relyks: zenspider: yeah
[22:52:37] Cohedrin: has joined #ruby
[22:55:29] zenspider: how would you want `owners = [[0, 0], [10, 15], [3, 5]]` to be sorted?
[22:55:42] zenspider: >> owners = [[0, 0], [10, 15], [3, 5]]; owners.sort_by { |(c, d)| c-d }
[22:55:44] ruby[bot]: zenspider: # => [[10, 15], [3, 5], [0, 0]] (https://eval.in/805481)
[22:55:50] zenspider: >> owners = [[0, 0], [10, 15], [3, 5]]; owners.sort_by { |(c, d)| [c, -d] }
[22:55:51] ruby[bot]: zenspider: # => [[0, 0], [3, 5], [10, 15]] (https://eval.in/805482)
[22:56:30] havenwood: _moep_: what sudo part?
[22:56:36] havenwood: _moep_: installing packages?
[22:56:49] _sfiguser: has joined #ruby
[22:57:29] havenwood: _moep_: --no-install-deps
[22:57:35] bathtub_shark: has joined #ruby
[22:57:46] _moep_: havenwood: yes, then I dont need it?
[22:57:52] roamingdog: has joined #ruby
[22:58:27] olivier__: has joined #ruby
[22:58:29] eightlimbed: has joined #ruby
[22:58:46] havenwood: _moep_: right
[22:59:05] havenwood: _moep_: but you'll need the deps to already be installed
[22:59:06] havenwood: _moep_: since it won't then install them
[22:59:47] eightlimbed: This is the last line of a method: pairs.count(false) == 1
[22:59:57] eightlimbed: it returns an array
[23:01:01] _moep_: havenwood: my idea was, that the new ruby have the same fileowner like the rest
[23:01:07] zenspider: eightlimbed: did you have a question?
[23:01:58] eightlimbed: zenspider: i think i figured out my question as i was about to type it
[23:02:02] eightlimbed: sorry to bother
[23:10:11] relyks: zenspider: i'd want the first one
[23:11:49] _moep_: havenwood: now I get the same errors like in the begin: https://paste.debian.net/hidden/a9ff62cb/
[23:13:09] havenwood: _moep_: and you installed libyaml-dev not just libyaml?
[23:13:16] _moep_: havenwood: yes
[23:13:28] _moep_: havenwood: wait
[23:13:32] _moep_: I have both installed
[23:13:38] havenwood: that's fine
[23:13:40] relyks: zenspider: i think yours is the correct solution
[23:13:58] relyks: because i need prioritize least cats over most dogs
[23:14:28] relyks: lol, this is also funny that i'm using this an example, but it's analogous to what i'm doing
[23:14:40] relyks: i'm not actually sorting cats and dogs :)
[23:14:43] havenwood: _moep_: Note: /usr/local/rvm/gems/ruby-2.2.1/gems/psych-2.2.4/lib/psych.so (LoadError)
[23:14:55] _moep_: havenwood: when I want to do know bundle update I get "rbenv: bundle: command not found" and "The `bundle' command exists in these Ruby versions: 2.2.4"
[23:15:05] havenwood: _moep_: gem install bundler
[23:15:31] havenwood: _moep_: The Psych that's freaking is from RVM, not Rbenv. You seem to have a borked install.
[23:15:34] _moep_: thats the same outoput
[23:15:44] havenwood: How is RVM involved here? Why?
[23:16:04] _moep_: I dont know.
[23:16:17] havenwood: _moep_: On Ruby 2.4.1: gem install bundler && bundle
[23:16:59] _moep_: It was a existing installation but something gone wrong after upgrade of serveral packages
[23:17:06] havenwood: _moep_: Sanity check `which gem`, `which ruby`, `which bundle` and `gem which bundler`. Are they all rbenv Ruby?
[23:17:21] havenwood: _moep_: Are you using RVM? If not, uninstall RVM.
[23:17:28] havenwood: _moep_: rvm implode --force
[23:17:36] havenwood: Then restart.
[23:17:53] _moep_: gem same output like below
[23:18:06] havenwood: After uninstalling RVM or after bundling?
[23:18:17] _moep_: after gem which bundler
[23:18:20] gothicsouth: has joined #ruby
[23:18:37] snockerton: has joined #ruby
[23:18:51] _moep_: and rvm shouldnt be involved
[23:19:05] _moep_: but I remember, that I did somthing like gem update
[23:20:10] _moep_: which ruby: /home/app/.rbenv/shims/ruby
[23:20:41] havenwood: _moep_: Have you uninstalled RVM yet?
[23:20:55] _moep_: I never had it installed
[23:21:06] havenwood: Pick a Ruby version switch (**cough** chruby) and uninstall the others.
[23:21:09] havenwood: _moep_: Yet it is installed!
[23:21:31] ecuanaso: has joined #ruby
[23:21:38] im0nde_: has joined #ruby
[23:21:49] havenwood: _moep_: You'll probably have a much better experience with just Rbenv *OR* RVM, but not both.
[23:22:12] jenrzzz_: has joined #ruby
[23:22:26] _moep_: when I search via dpkg for rvm I dont fine something
[23:22:31] _moep_: and I dont want to use both
[23:23:05] havenwood: Did you run?: rvm implode --force
[23:23:41] _moep_: no - because I dont want to reboot the machine now
[23:24:16] havenwood: Or you could uninstall it and not reboot. But do uninstall it if you're not using it. It's not good practice to have ruby version managers lying around muddling up your environment.
[23:25:40] _moep_: havenwood: do you know maybe the package name?
[23:26:04] havenwood: _moep_: It is often installed not via package.
[23:26:41] _moep_: so how can I install/delete it`
[23:27:34] havenwood: rvm implode --force
[23:29:15] hndk: has joined #ruby
[23:30:03] Papierkorb: has joined #ruby
[23:30:55] arquebus: has joined #ruby
[23:33:03] _moep_: havenwood: woah its running :)
[23:33:26] havenwood: _moep_: hooah
[23:33:54] _moep_: is it nessecary to run this again: cd ~/redmine && bundle exec gem install unicorn ?
[23:34:06] _moep_: (after the first install)
[23:34:21] havenwood: once it's installed, it's installed
[23:34:44] GodFather: has joined #ruby
[23:35:55] roamingdog: has joined #ruby
[23:36:45] roamingdog: has joined #ruby
[23:37:30] roamingdog: has joined #ruby
[23:38:18] roamingdog: has joined #ruby
[23:39:08] roamingdog: has joined #ruby
[23:39:16] _moep_: havenwood: hm but now unicorn did after I tried to restart it
[23:39:40] boombox_: has joined #ruby
[23:39:58] roamingdog: has joined #ruby
[23:40:11] roshanavand: has joined #ruby
[23:40:45] roamingdog: has joined #ruby
[23:41:30] rc48: has joined #ruby
[23:42:23] herbmillerjr: has joined #ruby
[23:44:07] jrafanie: has joined #ruby
[23:44:44] zenspider: bundle exec gem install????
[23:45:10] _moep_: Removing stale pid
[23:45:10] _moep_: master failed to start, check stderr log for details
[23:45:13] ahrs: has joined #ruby
[23:45:24] zenspider: bundle exec ls
[23:47:03] havenwood: _moep_: You don't need to ever prefix `bundle exec` to a command unless you want it to run with the exact versions of the gems in the Gemfile.lock. (You'll never want that with the `gem` command itself.)
[23:47:28] jusa: has joined #ruby
[23:47:59] _moep_: ok so whats the good way to run my unicorn?
[23:52:44] havenwood: _moep_: unicorn
[23:53:31] jackjackdripper: has joined #ruby
[23:53:43] _moep_: hm I found this:
[23:53:44] _moep_: The `unicorn' command exists in these Ruby versions:
[23:54:55] havenwood: _moep_: You need to install the unicorn gem on the Ruby you want to use it with. What is it you're doing?
[23:55:08] havenwood: Does it have a Gemfile? Link?
[23:55:20] havenwood: _moep_: Read the unicorn README.
[23:56:12] _moep_: ah ok. its installed but same error
[23:56:16] havenwood: _moep_: The install and usage sections should have the bare minimum for getting it up and running.
[23:56:44] havenwood: ?rbenv _moep_
[23:56:44] ruby[bot]: _moep_: Missing command under rbenv? Did you try `rbenv rehash`?
[23:57:19] _moep_: its there but:
[23:57:20] _moep_: rack not available, functionality reduced
[23:57:20] _moep_: rack and Rack::Builder must be available for processing config.ru
[23:57:35] havenwood: _moep_: gem install rack
[23:57:49] havenwood: _moep_: What is it you're doing? Getting someone else's app to run? Rails?
[23:57:53] al2o3-cr: has joined #ruby
[23:58:10] _moep_: havenwood: try to run redmine
[23:58:52] bambanx: has joined #ruby
[23:59:59] _moep_: havenwood: https://paste.debian.net/hidden/4a573a27/