« Back to channel list

#RubyOnRails - 13 February 2019

« Back 1 day Forward 1 day »
[00:20:44] alan_w: has joined #RubyOnRails
[00:21:19] andrewray: has joined #RubyOnRails
[00:21:38] andrewray: when developing a local gem that i'm including in a rails app, how do I ensure the gem source code automatically reloads in the rails app?
[00:42:33] davidh38: has joined #RubyOnRails
[01:02:43] Technodrome: has joined #RubyOnRails
[01:08:04] quazimodo: has joined #RubyOnRails
[01:08:23] bruul: has joined #RubyOnRails
[01:08:56] quazimodo: has joined #RubyOnRails
[01:16:57] gambl0r3: has joined #RubyOnRails
[02:21:20] timdotrb: has joined #RubyOnRails
[02:24:41] maryo_: has joined #RubyOnRails
[02:26:05] timdotrb: has joined #RubyOnRails
[02:46:41] kapil____: has joined #RubyOnRails
[02:48:25] sevenseacat: has joined #RubyOnRails
[02:53:48] lexileo: has joined #RubyOnRails
[02:54:43] srruby: has joined #RubyOnRails
[02:55:21] srruby: Are people still using passenger+nginx for production? Any other typical approaches?
[03:15:04] valadares: has joined #RubyOnRails
[03:19:17] Saukk: has joined #RubyOnRails
[03:47:55] orbyt_: has joined #RubyOnRails
[03:50:11] phait0: has joined #RubyOnRails
[03:53:10] phait0: has left #RubyOnRails: ()
[03:57:20] Tempesta: has joined #RubyOnRails
[04:10:06] braincrash: has joined #RubyOnRails
[04:25:22] v01d4lph4: has joined #RubyOnRails
[04:36:09] gambl0r3: has joined #RubyOnRails
[04:53:50] tdy2: has joined #RubyOnRails
[05:01:58] RiPuk: has joined #RubyOnRails
[05:03:55] havenwood: has joined #RubyOnRails
[05:50:22] defsdoor: has joined #RubyOnRails
[06:14:57] conta: has joined #RubyOnRails
[06:39:18] Technodrome: has joined #RubyOnRails
[06:48:36] segy: has joined #RubyOnRails
[07:14:42] dionysus69: has joined #RubyOnRails
[07:18:43] orbyt_: has joined #RubyOnRails
[07:46:08] wethu: has joined #RubyOnRails
[07:47:05] ravenousmoose: has joined #RubyOnRails
[08:01:33] lankanmon: has joined #RubyOnRails
[08:16:22] gambl0r3: has joined #RubyOnRails
[08:21:46] ariedler: has joined #RubyOnRails
[08:22:20] srinidhi: has joined #RubyOnRails
[08:49:53] mauro1254: has joined #RubyOnRails
[08:58:27] dustinm`: has joined #RubyOnRails
[09:11:40] status402: has joined #RubyOnRails
[09:12:36] mikecmpbll: has joined #RubyOnRails
[09:16:57] lunarkitty7: has joined #RubyOnRails
[09:17:14] dustinm`: has joined #RubyOnRails
[09:35:30] status402_: has joined #RubyOnRails
[09:38:55] lxsameer: has joined #RubyOnRails
[09:49:35] GodFather_: has joined #RubyOnRails
[09:52:42] apparition: has joined #RubyOnRails
[10:22:29] ariedler: has joined #RubyOnRails
[10:30:58] tdy3: has joined #RubyOnRails
[10:49:09] Puppet`: has joined #RubyOnRails
[10:55:42] guyzmo: hi! I got a weird issue with path autoloading in rails. I wrote a lib (using trailblazer) that sits in `app/operations/foo/create.rb`, which includes a module `app/operations/foo/common.rb`. When I push to my staging env (running in RAILS_ENV dev mode), the `common` module does not get included (saying that an included symbol does not exist). If I ssh to the staging env, and I edit the
[10:55:44] guyzmo: `app/operations/foo/create.rb` file, save it without modifications, it then works
[10:56:44] guyzmo: in `config/application.rb` I have added: `config.paths.add "app/operations", glob: "**/*.rb" ; config.autoload_paths += ["#{config.root}/app/operations/*"]`
[10:57:06] blackmesa: has joined #RubyOnRails
[10:57:50] guyzmo: Having to ssh and touch the file each time I push to the staging env is a pain… and I'm worrying that when I push in a production env it'll break without solution :-/
[10:58:36] guyzmo: I'm pretty sure I forgot something or did something stupid here… But I cannot tell what, anybody have any idea? 🙏
[11:01:07] tbuehlmann: app/* is automatically autoloaded, so you don't need to add any path
[11:01:24] tbuehlmann: app/operations/foo/create.rb would then define a Foo::Create class/module
[11:03:06] guyzmo: indeed, I do create a Foo::Create class within it, that includes a Foo::Common module
[11:03:19] guyzmo: and the Foo::Common module sits in app/operations/foo/common.rb
[11:03:54] guyzmo: I even switched the include statement to `include ::Foo::Common` out of despair, but I guess it does not matter much
[11:04:43] guyzmo: I also have `app/operations/bar/common.rb` that defines `Bar::Common`, but I guess it should not conflict
[11:05:15] tbuehlmann: looks good to me. can you reproduce this behaviour locally?
[11:07:47] guyzmo: it does not reproduce in my local dev env (which is dockerized)
[11:08:01] guyzmo: only when I push to the staging env
[11:08:08] tbuehlmann: but so should your staging env?
[11:08:25] guyzmo: yup, my staging env is basically the same as my local env
[11:08:48] guyzmo: (except for the part where it's running on premises)
[11:09:19] tbuehlmann: so you're using docker locally, but the staging env differs from that? how does that makes sense? :)
[11:11:21] guyzmo: it does not, the env is about the same
[11:12:08] tbuehlmann: whatever. hard to tell what's wrong if you can't reproduce it locally
[11:12:51] guyzmo: yeah, that's why it's driving me insane /o\
[11:41:04] v01d4lph4: has joined #RubyOnRails
[11:41:52] quazimodo: has joined #RubyOnRails
[11:42:00] v01d4lph4: has joined #RubyOnRails
[11:47:11] davidh38: has joined #RubyOnRails
[11:54:02] lankanmon: has joined #RubyOnRails
[11:55:07] ariedler: has joined #RubyOnRails
[12:00:40] markoong: has joined #RubyOnRails
[12:20:05] blackmesa1: has joined #RubyOnRails
[12:33:19] ravenousmoose: has joined #RubyOnRails
[12:34:56] djgraham: has joined #RubyOnRails
[12:35:31] Sylario: has joined #RubyOnRails
[12:38:17] andywww: has joined #RubyOnRails
[12:55:27] mike274: has joined #RubyOnRails
[13:48:11] reber: has joined #RubyOnRails
[13:52:49] srinidhi: has joined #RubyOnRails
[13:58:45] v01d4lph4: has joined #RubyOnRails
[14:04:57] segy: has joined #RubyOnRails
[14:07:10] mikecmpbll: has joined #RubyOnRails
[14:21:13] alan_w: has joined #RubyOnRails
[14:30:52] s2013: has joined #RubyOnRails
[14:33:00] work_: has joined #RubyOnRails
[14:50:41] KeyJoo: has joined #RubyOnRails
[14:54:51] Jervis_: has joined #RubyOnRails
[15:24:49] mr-spoon: has joined #RubyOnRails
[15:29:07] dviola: has joined #RubyOnRails
[15:29:17] mr-spoon: has joined #RubyOnRails
[15:37:09] mr-spoon: has joined #RubyOnRails
[15:38:14] conta: has joined #RubyOnRails
[15:40:03] blackmesa1: has joined #RubyOnRails
[15:47:11] bruul: has joined #RubyOnRails
[15:48:30] s2013: has joined #RubyOnRails
[15:57:24] segy: has joined #RubyOnRails
[16:32:49] conta2: has joined #RubyOnRails
[16:49:30] ravenousmoose: has joined #RubyOnRails
[16:51:42] conta1: has joined #RubyOnRails
[16:54:14] bruul: has joined #RubyOnRails
[16:57:16] v01d4lph4: has joined #RubyOnRails
[16:58:23] valadares: has joined #RubyOnRails
[17:02:26] ravenousmoose: has joined #RubyOnRails
[17:13:21] valadares: has joined #RubyOnRails
[17:14:05] maryo: has joined #RubyOnRails
[17:16:05] v01d4lph4: has joined #RubyOnRails
[17:23:49] orbyt_: has joined #RubyOnRails
[17:47:18] valadares: has joined #RubyOnRails
[17:52:48] KeyJoo: has joined #RubyOnRails
[17:52:49] tdy3: has joined #RubyOnRails
[17:58:35] Dbugger: has joined #RubyOnRails
[17:59:30] valadares: has joined #RubyOnRails
[18:02:57] gambl0r3: has joined #RubyOnRails
[18:06:15] Technodrome: has joined #RubyOnRails
[18:06:44] [Butch]: has joined #RubyOnRails
[18:09:13] andrewray: has joined #RubyOnRails
[18:09:26] andrewray: https://stackoverflow.com/a/12117203/743464 seems to semi-work for allowing auto reloading of locally developed gems in a rails app
[18:09:35] roelof: has joined #RubyOnRails
[18:09:46] andrewray: rails's file watcher abstraction is 1 leaky boy
[18:09:59] roelof: Why is this not giving me a link with the icon
[18:10:21] roelof: <%= article_path(article) do %> <i class ="material icons"> delete </i> <% end %>
[18:25:44] tdy4: has joined #RubyOnRails
[18:26:32] egray: has joined #RubyOnRails
[18:36:17] ariedler: has joined #RubyOnRails
[18:36:29] andrewray: rails irc is dead I just post here to scream into the void
[18:36:45] andrewray: I added a constant to rails explicitly_unloadable_constants and I think it works the first time the app loads
[18:36:49] andrewray: but on reloads I get the error
[18:37:05] andrewray: LoadError (Unable to autoload constant NameSpace::Module, expected /Users/user/repo/gems/namespace-gem/lib/file.rb - but that file exists and does define the constant it complains about
[18:42:22] mikecmpbll: has joined #RubyOnRails
[18:42:48] skryking: has joined #RubyOnRails
[18:43:25] andrewray: who thought autoloading was a good idea
[18:46:11] valadares: has joined #RubyOnRails
[18:47:50] gambl0r3: has joined #RubyOnRails
[18:48:25] gambl0r3: has joined #RubyOnRails
[18:50:43] roelof: I see, I also do not get a answer to my question. Maybe I have to find a better channel to ask for help or leave rails
[18:51:42] defsdoor: has joined #RubyOnRails
[19:04:58] scrptktty: has joined #RubyOnRails
[19:05:34] davidh38: has joined #RubyOnRails
[19:08:51] scrptktty: I'm going through the Rails docs on the asset pipeline. As the most basic explanation (assuming you do not use Sass or Coffeescript), it concatenates and minifies the js.
[19:11:01] tdy: has joined #RubyOnRails
[19:11:07] scrptktty: A few questions, is sprockets a great CS term? Or is this Rails specific? How do Turbolinks relate to the asset pipeline?
[19:11:46] scrptktty: Just looking for a little extra explanation on the ins and outs of integrating client-side JS into a rails API.
[19:16:54] agent_white: has joined #RubyOnRails
[19:18:52] andrewray: sprockets is a non-transferrable rails specific thing
[19:29:14] lxsameer: has joined #RubyOnRails
[19:33:29] scrptktty: Do people still use Coffeescript or Sass?
[19:56:34] blindMoe: has joined #RubyOnRails
[19:56:57] andrewray: has joined #RubyOnRails
[19:57:12] andrewray: whyyy is rails autoloading non-deterministic nonsense
[19:57:52] v01d4lph4: has joined #RubyOnRails
[20:12:37] bruul: scrptktty: isn't scss being replaced by something? whenever i run `bundle install` i get a warning that sass is gonna be rip in like, march
[20:12:45] havenwood: roelof, oh, they left. anyhow, the block isn't ever evaluated.
[20:13:19] havenwood: things that don't yield a block don't yield a block passed to them
[20:17:34] blindMoe: Is there a good way for a class to know what other classes inherit from it?
[20:18:53] havenwood: blindmoe: Ruby has #ancestors but Rails adds #descendants.
[20:19:20] blindMoe: Ahh yes.. thank you very much
[20:19:30] havenwood: blindmoe: You're welcome
[20:34:31] powerbit: has joined #RubyOnRails
[20:37:41] tdy1: has joined #RubyOnRails
[20:41:40] [Butch]: has joined #RubyOnRails
[20:45:55] Radar: GOOD MORNING
[20:52:16] agent_white: has joined #RubyOnRails
[20:54:47] xco: has joined #RubyOnRails
[20:55:16] blackmesa1: has joined #RubyOnRails
[20:56:21] DTZUZO: has joined #RubyOnRails
[20:56:45] xco: Hi all. I’m getting a PG syntax error on this line with regex and have no idea how to deal with it. Will appreciate some help: https://gist.github.com/xcobar/04d902269107f5b385070bba6d3c4c38
[21:07:41] Radar: xco: what database?
[21:07:57] xco: Radar: postgres
[21:08:17] Radar: I am not familiar with the <field> REGEXP <regexp> syntax
[21:08:31] xco: But I’ve been directed to https://www.postgresql.org/docs/11/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP which seems to do the job
[21:09:25] Radar: Right, but you're using
[21:09:34] Radar: where do you see that on the page? I am not seeing it there.
[21:17:33] Radar: I see "SIMILAR TO"
[21:19:04] v01d4lph4: has joined #RubyOnRails
[21:19:50] xco: Radar: SIMILAR TO then expression
[21:20:00] xco: instead of regexp then expression
[21:20:18] xco: to match the “expression” patter in Posgresql
[21:20:23] xco: pattern*
[21:25:40] reber: has joined #RubyOnRails
[21:38:09] bruul: has joined #RubyOnRails
[22:13:43] orbyt_: has joined #RubyOnRails
[22:16:44] lunarkitty7: has joined #RubyOnRails
[22:21:39] andrewray: has joined #RubyOnRails
[22:21:43] andrewray: what causes rails to unload a constant?
[22:24:32] andrewray: could I log when a constant is loaded/unloaded?
[22:30:24] andrewray: I see rails ActiveSupport::Dependencies.autoloaded_constants contains my constant
[22:30:37] andrewray: but then the next line that references it dies with LoadError (Unable to autoload constant...)
[22:38:11] ariedler: has joined #RubyOnRails
[22:55:43] MrCrackPotBuilde: has joined #RubyOnRails
[22:57:10] tdy1: has joined #RubyOnRails
[23:03:42] alexhartley: has joined #RubyOnRails
[23:04:24] andrewray: TIL rails autoloading eats thousands of exceptions and raises an empty one https://github.com/rails/rails/blob/7d7372c14df4ad5b546f012a82538753c5991905/activesupport/lib/active_support/dependencies.rb#L386
[23:04:31] andrewray: truly pinnacle of SE
[23:11:05] chloxians: has joined #RubyOnRails
[23:19:54] v01d4lph4: has joined #RubyOnRails
[23:21:30] andrewray: wow what those exceptions are all "cannot load such file" and that's how it checks??
[23:25:16] Technodrome: has joined #RubyOnRails
[23:33:47] blackmesa1: has joined #RubyOnRails
[23:36:08] conta: has joined #RubyOnRails