mc_fail

Activity Graph

Page 1 of 2 | Next »

2017-09-27

[04:29:52] mc_fail: *.net *.split

2017-09-21

[20:15:40] mc_fail: has joined #ruby
[20:16:20] mc_fail: io have the old good "common.rb:155:in `parse': 757: unexpected token at {"
[20:16:23] mc_fail: what the hell?
[20:16:33] mc_fail: my json is correct
[20:16:44] mc_fail: jsonlint validates it
[20:23:01] mc_fail: https://gist.github.com/anonymous/255b67dfef0b5ccb6374885aeab2b96f - here it is
[20:23:32] mc_fail: is it supposed to be one liner

2017-06-19

[21:21:43] mc_fail: *.net *.split

2017-05-17

[14:23:00] mc_fail: i'm trying to implement expression like e = a || c.key?(:d) ? b : 'bla'
[14:23:53] mc_fail: so, i expect e = a when a is presented, a = b when c.key(:d) is there, and 'bla' if nothing is presented
[14:24:05] mc_fail: but somehow, in this case a always equals b
[14:24:14] mc_fail: for example https://gist.github.com/anonymous/1e599e1ff6248167e8c753c89b6fa124
[14:24:29] mc_fail: this feels ridiculous
[14:25:54] mc_fail: matthewd now it works
[14:26:05] mc_fail: is this some parsing problem?
[14:28:02] mc_fail: still weird
[14:29:54] mc_fail: well, than i can do something like ( a || b ) || c
[14:30:04] mc_fail: instead of ternary operator
[14:31:28] mc_fail: ljarvis to provide employment for people who are going to maintain all the brackets and pipes I wrote?
[14:32:14] mc_fail: or you mean just to stick with plain if .. else ?
[14:37:38] mc_fail: ljarvis not really
[14:37:53] mc_fail: dminuoso what would you suggest?
[14:39:32] mc_fail: dminuoso you don't want to know...

2017-03-18

[18:02:08] mc_fail: ho do I include yaml-config to the gem?
[18:02:32] mc_fail: i mean, i can include it indeed, but how do I set path tho it in my app?

2017-03-14

[14:21:07] mc_fail: is there any way to distribute my .yaml configs with gems?
[14:21:35] mc_fail: like, i have an app which has condig file in etc/config.yaml inside the gem
[14:21:45] mc_fail: how do i read it from the app itself
[14:21:56] mc_fail: considering that every path for this gem can be different
[14:22:11] mc_fail: (depending where you install it)

2017-03-13

[10:57:56] mc_fail: is there any simple way to convert hash like a = {:c => 3, :b => 1} to array [:c,:c,:c,:b] ?
[11:02:45] mc_fail: matthewd i'm not getting how
[11:03:17] mc_fail: basically :c => 3, means there are 3 x :c symbols should be addedd to the array
[11:05:50] mc_fail: a.flat_map{ |k,v| [k] * v }
[11:05:54] mc_fail: this works
[11:05:57] mc_fail: thanks folks
[19:58:01] mc_fail: guys, is there any .map way to merge two hashes, to hashes of hashes, like if i have a = {"c"=>4,"d"=>5} and b = {"c"=>40,"d"=>50}, and i want to have {"c"=>{"a"=>4,b=20},"d"={"a"=>5,"b"=>50}}
[19:59:42] mc_fail: yeah, it was 40
[20:23:17] mc_fail: another question, i have ClassA which has methodA(var), also, there is ClassB < ClassA, which implements methodB(var), when i call methodA(var) inside methodB var is nil there
[20:25:56] mc_fail: https://gist.github.com/anonymous/99bde1360b9fbfca4d3d21bdf9964222

2017-03-08

[10:46:41] mc_fail: ok, i finally migrated this damn website to rrails 4
[10:46:50] mc_fail: but somehow assets still don't work
[10:47:17] mc_fail: at least i don't see anything from application.js in generated html pages
[10:47:20] mc_fail: where i should dig?
[10:55:25] mc_fail: _3dwardsharp do i have to precompile them in devo?
[10:55:35] mc_fail: if i have config.assets.compile = true ?
[11:00:42] mc_fail: _3dwardsharp rake test fails in a weird way
[11:00:46] mc_fail: btw, https://gist.github.com/anonymous/1221936728991cf5a6a12f2aa66d2d73
[11:00:50] mc_fail: why is that?
[11:01:10] mc_fail: i use in-memory database, and according to the log i see that table was inserted
[11:09:17] mc_fail: not really https://gist.github.com/anonymous/b21af77307e26df315ec8861ef5e62da
[11:14:51] mc_fail: _3dwardsharp but don't all this create_table mean that schema.rb is loaded?
[11:15:06] mc_fail: i don't even have an ide whare it is loaded
[11:15:15] mc_fail: it seems like ruby magic triggers it somehow
[11:19:44] mc_fail: it seems like some magic is done by factory_girl
[13:47:00] mc_fail: why does my rails request different css after upgrading to rails 4?
[13:47:03] mc_fail: like /stylesheets/all.css
[13:47:10] mc_fail: i've never had it
[13:48:30] mc_fail: everything i have in /public/stylesheets

