Activity Graph

Page 1 of 13 | Next »


[03:28:23] Cork: Ping timeout: 268 seconds
[09:27:08] Cork: has joined #ruby
[09:28:16] Cork: has joined #RubyOnRails


[20:02:51] Cork: has joined #ruby
[20:03:59] Cork: has joined #RubyOnRails


[07:38:23] Cork: how would one avoid lazyloading in rails 5?
[07:38:34] Cork: (for the current model)
[11:09:38] Cork: Ping timeout: 245 seconds
[11:12:13] Cork: has joined #RubyOnRails
[11:16:08] Cork: has joined #ruby


[07:28:29] Cork: is it possible to get to NOT ask for password if given an encrypted private key?


[08:09:18] Cork: Net::SSH.start(host, user) appears to try to create a file somewhere on the host
[08:09:26] Cork: i can't find any reference to this in the code
[08:09:47] Cork: anyone know where this could be? (what path it is trying to do it on)


[14:20:35] Cork: isn't it possible to set a foreign_key inline in t.references in a micration if the resulting default name becomes longer then 64 characters?
[14:20:55] Cork: foreign_key seams to ignore name, and it can't be combined with index that supports it
[14:22:59] Cork: or rather mariadb
[14:23:26] Cork: seams kinda broken...
[14:23:52] Cork: oh, weell execute here i come i guess :/
[14:25:36] Cork: what i have problem with is t.references :table_that_is_quite_long, foreign_key: true
[14:26:00] Cork: foreign_key resulting in an index that is 68 characters
[14:27:18] Cork: if i don't want the foreign_key feature i can create an index with index: { name: "a-short-name" }
[14:27:26] Cork: the problem is i can't create the constraint
[14:28:03] Cork: ya, but not the foreign_key
[14:28:43] Cork: with the table not found :/
[14:28:52] Cork: "Mysql2::Error: Table 'mattias_dev_knowledge_base.knowledge_base_article_related_articles' doesn't exist: SHOW FULL FIELDS FROM `knowledge_base_article_related_articles`"
[14:38:46] Cork: heh intressting exact same limitation with t.foreign_key
[14:39:02] Cork: t.index works, but not t.foreign_key
[14:52:17] Cork: NL3limin4t0r: like i said before; name is ignored on foreign_key
[14:52:40] Cork: only index respects it, and you can't combine index: and foreign_key:
[14:53:23] Cork: cause then the entire create_table just fails
[14:54:25] Cork: NL3limin4t0r: it gets an sql error with the table (i'm currently) trying to create doesn't exist
[14:55:38] Cork: i just did it with an execute statement after the create_table instead; will have to do
[14:58:39] Cork: ya, i know i have plenty of them in other migrations
[14:58:55] Cork: but this long ass table makes thing brow up


[11:25:15] Cork: Ping timeout: 248 seconds
[11:55:19] Cork: has joined #ruby
[11:57:35] Cork: has joined #RubyOnRails


[06:27:41] Cork: *.net *.split
[06:38:17] Cork: has joined #RubyOnRails
[06:38:22] Cork: has joined #ruby


[03:22:04] Cork: *.net *.split
[03:38:46] Cork: has joined #RubyOnRails
[03:38:50] Cork: has joined #ruby


[08:47:17] Cork: has joined #ruby
[12:16:09] Cork: anyone know how to fix "uninitialized constant Gem::RDoc" when running gem uninstall?
[12:16:47] Cork: gem install and the gems them self works, i just can't uninstall them :/
[12:22:09] Cork: wow... ok had to install rdoc to uninstall timerizer, even though it wasn't required to install or use it :)


[20:07:05] Cork: Ping timeout: 252 seconds
[20:19:29] Cork: has joined #ruby
[21:29:52] Cork: Ping timeout: 244 seconds
[21:32:29] Cork: has joined #ruby


[08:18:17] Cork: has joined #ruby
[08:20:18] Cork: has joined #RubyOnRails


[06:54:39] Cork: has joined #RubyOnRails
[06:58:40] Cork: has joined #ruby


[22:18:50] Cork: Ping timeout: 258 seconds


[12:36:11] Cork: active record attribute default procs
[12:36:23] Cork: is it possible to have them access the record instance?
[12:37:18] Cork: attribute :notes, :text, default: ->() { + " is the current note" }
[12:37:28] Cork: kinda thing (obviously not that though)


[10:01:19] Cork: Ping timeout: 250 seconds
[10:10:29] Cork: has joined #ruby
[10:11:35] Cork: has joined #RubyOnRails


[16:50:13] Cork: *.net *.split


[11:55:11] Cork: anyone know if there is a way to get redcarpet to offset the header level?
[11:55:23] Cork: i would want to have it start at h3 instead of the default h1
[12:38:55] Cork: ryouba: is x of that class?
[12:39:12] Cork: cause if it is it should work just fine
[12:40:56] Cork: Tuor: you mean what the result is or what it does deeper down?
[12:41:37] Cork: Tuor: cause the result is a class (struct) with an accessor name that you can give values
[12:44:09] Cork: Tuor: new takes a list of values, and it returns a new instance with those names defined as accessor
[12:44:26] Cork: this means you can take the or result.<what ever you called it that is a valid format name>
[12:44:48] Cork: struct isn't much more then that, it is basically a hash
[12:46:26] Cork: no it should be the value of the struct field name
[12:46:34] Cork: optoons should be a struct class
[13:25:25] Cork: Tuor: that is the internal part i talked about before, i THINK Struct just use the generic to create a dynamic class under the hood, but not sure


[09:20:13] Cork: the core net/http causes "warning: Object#timeout is deprecated, use Timeout.timeout instead." warnings, anyone know if there is an issue somewhere about handling this?


[12:49:56] Cork: is it possible to get activerecord to use stable names for dynamicly joined tables?


[08:28:26] Cork: is it possible to do new/build on a has_many through relation and have the middle tables link it set correctly?
[08:42:44] Cork: davK: its a has_many and a belongs_to but ya
[08:43:26] Cork: the problem is if i created it from that direction i will have to use nested resource for the belongs_to and that becomes incompatible with the call i have today
[08:47:24] Cork: i can get everything working but i seam to have to override the initialize method to set the relation id correctly...
[08:47:35] Cork: thoughy i don't have a clue where that happens normalt >_<
[10:06:32] Cork: guyzmo: you do have self.class.reflect_on_all_associations
[10:06:41] Cork: it might give you what you want
[10:16:37] Cork: public_send(assoc).reset should work
[10:17:02] Cork: you might want a check if self.public_send(alloc).blank?
[10:17:15] Cork: (so you don't try it on an association that doens't exist)
[10:21:16] Cork: has_ones = server.class.reflect_on_all_associations(:has_one).select {|association| !association.through_reflection? }.map(&:name)
[10:21:33] Cork: opps s/server/self/
[10:21:55] Cork: i've actually needed the exact same thing so :)
[10:22:01] Cork: well not for reset but...
[11:01:04] Cork: is it possible to alias a private method?
[12:03:54] Cork: dionysus69: most likely cause of floating point in the decimal column
[12:05:20] Cork: phaul: hmm interesting... i get method undefined when i try
[12:05:26] Cork: ACTION digs deeper...
[13:47:52] Cork: dionysus69: the database most likely stores the data as a floating point
[13:47:58] Cork: causing floating point errors
[13:49:23] Cork: dionysus69: it does, (kinda) but it isn't bigdecimal cuasing the erorr
[13:49:38] Cork: databases has floating points too
[13:49:58] Cork: so depending on the column type you use, and the accuracy of that type you can get errors from there too
[13:51:48] Cork: dionysus69: you might want to have a read at this
[13:52:01] Cork: posgress has a similar page if you use that
[14:06:36] Cork: 0.1 is a floating value in ruby
[14:06:41] Cork: so you get the floating point error
[14:06:46] Cork: "0.1" isn't
[14:07:16] Cork: so ya, you never want a dot value that isn't a tring given to BigDecimal


[06:49:46] Cork: is there a way to tell activeRecrod to create a belongs_to record before trying to save the current one?
[07:05:33] Cork: tbuehlmann:
[07:05:48] Cork: this crashes with ActiveRecord::NotNullViolation (Mysql2::Error: Field 'network_id' doesn't have a default value: ...
[07:06:25] Cork: i suspect it means it tries to save the PrivateNetwork and then Network there by failing the PrivateNetworks constraint for network_id
[07:16:25] Cork: tbuehlmann: the function needs to clam a row in another table so if i run it before_validate i need to have a way to clean up if it fails validation
[07:34:40] Cork: tbuehlmann: no, the network table is not exposed in the ui so the model needs to handle it
[07:35:32] Cork: interesting about the transaction, haven't actually checked that it doesn't revert that on it's own >_<
[07:36:34] Cork: heh you're correct
[07:36:42] Cork: man talk about over working a none problem -_-'
[07:36:52] Cork: tbuehlmann: thx for kicking me in the correct direction >_>


[07:54:11] Cork: i'm creating a class for a http api and would like to group its function. api.user.list, api.user.create, ... instead of api.user_list api.user_create...
[07:54:21] Cork: is there a sain way to do this in ruby?
[07:56:40] Cork: (also i would like api.user.methods to list those methods and not the contact ones and so on)
[08:02:07] Cork: tbuehlmann: hmm opps missed to point one think out i have a class variable in api i need it to access
[08:02:14] Cork: would i have to copy it over?
[08:04:02] Cork: sounds like i should just stick with _ :)
[08:06:03] Cork: interesting
[08:06:16] Cork: didn't even know it existed


[12:41:21] Cork: is there a way to get DS record data (doesn't have to be parsed) with Resolv::DNS ?
[13:28:52] Cork: darix: TypeError: "DS" is not a class/module
[13:29:18] Cork: also list a limited list of what you can enter there
[13:32:34] Cork: only way to do it that i've found currently is to use the gem dnsruby, but it feels kinda weird that the built in one can't do it


[07:49:17] Cork: is there anywhere one can find max/min ruby requirements for core rails?
[07:50:38] Cork: sevenseacat: thx, you know about max?
[09:33:32] Cork: fox_mulder_cp: as far as i can tell you can't use latest ruby
[09:33:54] Cork: ruby 2.6 breaks quite badly
[09:34:32] Cork: fox_mulder_cp: the problem is that ruby 2.6 smeams to have fiddled with irb so rails c fails
[09:36:29] Cork: hmm i use pry too but i get "`require': cannot load such file -- irb" with 2.6
[09:36:58] Cork: fox_mulder_cp: i can't even start it
[09:37:14] Cork: meaning i can start irb, but not rails c
[09:37:23] Cork: also i can start pry directly
[09:38:28] Cork: fox_mulder_cp: i rm -Rf vendor/bundle bundle install --path=vendor/bundle
[09:38:43] Cork: so i don't think that should be the problem
[09:40:24] Cork: mixed a bit depending on system, but on this maching it is the archlinux package
[09:43:28] Cork: uh, no i don't use rails from repo
[09:43:30] Cork: only ruby
[09:44:00] Cork: and it is 2.6.0 so my problem is actually normally that it is a bit too new :)
[09:44:37] Cork: for rails and all other gems i use builder
[09:47:24] Cork: ya, will have to wait though haven't ever used rbenv
[09:50:06] Cork: fox_mulder_cp: cool


[00:05:18] Cork: Ping timeout: 246 seconds
[00:11:38] Cork: has joined #ruby
[00:13:32] Cork: has joined #RubyOnRails


[00:23:28] Cork: Ping timeout: 252 seconds
[01:18:49] Cork: has joined #RubyOnRails
[01:23:03] Cork: has joined #ruby


[09:35:24] Cork: i'm a bit curious, why is change_table .remove mapped to remove_columns and not remove_colunn?
[09:35:37] Cork: the current mapping means you can't reversably remove a column in change_table
[09:48:52] Cork: also
[09:51:18] Cork: if you add and remove multiple columns on a table it is cleaner to use change_table then multiple add_column and remove_column
[09:54:07] Cork: yes, but you don't need to fedine the table multiple times
[09:54:55] Cork: i know how the none change_table commands work, i just wonder why explicitly t.remove* can't be (as all the other change_table can)


[16:20:07] Cork: has joined #ruby
[16:21:14] Cork: has joined #RubyOnRails
[16:49:57] Cork: has joined #ruby
[16:51:04] Cork: has joined #RubyOnRails


[09:32:34] Cork: when on is defining a method_missing; is it possible when calling super (cause it isn't handled) to have the stacktrace show the original location?


[10:11:56] Cork: is it possible to pack to alphanumeric? [0, 10, "TI00021"] => "0010TI00021 "
[10:12:05] Cork: i know the last part pack("? ? A12") but what about the first two values?
[10:35:35] Cork: hmm pitty; will have to mangle the array before hand then; thx!


[10:46:36] Cork: is it possible to get ActionMailer#deliver_later to do a deliver_now in testing?


[00:19:24] Cork: Ping timeout: 252 seconds
[01:03:15] Cork: has joined #ruby
[01:04:26] Cork: has joined #RubyOnRails
[02:29:00] Cork: Ping timeout: 252 seconds
[03:35:52] Cork: has joined #ruby
[03:36:59] Cork: has joined #RubyOnRails


[07:00:25] Cork: is there any way to get the post string in an encoding honnoring the charset header value?
[07:00:39] Cork: or is it expected to always be ASCII-8BIT?


[12:49:04] Cork: anyone know if there is a way to "unmark_for_destruction" a related active record object?
[12:49:22] Cork: i can only find mark_for_destruction and marked_for_destruction? but i need to reset the state
[12:55:30] Cork: dachi: that would reset the complete state of the object
[12:55:44] Cork: i just want to not remove it :)
[12:56:25] Cork: very hackish but... obj.instance_variable_set("@marked_for_destruction", false) "works", though i would love to have an exposed api...
[13:01:22] Cork: dachi: follow jhass recommendation
[13:10:40] Cork: jhass: it happens as an action of the user on the parent object
[13:11:02] Cork: you saw the first line
[13:11:18] Cork: it was 22 mins ago :)
[13:11:49] Cork: freenode doesn't keep logs
[13:15:11] Cork: jhass: ya, but it states so it need to be able to go in both directions
[13:15:29] Cork: else you can toggle the parent object and then toggle it back and get the wrong result
[13:16:04] Cork: sure i can say "if you toggle this and want to restore it you have to reload the entire object relation"
[13:16:14] Cork: but i would prefer to not have to make sure everyone knows that
[13:16:20] Cork: (and remembers)
[13:16:45] Cork: ya, but the problem is we have things hooked into the after_commit hook that needs to get the correct data
[13:16:58] Cork: so mark_for_destruction action is important to trigger correctly on .save
[13:18:53] Cork: jhass: ya, but it is a kinda silly big relation, we have extended active_record quite heavily (it is a relly old project, we hopefully will replace it in about a year)


