theRoUS

Activity Graph

Page 1 of 3 | Next »

2019-06-24

[00:35:58] theRoUS: Ping timeout: 246 seconds

2019-06-23

[03:44:01] theRoUS: Ping timeout: 246 seconds
[03:49:12] theRoUS: has joined #ruby
[03:49:12] theRoUS: Changing host
[03:49:12] theRoUS: has joined #ruby

2019-06-18

[00:31:40] theRoUS: Ping timeout: 246 seconds
[00:44:01] theRoUS: has joined #ruby
[00:44:01] theRoUS: Changing host
[00:44:01] theRoUS: has joined #ruby

2019-06-14

[14:05:28] theRoUS: Ping timeout: 245 seconds
[14:18:52] theRoUS: has joined #ruby
[14:18:52] theRoUS: Changing host
[14:18:52] theRoUS: has joined #ruby

2019-06-13

[01:30:37] theRoUS: Ping timeout: 246 seconds
[01:53:26] theRoUS: has joined #ruby
[01:53:26] theRoUS: Changing host
[01:53:26] theRoUS: has joined #ruby
[02:02:35] theRoUS: Ping timeout: 248 seconds
[02:16:04] theRoUS: has joined #ruby
[02:16:06] theRoUS: has joined #ruby
[02:16:06] theRoUS: Changing host

2019-06-11