2017-03-07

[16:44:29] mc_fail: i'm trying to migrate from rails 3 to rails 4, but i'm getting weird error about my schema.rb
[16:44:32] mc_fail: https://gist.github.com/anonymous/d3ab1a347eb2ba9c47b78102ff42b030
[16:44:39] mc_fail: that's the part of the schema
[16:45:18] mc_fail: whem i launch my unit tests i'm getting ArgumentError: you can't redefine the primary key column 'host_location_id'. To define a custom primary key, pass { id: false } to create_table.
[16:45:25] mc_fail: what should i change?
[16:47:53] mc_fail: according to the source, it seems like activerecord wants my private key to be integer
[16:48:07] mc_fail: i also have composite keys
[16:49:52] mc_fail: matthewd yeah, i just copipasted with a mistake
[16:50:08] mc_fail: anyway, how do i fix this id issue?
[16:51:14] mc_fail: yeah, than it will be an integer
[16:51:19] mc_fail: what if it's string?
[16:55:16] mc_fail: is there any way to pass more than 1 column to :id ?
[16:55:25] mc_fail: if i have composite key, for example?
[16:56:47] mc_fail: hmm, but how did :primary_keys => "host_id,ec2_instance_id", work on rails 3?
[16:56:59] mc_fail: i'm just trying to figure out how should i change it
[16:58:17] mc_fail: doesn't look like
[16:59:02] mc_fail: it seems like it newer worked, hmm
[19:47:55] mc_fail: hi everyone, again
[19:51:28] mc_fail: i'm still trying to migrate my app to rails 4 and i'm getting weird error
[19:51:30] mc_fail: You tried to define an association named changes on the model HostmanagerConfig, but this will conflict with a method changes already defined by Active Record. Please choose a different association name.
[19:51:42] mc_fail: for this model https://gist.github.com/anonymous/f74733a83b99ea571781b52a7c2f7998
[19:52:05] mc_fail: the issue is, i really don't have anything named changes in HostmanagerConfig
[19:52:27] mc_fail: i don't even have a rough idea what is wrong
[19:55:06] mc_fail: is changes - some reserved name for rails methods?
[19:55:56] mc_fail: oh, fixing this one is going to be painful
[20:40:32] mc_fail: now it complains about :conditions keyword
[21:35:19] mc_fail: ok, that's a weird one
[21:35:20] mc_fail: https://gist.github.com/anonymous/1221936728991cf5a6a12f2aa66d2d73
[21:35:31] mc_fail: it creates the table and i have it in schema.rb
[21:35:34] mc_fail: but test fails
[21:36:01] mc_fail: (i'm still upgrading from 3x to 4x)
[21:38:03] mc_fail: still why it might happen?
[21:38:51] mc_fail: the same tests worked fine in 3.2
[21:58:04] mc_fail: where does it create "in-memory" sqlite?
[21:58:14] mc_fail: is it in /dev/shm?
[22:12:19] mc_fail: what exactly does rake test triggers?
[22:12:35] mc_fail: i cannot find where this database is populated
[22:12:48] mc_fail: even though i see it is being populated in logs

2016-07-22

[10:52:02] mc_fail: has joined #ruby

2016-07-01

[21:53:10] mc_fail: Write error: Broken pipe

2016-06-30

[09:06:16] mc_fail: has joined #ruby

2016-06-15

[23:12:59] mc_fail: *.net *.split

2016-06-05

[22:38:27] mc_fail: hi everyone
[22:38:54] mc_fail: why i'm getting logger.level = 0 in http://pastebin.com/7ZZwbbgJ ?
[22:39:30] mc_fail: whatever, in https://gist.github.com/anonymous/a9a08ce287d6d2dc5781f541479cf032
[22:39:55] mc_fail: as i understand, @@logger is the same for each class
[22:42:00] mc_fail: i have found few examples with singleton wrapper for logging, but it doesn't look like a good solution
[22:47:16] mc_fail: maybe you guys can point me for any best-practice solution, four sharing logger instance across all classes?
[22:47:28] mc_fail: (without using global variables)
[22:56:11] mc_fail: nofxx the question was about changing log level
[22:58:03] mc_fail: i have class1, in which i can change log level to 'debug' for example, but if i create instance of class2 inside class1, in class2 log level resets back to default
[22:58:43] mc_fail: just look on https://gist.github.com/anonymous/a9a08ce287d6d2dc5781f541479cf032
[22:59:30] mc_fail: nofxx cool, but if i need to change it outside main class?
[23:01:11] mc_fail: nofxx actually, setting it in main is ok for me, but the problem is: how to access it in other classes?
[23:01:22] mc_fail: i mean. the instance
[23:02:18] mc_fail: nofxx you meain, use global variable for that?

2016-06-03

[12:12:44] mc_fail: hi floks, is it possible to force having space after argument in OptionParser for ruby 2.3 ?
[12:14:07] mc_fail: for example, if user has passed -l value the program should consider -l = value, if user has passed -lvalue - program should throw an error
[12:15:32] mc_fail: i don't see any related examples in http://ruby-doc.org/stdlib-2.3.1/libdoc/optparse/rdoc/OptionParser.html

2016-06-02

[13:26:03] mc_fail: guys, is there any way to set conflicts with OptionParser ?
[13:26:14] mc_fail: like, to say that -i cannot be passed together with -m

2016-05-29

[19:51:19] mc_fail: is it possible to force ruby to close file with releaseing a descriptor?
[19:51:51] mc_fail: i do file.close in my code, but descriptor is still there
[19:54:47] mc_fail: norc__ i use pipes with ruby, and i need to close actual descriptor at specific time
[19:55:04] mc_fail: otherwise my application stucks
[19:55:57] mc_fail: yeah, i have seen this on stackoverflow, but it doesn't look nice
[19:59:30] mc_fail: i'm trying to do it like that http://pastebin.com/v99WwMmZ
[20:00:39] mc_fail: should i use IO instead of File ?
[20:04:51] mc_fail: hmm, norc__, but will moving to newer verison solve my problem with descriptors?
[20:08:31] mc_fail: ok, i'll try to run it on newer version
[20:14:44] mc_fail: i have upgraded to ruby 2.3.1p112
[20:14:52] mc_fail: i see the same thing
[20:15:01] mc_fail: writer.close=> true
[20:15:22] mc_fail: but lsof|grep "/tmp/sshfifotest" still shows that file is held by irb process
[20:15:55] mc_fail: (i run the same code i pasted before)
[20:16:33] mc_fail: and descriptor is actually being released only if i exit or kill irb process
[20:27:24] mc_fail: norc__ linux
[20:27:41] mc_fail: kernel 3.2.x
[20:28:45] mc_fail: 3.2.45-0.6.acc.755.47.315.amzn1acc.x86_64
[20:28:55] mc_fail: if you're about kernel
[20:29:10] mc_fail: it's an amazon inctance
[20:31:30] mc_fail: norc__ just copypaste it to irb, and do lsof without closing irb
[20:31:47] mc_fail: it is reproducaple on osx as well
[20:39:11] mc_fail: hmm, let me try, it seems like i have found an issue there

2016-05-18

[08:45:45] mc_fail: Ping timeout: 250 seconds
[08:51:37] mc_fail: has joined #ruby
[10:01:34] mc_fail: hi everyone, again
[10:01:41] mc_fail: is there any way to have Net::HTTP working with pkcs11 in ruby?
[10:01:47] mc_fail: i see there is a module for pkcs11 on github https://github.com/larskanis/pkcs11
[10:01:53] mc_fail: but it doesnt seems like it supported by https somehow
[10:02:15] mc_fail: i mean, to use certificate+key on the token for https authentification
[10:05:07] mc_fail: it seems like pkcs11 is not an option, as i understand, all hardware tokens support pkcs11 only
[10:08:21] mc_fail: + as i understand, with hardware token private key cannot be extracted, because the entire point of having token is to avoid copying keys
[10:09:02] mc_fail: therefore, i don't think that extracting OpenSSL::Pkey is possible
[10:12:36] mc_fail: hmm, meanwhile, this is intresting http://comments.gmane.org/gmane.comp.lang.ruby.cvs/11434
[10:14:10] mc_fail: since openssl support pkcs11 natively, and as i understand ruby Openssl library is just a wrapper over openssl binaries, it might work
[10:25:57] mc_fail: yeah, but it seems like openssl itself cannot load my token .so file

2016-05-17

[13:18:14] mc_fail: hi everyone
[13:18:39] mc_fail: is there any way to have Net::HTTP working with pkcs11 in ruby?
[13:19:02] mc_fail: i see there is a module for pkcs11 on github https://github.com/larskanis/pkcs11
[13:23:14] mc_fail: but it doesnt seems like it supported by https somehow

2016-05-05

[16:38:43] mc_fail: has joined #ruby

2016-04-09

[17:43:37] mc_fail: Ping timeout: 260 seconds

2016-02-28

[14:52:29] mc_fail: Ping timeout: 244 seconds
[15:01:14] mc_fail: has joined #ruby
[15:01:14] mc_fail: has joined #RubyOnRails

2016-02-27

[22:41:01] mc_fail: has joined #ruby
[22:41:01] mc_fail: has joined #RubyOnRails
[22:53:54] mc_fail: Ping timeout: 276 seconds
[22:54:06] mc_fail: has joined #ruby
[22:54:06] mc_fail: has joined #RubyOnRails

2016-02-26

[17:20:45] mc_fail: *.net *.split

2016-02-01

[05:44:57] mc_fail: has joined #ruby
[05:44:57] mc_fail: has joined #RubyOnRails

2016-01-31

[12:25:10] mc_fail: *.net *.split
[12:29:45] mc_fail: has joined #RubyOnRails
[12:29:47] mc_fail: has joined #ruby
[12:35:50] mc_fail: Remote host closed the connection

2016-01-27

[06:03:25] mc_fail: Ping timeout: 265 seconds
[06:22:13] mc_fail: has joined #ruby
[06:22:13] mc_fail: has joined #RubyOnRails

2016-01-14

[02:53:24] mc_fail: has joined #ruby
[02:53:24] mc_fail: has joined #RubyOnRails

2015-06-14

[06:28:26] mc_fail: Ping timeout: 246 seconds

2015-06-13

[00:39:43] mc_fail: has joined #ruby
[01:34:22] mc_fail: Ping timeout: 276 seconds
[10:20:33] mc_fail: has joined #ruby

2015-06-12

[16:43:37] mc_fail: has joined #ruby
[17:03:25] mc_fail: Ping timeout: 264 seconds

2015-06-11

[17:19:22] mc_fail: has joined #ruby
[17:29:24] mc_fail: Ping timeout: 265 seconds
[21:14:47] mc_fail: has joined #ruby
[21:38:22] mc_fail: Ping timeout: 255 seconds
[21:46:37] mc_fail: has joined #ruby
[22:13:17] mc_fail: Ping timeout: 250 seconds
[22:16:16] mc_fail: has joined #ruby
[22:31:58] mc_fail: Ping timeout: 265 seconds
[22:32:50] mc_fail: has joined #ruby
[22:42:16] mc_fail: Ping timeout: 255 seconds
[22:54:21] mc_fail: has joined #ruby
[23:03:37] mc_fail: Ping timeout: 244 seconds

2015-06-10

[11:01:21] mc_fail: and it is actually strange, because this file exists
[11:01:30] mc_fail: -rwx---r-x 1 plab plab 607141 Mar 23 19:42 /home/plab/.gem/ruby/extensions/x86_64-cygwin/psych-2.0.13/psych.so
[11:01:58] mc_fail: so, what is wrong with ruby again?
[11:05:13] mc_fail: jhass it was compatible a few hours ago
[11:05:41] mc_fail: may be i can turn more dabug somehow?
[11:06:51] mc_fail: sevenseacat i've only installed nc and updated some system libraries
[11:07:50] mc_fail: sevenseacat as usial with ruby
[11:08:07] mc_fail: but how to find what exactly broke it?
[11:09:44] mc_fail: sevenseacat and if i don't have it
[11:11:19] mc_fail: sevenseacat no, i don't, cygwin rewritiong log on every installer run, i've started it again after libraries update
[11:11:31] mc_fail: jhass yes, it is
[11:13:23] mc_fail: jhass hmm, seems like yes
[11:13:24] mc_fail: ??? => ??? (0x180040000)
[11:13:24] mc_fail: ??? => ??? (0x50eed0000)
[11:20:56] mc_fail: jhass does it possible to find somehow where it was linked to
[11:22:56] mc_fail: jhass i don't get wjat you mean
[11:24:55] mc_fail: jhass what i'm expecting to se there http://pastebin.com/9wPaAJmz
[11:28:41] mc_fail: jhass don't sure it is the same on cygwin
[15:05:45] mc_fail: Ping timeout: 244 seconds
[18:31:43] mc_fail: has joined #ruby
[18:41:28] mc_fail: Ping timeout: 276 seconds