[00:45:16] Cork: yes, solved it! :D
[00:46:07] Cork: if anyone else needs to create an ecdsa key from its private part.
[08:34:30] Cork: anyone know how to make a GOST R 34.11-94 digest in ruby?


[23:38:17] Cork: if i have an OpenSSL::BN object (OpenSSL::PKey::EC#private_key), is there a way to recreate the full OpenSSL::PKey::EC object?


[06:40:53] Cork: anyone know if it is possible to create a OpenSSL::PKey::EC from a OpenSSL::BN instance?


[14:44:13] Cork: anyone know how to convert the integer 257 to [1,1] in ruby? (bytes in an array)
[14:47:56] Cork: well as one byte can't be more then 256 the rest ends up in the next byte
[14:48:06] Cork: but ya divmod might be a solution
[14:48:39] Cork: but ya, cool that is exactly what i needed! thx!
[15:42:34] Cork: anybody know how to parse a OpenSSL::PKey::EC key from a byte string?
[15:42:52] Cork: doesn't seam capable of parsing


[11:13:16] Cork: Ping timeout: 246 seconds
[13:37:49] Cork: has joined #ruby
[13:39:14] Cork: has joined #RubyOnRails
[15:27:28] Cork: Ping timeout: 268 seconds
[16:29:50] Cork: has joined #ruby
[16:30:59] Cork: has joined #RubyOnRails
[17:33:39] Cork: Ping timeout: 252 seconds
[17:42:46] Cork: has joined #ruby
[17:43:54] Cork: has joined #RubyOnRails
[19:24:19] Cork: Ping timeout: 246 seconds


[01:08:49] Cork: has joined #RubyOnRails
[01:09:50] Cork: has joined #ruby
[05:32:24] Cork: has joined #ruby
[05:33:54] Cork: has joined #RubyOnRails
[11:13:22] Cork: is there a way to revert mark_for_destruction on a model in a model relation?
[15:23:56] Cork: has joined #ruby
[15:27:29] Cork: Excess Flood
[15:27:29] Cork: has joined #RubyOnRails
[15:29:22] Cork: has joined #ruby
[15:31:52] Cork: has joined #RubyOnRails


[14:08:18] Cork: Ping timeout: 264 seconds


[10:10:13] Cork: Ping timeout: 250 seconds
[11:21:29] Cork: has joined #ruby
[11:22:37] Cork: has joined #RubyOnRails
[12:13:39] Cork: Ping timeout: 252 seconds
[12:15:24] Cork: has joined #ruby
[12:16:54] Cork: has joined #RubyOnRails


[09:48:46] Cork: Ping timeout: 260 seconds