[20:56:30] theRoUS: has joined #ruby
[20:57:24] theRoUS: I'm upgrading an old laptop; right now it's at Fedora 29. The ruby `gem` command is varfing as shown here: https://pastebin.com/Kjv263aB
[20:58:41] theRoUS: geez. what happened to minswan? :-/
[21:10:02] theRoUS: phaul: maybe pastebin is a pain to read for some, but gist is (IMHO) a royal PITA to paste *to*. https://gist.github.com/RoUS/3c4ca47a971ed0bd4d2b86d501eb1dbf
[21:11:03] theRoUS: any road, the `gem` command is broken, and reinstalling ruby, libyaml, rubygems, and ruby-libs has no effect. just typing `gem` fails, much less the `gem pristine bundler` i need to do. :-(
[21:21:02] theRoUS: phaul: foo: `cd /usr/lib64 ; ln -s libruby.so.2.5.5 libruby.so.2.4` worked around it. the fedora-supplied rubygem-psych wants libruby.so.2.4; faking it out seems to make it wonky-work

2019-01-22

[16:26:00] theRoUS: Ping timeout: 246 seconds

2019-01-21

[16:26:58] theRoUS: is there an API exploration mechanism for rails similar to django's? for instance, if you send the following GET (at least to a particular app), you get something pretty, readable, and explorable:
[16:27:06] theRoUS: GET /api/v2/teams/53/users/
[16:27:13] theRoUS: HTTP 200 OK
[16:27:26] theRoUS: Allow: GET, POST, HEAD, OPTIONS
[16:27:34] theRoUS: Content-Type: application/json
[16:28:16] theRoUS: gives you pretty-printed JSON with live links to further explore the api
[16:28:39] theRoUS: failing that, has anyone ever implemented a WADL plugin for rails?

2019-01-16

[18:07:47] theRoUS: has joined #RubyOnRails
[18:10:10] theRoUS: is there an API exploration mechanism for rails similar to django's? for instance, if you send the following GET (at least to a particular app), you get something pretty, readable, and explorable:
[18:10:15] theRoUS: Content-Type: application/json
[18:10:15] theRoUS: Allow: GET, POST, HEAD, OPTIONS
[18:10:15] theRoUS: HTTP 200 OK
[18:10:15] theRoUS: GET /api/v2/teams/53/users/

2018-11-09

[11:37:09] theRoUS: has left #ruby: ("Off to another part of the maze of twisty little passages")

2018-11-07

[13:11:45] theRoUS: has joined #ruby
[13:12:32] theRoUS: hoe does one write a gem that can be used to add step definitions to the standard ones provided by base cucumber?
[13:12:39] theRoUS: s/hoe/how/
[13:31:12] theRoUS: like something i can put in env.rb that will add the `step_definitions` tree from the additional gem
[13:32:05] theRoUS: there appears to be no loadpath like $: for cucumber, as it were

2018-08-16

[11:37:21] theRoUS: has joined #ruby
[11:38:10] theRoUS: is there any way a constructor (or any method) can identify the object that invoked it?
[11:39:24] theRoUS: not the #caller list, but the actual invoking object
[12:02:41] theRoUS: apeiros: :-( nothing through bindings, or tracing, or ..?
[12:02:50] theRoUS: not vanilla?
[12:05:21] theRoUS: hmm. i wonder why it's not part of vanilla..
[12:06:00] theRoUS: over mine, certainly. :-)
[12:07:31] theRoUS: fwis in general, of the two aspects of OOP, structural inheritance is always considered.. but runtime inheritance rather less so

2018-08-14

[09:43:35] theRoUS: Ping timeout: 268 seconds

2018-08-03

[10:05:09] theRoUS: has left #RubyOnRails: ("Off to another part of the maze of twisty little passages")

2018-08-01

[10:57:11] theRoUS: has left #RubyOnRails: ("Off to another part of the maze of twisty little passages")
[19:14:49] theRoUS: has joined #RubyOnRails
[19:16:30] theRoUS: i want to extend some of my model relations with several methods. one will be unique to each relation (can be added with do .. end), but the others are in a module and dependent upon the per-relation one (can be added with -> { extending <modulename> })
[19:18:40] theRoUS: how can i do both? 'do def unique ; end ; include <module> ; end' or something like that?
[19:24:41] theRoUS: mlt-: it wouldn't be exclusive to that relation
[19:25:44] theRoUS: each relation in question has a unique #[] method that the shared ones in the module use
[19:41:17] theRoUS: per relation, not per instance
[19:41:43] theRoUS: the instances are available to the method through the relation metadata
[19:48:02] theRoUS: it's not unique to the model, it's unique to the relation. i can't have multiple #[] methods in a model, but i *can* (and do) have one per relation where needed
[19:52:53] theRoUS: never mind, i experimented; having a do/end on the relation for to define the uniqe #[], and include the module also inside the do/end -- et vóilà
[19:53:06] theRoUS: s/for to/to/
[19:54:10] theRoUS: jjaii9: 'url' is used a lot in query-strings, so unless you run into conflicts with some app parsing it, you should be fine.
[19:55:06] theRoUS: jjaii9: imho, of course. ymmv. dealer prep charges may apply. subject to the whim of #potus

2018-07-31

[11:03:34] theRoUS: has joined #RubyOnRails
[11:05:32] theRoUS: rails 5.1 with mongoid. is there a way to have the generic model #find method search for a different field than _id, or in addition to _id? the equivalent of #find_by(:name => val) or #where('$or' => [{:name => val},{:_id => val}]) ?
[13:12:58] theRoUS: rails 5.1 with mongoid. is there a way to have the generic model #find method search for a different field than _id, or in addition to _id? the equivalent of #find_by(:name => val) or #where('$or' => [{:name => val},{:_id => val}]) ?

2018-07-23

[19:31:30] theRoUS: has left #RubyOnRails: ("Off to another part of the maze of twisty little passages")

2018-07-20

[00:07:02] theRoUS: *.net *.split
[00:15:24] theRoUS: has joined #RubyOnRails

2018-07-19

[19:34:42] theRoUS: has joined #RubyOnRails
[19:37:42] theRoUS: rails 5. i keep running into a catch-22 situation. the autoloaded files (such as app/**/*.rb) apparently get loaded *before* config/initializers/*.rb, which get loaded *before* lib/*.rb. and routing gets set up after the initialisers, but i'm not sure where in the sequence.
[19:40:48] theRoUS: all of my controllers need info from the load and the routes at their compile-time. there isn't an 'application is loaded and about to start' hook or callback, is there?

2018-07-18

[14:16:13] theRoUS: has left #RubyOnRails: ("Off to another part of the maze of twisty little passages")

2018-07-17

[16:47:16] theRoUS: has joined #RubyOnRails
[16:48:19] theRoUS: i've spent the past several days on this, and posted it on stackoverflow at https://stackoverflow.com/questions/51386515/rails-5-abstracting-actions-out-of-controllers but i'm going to try asking here as well because time is running short
[16:49:21] theRoUS: issue 1. i have actions that are shared/identical for several different controllers, and come with related #before_action and related references.
[16:51:00] theRoUS: how can i abstract those, in a best-practice and canonical manner, into a separate module that the controllers can include? controller concerns don't get the callbacks and i don't know what module(s) a concern would need to include to get them
[16:51:36] theRoUS: issue 2. likewise, but for models and the validation callbacks.
[16:52:50] theRoUS: issue 3. certain structures (like #params) are available all over the place; in controllers, in views, etc. what's the canonical way to set up user-defined structures with the same sort of breadth of scope?
[16:53:26] theRoUS: (food for thought, if anyone wants it, and /me is going downstairs to grab a sandwich)
[17:27:09] theRoUS: rails is so convoluted in order to provide its richness that trying to spread the wealth into custom code is a major chore. :-(
[17:28:22] theRoUS: maybe i need to put the common actions into an abstract controller.. but then how would the others access them?
[17:48:22] theRoUS: fryguy: that's just it -- inherit from *where*? or are you suggesting the abstract controller inherit from ActionController::Base, and the other controllers inherit from it?
[17:55:10] theRoUS: every one of them would have to declare itself non-abstract.. i'd much rather do this with mixins than class inheritance, but oh well
[22:26:27] theRoUS: fryguy, Inside: the problem with mixins is that i can't tell *which* mixins to include to get things like the controller action predicates

2018-07-13

[15:31:29] theRoUS: has left #ruby: ("Off to another part of the maze of twisty little passages")

2018-07-11

[10:55:42] theRoUS: has left #RubyOnRails: ("Off to another part of the maze of twisty little passages")

2018-07-09

[15:35:41] theRoUS: rails 5.0.7. at what point do the routes get set up? i need to run an initialiser *after* Rails.application.routes.routes has been loaded..
[15:42:59] theRoUS: i'm trying to do it in the Rails.application.config.after_initialize block, but apparently the routes aren't reliable set up at that point
[15:51:58] theRoUS: i found this: "Some parts of your application, notably routing, are not yet set up at the point where the after_initialize block is called." on http://guides.rubyonrails.org/configuring.html#using-initializer-files -- but it doesn't say how I can hook some code to run after the routing *is* set up

2018-06-29

[14:17:26] theRoUS: RoR 5 routing question: i have some resources under the namespace(:puppet) block (e.g., :manifest), but i'd like to redirect two special routes to a controller *not* in that namespace.
[14:19:40] theRoUS: for example, `get("/puppet/manifests/upload(:.format)")` should use the top-level uploads#webupload controller/action, and `post("/puppet/manifests/upload(:.format)")` should use the top-level uploads#upload controller/action.
[14:20:44] theRoUS: however, everything i've tried has either given an error compiling the routes, or has used the `puppet/manifests#{webupload,upload}` controller/action
[14:21:12] theRoUS: how do i reference a controller in a different, or superiour, namespace ?
[14:24:36] theRoUS: has joined #RubyOnRails
[14:24:59] theRoUS: RoR 5 routing question: i have some resources under the namespace(:puppet) block (e.g., :manifest), but i'd like to redirect two special routes to a controller *not* in that namespace.
[14:25:13] theRoUS: for example, `get("/puppet/manifests/upload(:.format)")` should use the top-level uploads#webupload controller/action, and `post("/puppet/manifests/upload(:.format)")` should use the top-level uploads#upload controller/action.
[14:25:40] theRoUS: how do i reference a controller in a different, or superiour, namespace ?
[14:25:40] theRoUS: however, everything i've tried has either given an error compiling the routes, or has used the `puppet/manifests#{webupload,upload}` controller/action
[15:00:56] theRoUS: basically, i want get('/puppet/manifests/upload(:.format)' to get handled by toplevel controller action 'uploads#webupload'
[15:01:45] theRoUS: but using the #get and #post methods inside config/routes.rb is forcing it to 'puppet/uploads#erbupload'
[15:02:05] theRoUS: s/erb/web/
[16:09:44] theRoUS: *.net *.split
[16:14:17] theRoUS: has joined #ruby
[16:14:18] theRoUS: has joined #RubyOnRails

2018-06-26

[17:05:03] theRoUS: rails 5. i put a file in app/validators/balancer_validator.rb, but no longer need it. but if i delete it, rails blows up because it can't find it. i can't find any references to it anywhere; is it marshalled into a cache or something?
[17:07:51] theRoUS: never mind, PEBKAC

2018-06-20

[18:15:29] theRoUS: working with rails 5 (after a long absence). i want to implement an import method that will loop through the array of item hashes in its params, and do #create or #update as appropriate before moving on to the next item in the import array.
[18:16:38] theRoUS: is this something easily done, or do i need to replicate the create/update logic in my #import method? i'm having trouble figuring out how to reset the params structure appropriate for each iteration..
[18:18:06] theRoUS: i have separate validators for the #import and the #update/#create methods, so i don't think so
[18:19:40] theRoUS: which is why i'd prefer to work within the #create/#update methods rather than try to recreate them
[18:28:37] theRoUS: apeiros_: that's what i hoped. any pointers to howtos?
[18:29:41] theRoUS: well, resetting params between each call, since #create depends upon it
[18:42:59] theRoUS: apeiros: yes

2018-06-18

[17:06:58] theRoUS: Quit: Coyote finally caught me
[17:19:26] theRoUS: has joined #ruby
[17:20:11] theRoUS: has joined #ruby
[17:20:11] theRoUS: Changing host

2018-06-15

[13:47:12] theRoUS: has joined #ruby
[13:47:12] theRoUS: Changing host

2018-06-14

[01:05:46] theRoUS: Ping timeout: 264 seconds
[01:18:41] theRoUS: has joined #ruby

2018-06-13

[21:40:34] theRoUS: Ping timeout: 260 seconds
[21:43:09] theRoUS: has joined #ruby
[21:43:38] theRoUS: has joined #ruby
[21:43:38] theRoUS: Changing host

2018-06-12

[05:10:27] theRoUS: Ping timeout: 240 seconds
[05:10:45] theRoUS: has joined #ruby
[13:31:07] theRoUS: has joined #ruby
[13:31:07] theRoUS: Changing host

2018-06-06

[18:03:09] theRoUS: #warn is recommended over $stderr.puts -- but what's the non-newline equivalent, like $stderr.print ?
[18:17:59] theRoUS: havenwood: that's what i feared..
[18:30:43] theRoUS: wait, what?

2018-05-29

[02:46:58] theRoUS: *.net *.split
[02:48:05] theRoUS: has joined #ruby
[02:50:12] theRoUS: *.net *.split
[02:51:08] theRoUS: has joined #ruby

2018-05-09

[14:11:00] theRoUS: has joined #ruby
[14:18:29] theRoUS: has joined #ruby
[14:18:29] theRoUS: Changing host

2018-04-21

[09:34:21] theRoUS: Ping timeout: 255 seconds

2018-04-16

[14:30:20] theRoUS: has joined #ruby
[14:30:39] theRoUS: has joined #ruby
[14:30:39] theRoUS: Changing host

2018-04-14

[15:18:35] theRoUS: Ping timeout: 240 seconds

2018-03-23

[11:25:14] theRoUS: has joined #ruby
[11:31:09] theRoUS: has joined #ruby
[11:31:09] theRoUS: Changing host

2018-02-26

[13:29:24] theRoUS: has left #ruby: ("Off to another part of the maze of twisty little passages")

2018-02-22

[03:04:02] theRoUS: Ping timeout: 276 seconds
[03:07:38] theRoUS: has joined #ruby

2018-01-12

[16:11:32] theRoUS: has joined #ruby
[16:56:16] theRoUS: has joined #ruby
[16:56:16] theRoUS: Changing host

2018-01-11

[16:54:10] theRoUS: Read error: Connection reset by peer

2017-12-06

[15:18:36] theRoUS: is there a gem that expands shell non-glob sequences? e.g., foo('{01..05}') => ['01', '02', '03', '04', 05'] ?
[15:30:00] theRoUS: or, more to the point, "foo[01..03]" => "foo01 foo02 foo03" ?
[15:34:50] theRoUS: dminuoso: that's a very specific implementation for the specific case. shell sequences can be like "foo{a..z}" etc.
[15:35:55] theRoUS: my point is that it can be arbitrary.
[15:36:22] theRoUS: so, no gem to do it
[15:37:12] theRoUS: echo foo{z..B} =>fooz fooy foox foow foov foou foot foos foor fooq foop fooo foon foom fool fook fooj fooi fooh foog foof fooe food fooc foob fooa foo` foo_ foo^ foo] foo foo[ fooZ fooY fooX fooW fooV fooU fooT fooS fooR fooQ fooP fooO fooN fooM fooL fooK fooJ fooI fooH fooG fooF fooE fooD fooC fooB
[15:41:18] theRoUS: Shellwords splits appropriately
[15:42:37] theRoUS: meh, i'll just have the shell do it, though i consider it inelegant.

2017-10-10

[12:29:19] theRoUS: has joined #ruby
[12:29:19] theRoUS: Changing host

2017-10-09

[18:18:16] theRoUS: Remote host closed the connection
[18:45:55] theRoUS: has joined #ruby
[19:59:15] theRoUS: has joined #ruby
[19:59:15] theRoUS: Changing host
[22:20:47] theRoUS: Quit: Coyote finally caught me
[22:24:10] theRoUS: has joined #ruby

2017-09-28

[17:10:19] theRoUS: does ruby have a class metamethod (like included, etc) that can be defined to be invoked after the class instance is created? i.e., as soon as the constructor has finished?
[17:14:47] theRoUS: sort of a post-initialize in contrast to ObjectSpace.define_finalizer
[17:20:24] theRoUS: never mind, found a workaround using inheritance
[17:37:51] theRoUS: Papierkorb: basically what i've done. i already have an #initialize that everything inherits and supers

2017-09-12

[19:00:52] theRoUS: how can i tell on linux whether a particular PID is alive or not? (exist or not)
[19:01:29] theRoUS: i mean from within ruby
[19:06:36] theRoUS: Papierkorb: ew. :-)
[19:07:29] theRoUS: i'm gonna try begin ; Process.getsid(pid) ; rescue Errno::ESRCH ...
[19:11:10] theRoUS: apeiros: not seeing the 'without waiting' aspect
[19:13:17] theRoUS: hmm, i'll have to investigate this in more detail..
[19:15:00] theRoUS: apeiros: i'm basically having to spawn() an ssh command to set up a tunnel to a remote non-ssh port -- and if the server isn't listening, i can't figure out how to tell
[19:16:21] theRoUS: apeiros: of course, if i'm not going to feed multiple commands, i coul probably use open3 instead
[19:24:20] theRoUS: good enough, thanks!

2017-09-06

[19:32:55] theRoUS: has joined #ruby
[19:33:12] theRoUS: has joined #ruby
[19:33:12] theRoUS: Changing host

2017-08-06

[19:07:55] theRoUS: *.net *.split

2017-07-07

[06:39:05] theRoUS: Ping timeout: 240 seconds
[06:39:39] theRoUS: has joined #ruby
[14:19:39] theRoUS: has joined #ruby
[14:19:39] theRoUS: Changing host

2017-06-21

[19:51:44] theRoUS: has joined #ruby
[19:51:44] theRoUS: Changing host

2017-06-20

[00:17:34] theRoUS: *.net *.split
[00:23:02] theRoUS: has joined #ruby

2017-06-16

[23:26:15] theRoUS: *.net *.split
[23:26:35] theRoUS: has joined #ruby

2017-05-19

[01:04:40] theRoUS: Ping timeout: 240 seconds
[01:07:36] theRoUS: has joined #ruby
[15:33:49] theRoUS: has joined #ruby
[15:33:49] theRoUS: Changing host

2017-05-07

[22:22:32] theRoUS: *.net *.split

2017-04-21

[16:19:05] theRoUS: Quit: Coyote finally caught me
[16:43:27] theRoUS: has joined #ruby
[16:59:41] theRoUS: has joined #ruby
[16:59:41] theRoUS: Changing host

2017-04-12

[08:27:48] theRoUS: Ping timeout: 260 seconds
[16:13:36] theRoUS: has joined #ruby
[16:20:20] theRoUS: has joined #ruby
[16:20:20] theRoUS: Changing host

2017-04-10

[15:04:26] theRoUS: has joined #ruby
[15:04:26] theRoUS: Changing host

2017-04-08

[13:35:16] theRoUS: Ping timeout: 260 seconds
[13:39:16] theRoUS: has joined #ruby

2017-04-03

[16:21:55] theRoUS: Changing host
[16:21:56] theRoUS: has joined #ruby

2017-03-30

[05:15:05] theRoUS: Ping timeout: 240 seconds
[05:17:33] theRoUS: has joined #ruby

2017-03-08

[16:33:29] theRoUS: has joined #ruby
[16:33:29] theRoUS: Changing host

2017-03-07

[20:30:48] theRoUS: Quit: Coyote finally caught me
[20:33:15] theRoUS: has joined #ruby

2016-07-27

[17:45:16] theRoUS: has left #RubyOnRails: ("Off to another part of the maze of twisty little passages")

2016-07-18

[15:42:19] theRoUS: has joined #ruby
[15:42:19] theRoUS: has joined #RubyOnRails
[15:42:19] theRoUS: Changing host

2016-07-17

[08:50:30] theRoUS: Ping timeout: 244 seconds
[08:51:25] theRoUS: has joined #RubyOnRails
[08:51:25] theRoUS: has joined #ruby

2016-07-13

[08:09:28] theRoUS: Ping timeout: 264 seconds
[15:40:11] theRoUS: has joined #ruby
[15:40:11] theRoUS: Changing host
[15:40:11] theRoUS: has joined #ruby
[15:40:16] theRoUS: has joined #RubyOnRails

2016-07-05

[15:50:24] theRoUS: has joined #ruby
[15:50:24] theRoUS: has joined #RubyOnRails
[15:50:24] theRoUS: Changing host

2016-07-01

[19:47:49] theRoUS: has joined #RubyOnRails