« Back to channel list

#RubyOnRails - 03 October 2018

Forward 1 day »
[00:38:41] helpa: has joined #RubyOnRails
[00:39:11] Radar: !botsnack
[00:39:11] helpa: Nom nom. Thanks, Radar!
[00:39:14] Radar: That's better!
[00:40:51] helpa: has joined #RubyOnRails
[00:42:47] helpa: has joined #RubyOnRails
[00:44:47] helpa: has joined #RubyOnRails
[00:45:10] davidh38: has joined #RubyOnRails
[00:46:48] helpa: has joined #RubyOnRails
[00:47:04] prettybTech: has joined #RubyOnRails
[00:48:49] helpa: has joined #RubyOnRails
[00:50:50] helpa: has joined #RubyOnRails
[00:52:54] helpa: has joined #RubyOnRails
[00:54:57] helpa: has joined #RubyOnRails
[00:56:57] helpa: has joined #RubyOnRails
[00:58:58] helpa: has joined #RubyOnRails
[01:00:59] helpa: has joined #RubyOnRails
[01:03:00] helpa: has joined #RubyOnRails
[01:05:01] helpa: has joined #RubyOnRails
[01:07:01] helpa: has joined #RubyOnRails
[01:09:02] helpa: has joined #RubyOnRails
[01:09:32] sevenseacat: has joined #RubyOnRails
[01:11:04] helpa: has joined #RubyOnRails
[01:13:05] helpa: has joined #RubyOnRails
[01:15:05] helpa: has joined #RubyOnRails
[01:17:06] helpa: has joined #RubyOnRails
[01:19:07] helpa: has joined #RubyOnRails
[01:20:48] orbyt_: has joined #RubyOnRails
[01:21:07] helpa: has joined #RubyOnRails
[01:23:08] helpa: has joined #RubyOnRails
[01:25:09] helpa: has joined #RubyOnRails
[01:27:11] helpa: has joined #RubyOnRails
[01:29:10] helpa: has joined #RubyOnRails
[01:31:11] helpa: has joined #RubyOnRails
[01:35:13] helpa: has joined #RubyOnRails
[01:37:13] helpa: has joined #RubyOnRails
[01:39:15] helpa: has joined #RubyOnRails
[01:41:15] helpa: has joined #RubyOnRails
[01:43:15] helpa: has joined #RubyOnRails
[01:45:16] helpa: has joined #RubyOnRails
[01:47:17] helpa: has joined #RubyOnRails
[01:49:18] helpa: has joined #RubyOnRails
[01:51:19] helpa: has joined #RubyOnRails
[01:53:20] helpa: has joined #RubyOnRails
[01:54:26] quazimodo: has joined #RubyOnRails
[01:55:20] helpa: has joined #RubyOnRails
[01:57:21] helpa: has joined #RubyOnRails
[01:57:53] cagomez: has joined #RubyOnRails
[01:58:26] kapil____: has joined #RubyOnRails
[01:59:22] helpa: has joined #RubyOnRails
[02:01:23] helpa: has joined #RubyOnRails
[02:02:38] za1b1tsu: has joined #RubyOnRails
[02:03:24] helpa: has joined #RubyOnRails
[02:05:24] helpa: has joined #RubyOnRails
[02:07:25] helpa: has joined #RubyOnRails
[02:09:25] helpa: has joined #RubyOnRails
[02:11:27] helpa: has joined #RubyOnRails
[02:13:09] faitswulff: has joined #RubyOnRails
[02:13:27] helpa: has joined #RubyOnRails
[02:15:27] helpa: has joined #RubyOnRails
[02:17:30] helpa: has joined #RubyOnRails
[02:19:29] helpa: has joined #RubyOnRails
[02:21:30] helpa: has joined #RubyOnRails
[02:23:32] helpa: has joined #RubyOnRails
[02:25:31] helpa: has joined #RubyOnRails
[02:27:33] helpa: has joined #RubyOnRails
[02:29:33] helpa: has joined #RubyOnRails
[02:31:34] helpa: has joined #RubyOnRails
[02:33:34] helpa: has joined #RubyOnRails
[02:34:39] Saukk: has joined #RubyOnRails
[02:35:36] helpa: has joined #RubyOnRails
[02:37:36] helpa: has joined #RubyOnRails
[02:39:38] helpa: has joined #RubyOnRails
[02:41:39] helpa: has joined #RubyOnRails
[02:43:39] helpa: has joined #RubyOnRails
[02:45:40] helpa: has joined #RubyOnRails
[02:46:35] davidh38: has joined #RubyOnRails
[02:47:40] helpa: has joined #RubyOnRails
[02:49:41] helpa: has joined #RubyOnRails
[02:51:42] helpa: has joined #RubyOnRails
[02:53:43] helpa: has joined #RubyOnRails
[02:55:46] helpa: has joined #RubyOnRails
[02:57:47] helpa: has joined #RubyOnRails
[02:58:42] darkhanb: has joined #RubyOnRails
[02:58:53] dviola: has joined #RubyOnRails
[02:59:48] helpa: has joined #RubyOnRails
[03:01:49] helpa: has joined #RubyOnRails
[03:03:49] helpa: has joined #RubyOnRails
[03:05:50] helpa: has joined #RubyOnRails
[03:07:50] helpa: has joined #RubyOnRails
[03:09:52] helpa: has joined #RubyOnRails
[03:09:53] braincrash: has joined #RubyOnRails
[03:11:53] helpa: has joined #RubyOnRails
[03:13:53] helpa: has joined #RubyOnRails
[03:15:54] helpa: has joined #RubyOnRails
[03:17:10] akosednar: has joined #RubyOnRails
[03:17:55] helpa: has joined #RubyOnRails
[03:18:43] srinidhi: has joined #RubyOnRails
[03:19:55] helpa: has joined #RubyOnRails
[03:21:56] helpa: has joined #RubyOnRails
[03:23:57] helpa: has joined #RubyOnRails
[03:26:00] helpa: has joined #RubyOnRails
[03:28:00] helpa: has joined #RubyOnRails
[03:30:01] helpa: has joined #RubyOnRails
[03:32:01] helpa: has joined #RubyOnRails
[03:34:03] helpa: has joined #RubyOnRails
[03:36:05] helpa: has joined #RubyOnRails
[03:38:05] helpa: has joined #RubyOnRails
[03:40:05] helpa: has joined #RubyOnRails
[03:42:05] helpa: has joined #RubyOnRails
[03:44:06] helpa: has joined #RubyOnRails
[03:44:33] faitswulff: has joined #RubyOnRails
[03:46:07] helpa: has joined #RubyOnRails
[03:50:09] helpa: has joined #RubyOnRails
[03:52:09] helpa: has joined #RubyOnRails
[03:54:10] helpa: has joined #RubyOnRails
[03:56:10] helpa: has joined #RubyOnRails
[03:58:12] helpa: has joined #RubyOnRails
[04:00:18] helpa: has joined #RubyOnRails
[04:02:14] helpa: has joined #RubyOnRails
[04:04:15] helpa: has joined #RubyOnRails
[04:06:15] helpa: has joined #RubyOnRails
[04:07:45] rishispeets: has joined #RubyOnRails
[04:08:16] helpa: has joined #RubyOnRails
[04:10:17] helpa: has joined #RubyOnRails
[04:12:16] helpa: has joined #RubyOnRails
[04:14:22] helpa: has joined #RubyOnRails
[04:16:23] helpa: has joined #RubyOnRails
[04:16:25] davidh38: has joined #RubyOnRails
[04:18:23] helpa: has joined #RubyOnRails
[04:20:23] helpa: has joined #RubyOnRails
[04:21:44] faitswulff: has joined #RubyOnRails
[04:22:24] helpa: has joined #RubyOnRails
[04:24:26] helpa: has joined #RubyOnRails
[04:26:26] helpa: has joined #RubyOnRails
[04:28:27] helpa: has joined #RubyOnRails
[04:30:27] helpa: has joined #RubyOnRails
[04:32:29] helpa: has joined #RubyOnRails
[04:34:30] helpa: has joined #RubyOnRails
[04:36:31] helpa: has joined #RubyOnRails
[04:38:31] helpa: has joined #RubyOnRails
[04:40:33] helpa: has joined #RubyOnRails
[04:42:34] helpa: has joined #RubyOnRails
[04:44:35] helpa: has joined #RubyOnRails
[04:46:36] helpa: has joined #RubyOnRails
[04:48:36] helpa: has joined #RubyOnRails
[04:50:36] helpa: has joined #RubyOnRails
[04:53:45] srinidhi: has joined #RubyOnRails
[05:06:47] rishispeets: has joined #RubyOnRails
[05:10:35] rishispeets: has joined #RubyOnRails
[05:35:23] helpa: has joined #RubyOnRails
[05:35:55] helpa: has joined #RubyOnRails
[05:41:06] quazimodo: has joined #RubyOnRails
[05:51:37] srruby: has joined #RubyOnRails
[05:51:56] srruby: Is there a way to keep rails running so that running tests is faster?
[06:21:33] DTZUZO: has joined #RubyOnRails
[06:22:36] faitswulff: has joined #RubyOnRails
[06:22:49] quazimodo: has joined #RubyOnRails
[06:31:11] duderonomy: has joined #RubyOnRails
[06:35:38] lessless_: has joined #RubyOnRails
[06:48:49] lessless_: has joined #RubyOnRails
[06:49:54] lexileo: has joined #RubyOnRails
[06:55:44] davidh38: has joined #RubyOnRails
[07:03:12] duderonomy: has joined #RubyOnRails
[07:15:31] gthank_: has joined #RubyOnRails
[07:24:27] webdestroya: has joined #RubyOnRails
[07:25:10] Axsuul: has joined #RubyOnRails
[07:26:29] srruby_: has joined #RubyOnRails
[07:26:46] lexileo: has joined #RubyOnRails
[07:32:43] dionysus69: I had regular has_many relationship and the parent expected child class to be ParentClass::ChildClass instead of just ChildClass
[07:32:43] dionysus69: is that a bug?
[07:32:43] dionysus69: so now I have to manually specify the class_name
[07:32:45] LiftLeft: has joined #RubyOnRails
[07:32:45] Fridtjof: has joined #RubyOnRails
[07:32:45] S007: has joined #RubyOnRails
[07:32:45] CheckYourSix: has joined #RubyOnRails
[07:32:45] argoneus: has joined #RubyOnRails
[07:32:45] Guest48993: has joined #RubyOnRails
[07:32:58] lessless: has joined #RubyOnRails
[07:33:13] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[07:36:07] dionysus69: resolved, naming error :S thanks anyway
[07:53:06] davidh38: has joined #RubyOnRails
[08:04:12] Psy-Q: is it evil coupling if i set some defaults on a model before saving and those defaults are different depending on whether some other model is associated to it? e.g. DatabaseConfiguration will produce unique database names when saved on its own, but if there is an associated HostingConfiguration it will create a prefix for each database based on details from there
[08:07:20] techsethi: has joined #RubyOnRails
[08:13:53] snickers: has joined #RubyOnRails
[08:14:43] lessless: has joined #RubyOnRails
[08:23:33] faitswulff: has joined #RubyOnRails
[08:25:23] Ergo: has joined #RubyOnRails
[08:27:16] LiftLeft: has joined #RubyOnRails
[08:27:16] Fridtjof: has joined #RubyOnRails
[08:27:16] S007: has joined #RubyOnRails
[08:27:16] CheckYourSix: has joined #RubyOnRails
[08:27:16] argoneus: has joined #RubyOnRails
[08:27:16] Guest48993: has joined #RubyOnRails
[08:29:09] lxsameer: has joined #RubyOnRails
[08:59:46] ss942: has joined #RubyOnRails
[09:05:08] LiftLeft: has joined #RubyOnRails
[09:05:08] Fridtjof: has joined #RubyOnRails
[09:05:08] S007: has joined #RubyOnRails
[09:05:08] CheckYourSix: has joined #RubyOnRails
[09:05:08] argoneus: has joined #RubyOnRails
[09:05:08] Guest48993: has joined #RubyOnRails
[09:05:55] ss942: I have two tables t_one, t_two... t_one have t_one.t_two_id, t_two have name
[09:05:55] ss942: I want to select id of t_one which t_two.name is equeal to "exemple"
[09:05:55] ss942: I'm trying to do it with Rails, and it's not working in way I predirected. I tried this
[09:05:55] ss942: TOne.joins("INNER JOIN t_two ON t_two.id = t_one.t_two_id") .where("LOWER(t_two.name) LIKE (?)", "exemple").first().id()
[09:07:14] gregf_: has joined #RubyOnRails
[09:30:31] squonchie: has joined #RubyOnRails
[09:39:22] Terens: has joined #RubyOnRails
[09:48:28] tdy: has joined #RubyOnRails
[09:53:37] Tempesta: has joined #RubyOnRails
[10:13:51] ss942: has left #RubyOnRails: ()
[10:24:32] uks: has joined #RubyOnRails
[10:48:44] dionysus69: so I am entering new stage and I need an advice
[10:49:27] schneider: has joined #RubyOnRails
[10:49:46] lankanmon: has joined #RubyOnRails
[10:49:47] dionysus69: so I am getting into real scaling and real production infrustructure, and I need a very very important advice, what toolchain to use. I have heard of chef and docker and kubernates, which one do you guys use and why? and which one do you recommend for start?
[10:51:14] dionysus69: at the moment I have a basic infrustructure, the only separate node is the redis VM and I use capistrano for deployment. I was thinking that instead of continuing to scale up manually, I should look into orchestration methods
[10:55:08] ariedler: has joined #RubyOnRails
[11:00:32] tdy: has joined #RubyOnRails
[11:13:08] rspades: has joined #RubyOnRails
[11:23:24] davidh38: has joined #RubyOnRails
[11:24:02] squonchie: has joined #RubyOnRails
[11:43:28] wojnar: has joined #RubyOnRails
[11:45:48] faitswulff: has joined #RubyOnRails
[11:53:43] davidh38: has joined #RubyOnRails
[12:07:30] rspades_: has joined #RubyOnRails
[12:10:51] squonchie: has joined #RubyOnRails
[12:18:54] quazimodo: has joined #RubyOnRails
[12:19:53] [spoiler]: has joined #RubyOnRails
[12:21:32] [spoiler]: has joined #RubyOnRails
[12:29:16] DTZUZO: has joined #RubyOnRails
[12:30:05] quazimodo: has joined #RubyOnRails
[12:35:11] faitswulff: has joined #RubyOnRails
[12:50:15] Arkentias: has joined #RubyOnRails
[12:53:57] Arkentias: Hey everybody! I'm looking for a nice way to handle image uploads to S3 with different sizes per image everytime. I think ActiveStorage might have been an ~OK fit but some of the fields that need to contain those images are elements of a JSONB attribute. I'm under the impression that ActiveStorage needs some root model relations to function correctly
[12:54:19] Arkentias: Am I right? Would I be better off just writing my own solution since it's not THAT hard to do?
[12:54:40] srinidhi: has joined #RubyOnRails
[13:00:47] tycoon177: Arkentias: activestorage requires a model, yes, but that's all that would be needed. i wouldn't roll your own solution with this being readily available
[13:01:05] tycoon177: there's no requirement for other associations on the model or anything like that
[13:01:47] Arkentias: Thanks for the answer
[13:02:05] Arkentias: The "has_image" thingie is not related to an attribute at all in fact? it's just an arbitrary name?
[13:02:32] Arkentias: I mean an attribute from the database
[13:03:08] tycoon177: i mean..it needs a db attribute, but it'll be a single column
[13:03:15] tycoon177: you'll probably want has_one_attached https://edgeguides.rubyonrails.org/active_storage_overview.html#has-one-attached
[13:04:08] srinidhi: has joined #RubyOnRails
[13:04:10] tycoon177: sorry to run, but i have to head to work. feel free to tag me in a message if you have any questions..i'll be back within an hour
[13:04:14] Arkentias: OK yeah but the DB attribute will be in the tables that active storage creates, not in my model's schema I guess
[13:04:30] Arkentias: No problem! I think i'll figure things out myself :) Thanks for the help!
[13:04:43] Arkentias: You pointed me in the right direction
[13:12:45] jonno112: has joined #RubyOnRails
[13:14:51] davidh38: has joined #RubyOnRails
[13:15:40] davidh38: has joined #RubyOnRails
[13:17:41] dionysus69: any ideas why sidekiq is creating 51 connections when I have concurrency set to default 25?
[13:19:37] nickjj: has joined #RubyOnRails
[13:20:25] Arkentias: I don't know a lot about this but maybe this could help https://github.com/mperham/sidekiq/wiki/Advanced-Options#connection-pooling
[13:20:58] dionysus69: I was reading that but, I didn't understand what it really was for
[13:21:37] dionysus69: I think it's for throttling certain workers not to use more than given number of connections
[13:24:12] logik-bomb: I'm playing with models and namespaces but I'm a bit lost regarding associations. How should I define this migration? Thanks https://gist.github.com/alopes/6408daaba612f000e17afabb3cc408a0#file-ruby-rb-L33
[13:26:04] tdy: has joined #RubyOnRails
[13:27:35] davidh38: has joined #RubyOnRails
[13:27:55] platoon23: has joined #RubyOnRails
[13:29:15] Arkentias: Auto::Brand needs to have an "has_many :models" association
[13:29:34] Arkentias: @logik-bomb
[13:30:55] Arkentias: In your AutoModels migration you can also simply write "t.belongs_to :brand, index: true" instead of using references but I think ereferences works too
[13:32:10] sheepman: has joined #RubyOnRails
[13:33:41] logik-bomb: Arkentias: I could cry of joy right now
[13:35:30] Arkentias: Happy to help!
[13:50:53] faitswulff: has joined #RubyOnRails
[13:51:28] dionysus69: has joined #RubyOnRails
[13:52:52] chouhoulis: has joined #RubyOnRails
[14:03:37] apparition: has joined #RubyOnRails
[14:03:40] hays_: has joined #RubyOnRails
[14:06:40] Scient: has joined #RubyOnRails
[14:13:27] faitswulff: has joined #RubyOnRails
[14:16:04] krawchyk: has joined #RubyOnRails
[14:27:19] squonchie: has joined #RubyOnRails
[14:28:35] davidh38: has joined #RubyOnRails
[14:43:23] jonno112: has joined #RubyOnRails
[14:43:45] rspades_: has joined #RubyOnRails
[14:51:16] conta1: has joined #RubyOnRails
[14:56:59] snickers: has joined #RubyOnRails
[15:04:03] Saukk: has joined #RubyOnRails
[15:07:45] troys: has joined #RubyOnRails
[15:12:08] srinidhi: has joined #RubyOnRails
[15:17:53] squonchie: has joined #RubyOnRails
[15:39:23] orbyt_: has joined #RubyOnRails
[15:56:07] tdy: has joined #RubyOnRails
[16:04:00] faitswulff: has joined #RubyOnRails
[16:06:56] [spoiler]: has joined #RubyOnRails
[16:07:42] [spoiler]: has joined #RubyOnRails
[16:23:20] platoon23: has joined #RubyOnRails
[16:23:38] Terens: has joined #RubyOnRails
[16:24:06] Terens: How would you handle DST changes if you displayed a chart ?
[16:28:11] ivanskie: has joined #RubyOnRails
[16:31:09] desperek: has joined #RubyOnRails
[16:32:28] davidh38: has joined #RubyOnRails
[16:37:33] darkhanb: has joined #RubyOnRails
[16:41:17] prettybTech: has joined #RubyOnRails
[16:47:07] simmerz: has joined #RubyOnRails
[16:47:21] wojnar: has joined #RubyOnRails
[16:47:28] simmerz: Hi, is there a way to write “SELECT ARRAY[foo, bar]” in Arel?
[16:50:34] barce: has joined #RubyOnRails
[16:52:57] barce: has left #RubyOnRails: ()
[17:01:00] prettybTech: has joined #RubyOnRails
[17:07:30] tdy: has joined #RubyOnRails
[17:29:01] istrasci: has joined #RubyOnRails
[17:30:58] davidh38: has joined #RubyOnRails
[17:31:04] istrasci: I'm trying to create a gem with a dash in the name, and include it (locally) into a Rails app. When I run rails console, I get "[error]: Error loading plugin 'my-gem'". If I create a similar gem with an underscore in the name, it works fine. Any ideas?
[17:36:55] dviola: has joined #RubyOnRails
[17:38:57] TACTICALNEURALIM: has joined #RubyOnRails
[17:39:30] TACTICALNEURALIM: How do you get Rails to render pre-existing JSON? render :json foo tries to JSONify foo. Foo is already JSON. I cannot remember how this is done and my searches keep finding irrelevant stuff
[17:39:37] TACTICALNEURALIM: I can't remember how to do this
[17:41:27] sameerynho: has joined #RubyOnRails
[17:42:10] prettybTech: has joined #RubyOnRails
[17:47:40] dviola: has joined #RubyOnRails
[17:56:53] Puffball: has joined #RubyOnRails
[18:08:29] lexileo: has joined #RubyOnRails
[18:09:51] ivanskie: has joined #RubyOnRails
[18:31:41] weaksauce: has joined #RubyOnRails
[18:40:24] agent_white: has joined #RubyOnRails
[18:48:53] tycoon177: does #touch call the after_save callbacks in activerecord?
[18:49:06] tycoon177: or will i need a separate after_touch callback declared?
[18:59:36] za1b1tsu: has joined #RubyOnRails
[19:05:09] chouhoulis: has joined #RubyOnRails
[19:17:27] duderonomy: has joined #RubyOnRails
[19:23:33] pulgolino: has joined #RubyOnRails
[19:28:09] davidh38: has joined #RubyOnRails
[19:47:59] ruurd: has joined #RubyOnRails
[19:49:48] Xiti: has joined #RubyOnRails
[19:57:29] prettybTech: has joined #RubyOnRails
[20:21:09] roshanavand: has joined #RubyOnRails
[20:29:15] dviola: has joined #RubyOnRails
[20:36:14] mlt-: has joined #RubyOnRails
[20:42:17] davidh38: has joined #RubyOnRails
[20:42:46] DTZUZO: has joined #RubyOnRails
[20:44:59] davidh38: has joined #RubyOnRails
[20:45:16] ArTiSTiX: has joined #RubyOnRails
[20:57:01] davidh38: has joined #RubyOnRails
[21:01:52] tdy: has joined #RubyOnRails
[21:09:53] simmerz: has joined #RubyOnRails
[21:13:39] Dimik: has joined #RubyOnRails
[21:17:03] chouhoulis: has joined #RubyOnRails
[21:17:43] NoGodDamnIdea: has joined #RubyOnRails
[21:33:35] bousquet: has joined #RubyOnRails
[21:34:19] bousquet: anyone used activeresource lately (this year)? Is this gem still alive or are there ways to wrap rest apis for consumption?
[21:34:30] bousquet: *better ways
[21:37:19] StFS: has joined #RubyOnRails
[21:42:51] robb: has joined #RubyOnRails
[21:58:08] prettybTech: has joined #RubyOnRails
[22:10:31] prettybTech: has joined #RubyOnRails
[22:11:05] Exagone313: has joined #RubyOnRails
[22:15:59] oddie: has joined #RubyOnRails
[22:20:43] riotjones: has joined #RubyOnRails
[22:31:22] agent_white: has joined #RubyOnRails
[22:39:47] tdy: has joined #RubyOnRails
[22:50:43] quazimodo: has joined #RubyOnRails
[22:55:29] davidh38: has joined #RubyOnRails
[22:57:12] davidh38: has joined #RubyOnRails
[23:13:14] dogweather_: has joined #RubyOnRails
[23:14:15] DTZUZO: has joined #RubyOnRails
[23:16:44] dogweather: has joined #RubyOnRails
[23:29:03] skangas: has joined #RubyOnRails
[23:30:24] lxsameer: has joined #RubyOnRails
[23:30:43] bothari_: has joined #RubyOnRails
[23:30:48] bothari_: I need a little practical advice. I had a great interview for a rails spot, but found out they want to hire me 1099. I've only done contracts through TEK Systems. Anybody here done something similar?
[23:31:11] dogweather: has joined #RubyOnRails
[23:31:18] skangas: Hi! I'm seeing spurious "NameError: uninitialized constant" when running unit tests. It seems that my exception classes are somehow not loaded - but this does not happen consistently. It seems to happen randomly.
[23:31:56] dogweather: rspec --bisect is great for that
[23:32:36] skangas: dogweather: Is there a minitest equivalent?
[23:33:07] skangas: dogweather: Just found it, thanks! I'll try that.
[23:33:54] havenwood: bothari_: I've worked as a contractor before. Anything in particular you're wondering?
[23:35:08] DTZUZO: has joined #RubyOnRails
[23:35:17] havenwood: bothari_: What's the geographical location you'd be working in?
[23:37:09] cschneid_: has joined #RubyOnRails
[23:37:27] DTZUZO_: has joined #RubyOnRails
[23:39:30] hive-mind: has joined #RubyOnRails
[23:40:28] havenwood: bothari_: If it's in the US, you can use a Form 8919 to see the difference in social security and medicare taxes: https://www.irs.gov/pub/irs-pdf/f8919.pdf
[23:42:02] skangas: It seems it only loads the class file when I use a class by that name. Interesting stuff for a beginner like me.
[23:42:20] skangas: So where would I normally place exceptions if not bundled with the relevant base class?
[23:42:27] havenwood: bothari_: I guess it's the US since you said 1099. So I'd suggest looking at whether they're misclassifying as well.
[23:42:50] skangas: I mean, to avoid errors if the exceptions are referenced before the class that they are bundled with.
[23:43:44] havenwood: bothari_: It's unfortunately fairly common for employers to intentionally misclassify. There are remedies though - talk to an employment lawyer ideally.
[23:44:38] skangas: exceptions in this case I mean "class MyError < StandardError"
[23:47:17] dogweather: skangas: I believe that standard practice is to place all custom library code into /lib. And your exception classes wd be an example of that
[23:47:31] dogweather: These will get auto-loaded by Rails
[23:48:09] dogweather: So, e.g., lib/my_app_name/exceptions.rb is where I'd expect to find those
[23:48:46] dogweather: And then, they'd be in a module namespace: MyAppName::MyException
[23:50:24] DTZUZO_: has joined #RubyOnRails
[23:53:17] skangas: dogweather: Thanks. I'm still confused as to why my current exception classes are not autoloaded, and how it would be different if they were in /lib.
[23:53:24] davidh38: has joined #RubyOnRails
[23:53:41] dogweather: Where do you have them?
[23:53:43] skangas: Right now, they are only loaded when I use the class associated with that file (as service objects) -- maybe this is why?
[23:53:44] davidh38: has joined #RubyOnRails
[23:53:59] dogweather: Ah hah, you're trying to be clever ;-)
[23:54:16] skangas: Trying to avoid being too clever! :)
[23:54:20] dogweather: Yeah, let the Rails framework handle that for you. You'll just be fighting against it otherwise
[23:54:58] skangas: There must be some magic associated with service objects that is probably not there for the /lib directory then in terms of auto-loading
[23:55:05] dogweather: If you want a lighter weight web framework for services you can look at sinatra
[23:55:07] skangas: Would I be correct to assume that?
[23:55:22] dogweather: Oh yeah, Rails has tons of magic around the loading of classes
[23:55:38] dogweather: And it changes between major versions. So I just 'keep away'
[23:55:46] skangas: Good idea.
[23:56:17] skangas: I just have to know when to keep away, and clearly I just stumbled into a marsh...
[23:56:30] dogweather: Yep, it's not a normal Ruby app in that sense - it has its own loading and autoloading behavior
[23:57:15] skangas: OK, so next order of business is probably to move my external service processing to "/lib"
[23:57:51] skangas: I was slightly confused when trying that earlier though, in particular of how to make unit tests for "/lib" that I can run with "rails test"
[23:58:07] dogweather: 's my personal preference. And then if you want, you can add the /lib directory to be easier to develop with, by not caching it
[23:58:10] skangas: I've been googling a ton but all the links seem to talk about Rails 3 and things seem to have changed
[23:58:38] skangas: I'm sure I'll come up with something
[23:58:46] skangas: Rails is a moving target - that seems like a good thing
[23:58:59] dogweather: I use rspec, and there, I just make sure to mirror the dir structure. That may work for tests too
[23:59:13] skangas: Having done quite a bit of (web) developing before (also using frameworks) I'm very impressed so far
[23:59:19] dogweather: See if the Rails testing guide has anything
[23:59:21] skangas: With Ruby on Rails
[23:59:28] skangas: Thanks dogweather for your help and for the chat
[23:59:37] dogweather: You're welcome