« Back to channel list

#RubyOnRails - 07 June 2018

« Back 1 day Forward 1 day »
[00:11:36] crankharder: has joined #RubyOnRails
[00:20:24] cagomez: has joined #RubyOnRails
[00:31:38] jane_booty_doe: has joined #RubyOnRails
[01:01:57] fourcolors: has joined #RubyOnRails
[01:07:03] tdy: has joined #RubyOnRails
[01:10:20] orbyt_: has joined #RubyOnRails
[01:15:34] cagomez: has joined #RubyOnRails
[01:35:46] sevenseacat: has joined #RubyOnRails
[01:50:21] resting: has joined #RubyOnRails
[01:50:58] resting: how do i save a file from post request to disk manually?
[02:08:38] mjolnird: has joined #RubyOnRails
[02:38:15] Ryanar: has joined #RubyOnRails
[02:50:19] akaiiro: has joined #RubyOnRails
[02:52:40] fourcolors: has joined #RubyOnRails
[03:01:03] Puffball: has joined #RubyOnRails
[03:08:15] jane_booty_doe: has joined #RubyOnRails
[03:10:48] quazimodo: has joined #RubyOnRails
[03:11:23] braincrash: has joined #RubyOnRails
[03:33:19] cagomez: has joined #RubyOnRails
[03:47:22] vedu_: has joined #RubyOnRails
[03:55:58] ebsen: has joined #RubyOnRails
[03:56:04] fourcolors: has joined #RubyOnRails
[04:31:32] fourcolors: has joined #RubyOnRails
[05:11:07] ur5us: has joined #RubyOnRails
[05:16:35] ur5us: has joined #RubyOnRails
[05:25:49] reber: has joined #RubyOnRails
[05:33:44] fourcolors: has joined #RubyOnRails
[05:41:02] fourcolors: has joined #RubyOnRails
[05:41:45] ian_strascina: has joined #RubyOnRails
[05:54:12] ian_strascina: has left #RubyOnRails: ()
[05:57:18] wethu: has joined #RubyOnRails
[06:00:12] vedu_: has joined #RubyOnRails
[06:07:38] ur5us: has joined #RubyOnRails
[06:08:22] Or1on: has joined #RubyOnRails
[06:09:51] vedu_: has joined #RubyOnRails
[06:23:33] vedu_: has joined #RubyOnRails
[06:48:16] macxim: has joined #RubyOnRails
[06:51:51] hfp_work: has joined #RubyOnRails
[06:52:27] elsurudo: has joined #RubyOnRails
[06:54:25] dionysus69: has joined #RubyOnRails
[07:05:44] markh: has joined #RubyOnRails
[07:11:04] mtkd: has joined #RubyOnRails
[07:23:21] sandstrom: has joined #RubyOnRails
[07:33:04] drale2k_: has joined #RubyOnRails
[07:43:02] srinidhi: has joined #RubyOnRails
[07:48:58] vedu_: has joined #RubyOnRails
[07:53:15] jottr: has joined #RubyOnRails
[07:56:40] psychoslave: has joined #RubyOnRails
[08:01:50] drale2k_: has joined #RubyOnRails
[08:03:44] _aeris_: has joined #RubyOnRails
[08:17:42] pwnd_nsfw`: has joined #RubyOnRails
[08:26:17] roshanavand: has joined #RubyOnRails
[08:34:23] uks: has joined #RubyOnRails
[08:53:23] kapil___: has joined #RubyOnRails
[08:54:13] ur5us: has joined #RubyOnRails
[09:08:16] conta: has joined #RubyOnRails
[09:18:26] hellekin: has joined #RubyOnRails
[09:29:24] vedu_: has joined #RubyOnRails
[09:32:28] NL3limin4t0r: has joined #RubyOnRails
[09:46:11] Charliebr73: has joined #RubyOnRails
[09:50:55] drale2k_: has joined #RubyOnRails
[09:53:53] Terens: has joined #RubyOnRails
[09:54:19] Terens: how would you apply acl/rbac to actioncable messages?
[10:03:17] FernandoBasso: has joined #RubyOnRails
[10:04:40] conta: has joined #RubyOnRails
[10:20:33] drale2k_: has joined #RubyOnRails
[10:22:19] Ergo: has joined #RubyOnRails
[10:45:42] bbobb: has joined #RubyOnRails
[10:51:07] jane_booty_doe: has joined #RubyOnRails
[11:05:42] vedu_: has joined #RubyOnRails
[11:15:39] apparition47: has joined #RubyOnRails
[11:20:48] vedu_: has joined #RubyOnRails
[11:21:15] DrYockel: has joined #RubyOnRails
[11:23:28] Charliebr73: Has anyone has any issues with Redis struggling to load large XML files?
[11:23:44] Charliebr73: I am working on a Rails 5, Ruby 2.5 application that uses PostreSQL and Redis, and Redis seems to either struggle or time out when loading large files
[11:24:00] Charliebr73: It is an app hosted on Heroku
[11:24:33] Charliebr73: The code of the project is open source, if anyone fancy taking a look.
[11:28:19] reber: has joined #RubyOnRails
[11:34:27] sandstrom: has joined #RubyOnRails
[11:45:59] dminuoso: Charliebr73: redis? xml?
[11:46:41] dminuoso: Charliebr73: Are you claiming that redis has some LOADXMLFILE command Im not aware of that is struggling?
[11:46:56] dminuoso: https://redis.io/commands says no
[11:50:03] Charliebr73: @diminuoso No. We import xml files to a Rails application. The data is then stored in-memory in Redis. when I try to open that file (and I use the 'monitor' command from Redis CLI to see the process happening), it runs to a certain point and then stops.
[11:50:34] Charliebr73: after that it just does ping, auth, info stuff
[11:50:42] mtkd: has joined #RubyOnRails
[11:51:21] Charliebr73: I have to refresh the page a few times, and sometimes even after that, it does not load the xml content
[11:54:28] Saukk: has joined #RubyOnRails
[11:55:31] dminuoso: Charliebr73: Okay so this is what I got:
[11:55:40] dminuoso: "We have this large thing and it doesn't work right"
[11:58:32] NL3limin4t0r: Charliebr73: define "large XML" are we talking 500MB, 2GB, 10GB ??
[12:00:45] dminuoso: "We have a large database..." "Really? How large?" "20,000 rows but it's tweaked so most queries execute in less than 1s"
[12:01:07] dminuoso: ^- transscript of a real conversation Ive once had with someone. I was the second comment.
[12:03:42] tbuehlmann: reminds me of "Big data is like teenage sex: everyone talks about it, nobody really knows how to do it, everyone thinks everyone else is doing it, so everyone claims they are doing it."
[12:04:12] za1b1tsu: has joined #RubyOnRails
[12:09:52] acovrig: has joined #RubyOnRails
[12:13:13] quazimodo: has joined #RubyOnRails
[12:22:37] fmcgeough: has joined #RubyOnRails
[12:23:14] sandstrom: has joined #RubyOnRails
[12:38:03] kapil___: has joined #RubyOnRails
[12:45:19] must-be: has joined #RubyOnRails
[12:45:23] quazimodo: has joined #RubyOnRails
[12:56:50] jottr: has joined #RubyOnRails
[13:02:29] Charliebr73: Never mind, mate. Thanks for the help.
[13:03:45] pavelz: has joined #RubyOnRails
[13:04:16] pavelz: hi folks just wonder if anyone seen: SyntaxError: [stdin]:387:28: unexpected = in all .erb files. Happened after upgrade from 4.2 to 5.2
[13:04:26] pavelz: <%= %> stopped working
[13:08:57] fmcgeough: has joined #RubyOnRails
[13:10:34] mtkd: has joined #RubyOnRails
[13:12:19] sevenseacat: has joined #RubyOnRails
[13:13:10] Dbugger: has joined #RubyOnRails
[13:14:28] jackhum: has joined #RubyOnRails
[13:18:25] leequarella: has joined #RubyOnRails
[13:26:12] Ericx2x: has joined #RubyOnRails
[13:29:34] must-be: has joined #RubyOnRails
[13:30:16] dminuoso: I think not.
[13:31:55] leequarella: Hi folks, I have a question about ajax:success. My controller has `render js: stuff`. I'd like to hijack ajax:success to stop that from firing under certain conditions.
[13:32:06] leequarella: `return false` does not seem to achieve that, any ideas?
[13:33:58] dminuoso: leequarella: Take control and dont rely on automagic?
[13:34:50] DrYockel: has joined #RubyOnRails
[13:35:02] dminuoso: leequarella: Just write out an explicit document.addEventListener('turbolinks:load', ...) and fetch the page yourself.
[13:35:53] dminuoso: Most of the rails js/ajax logic is antiquated, weird and depends on a a bunch of undocumented cruft.
[13:57:02] acovrig: has joined #RubyOnRails
[14:00:20] dblessing: has joined #RubyOnRails
[14:05:54] Or1on: has joined #RubyOnRails
[14:08:40] pavelz: ah its ExecJS throwing an error
[14:09:08] pavelz: really dumbfounded how to fix such an oblique error
[14:13:06] mtkd: has joined #RubyOnRails
[14:14:36] SteenJobs: has joined #RubyOnRails
[14:19:39] pavelz: is there a way to find on with what file is ExecJS is having a problem with ?
[14:27:04] Ryanar: has joined #RubyOnRails
[14:29:56] Puffball: has joined #RubyOnRails
[14:32:58] Inside: has joined #RubyOnRails
[14:33:14] Inside: Anyone else recently convert from tabs to spaces?
[14:47:45] troys: has joined #RubyOnRails
[14:54:00] spohnz: has joined #RubyOnRails
[15:01:00] cschneid: has joined #RubyOnRails
[15:07:34] mikecmpbll: has joined #RubyOnRails
[15:17:02] KeyJoo: has joined #RubyOnRails
[15:20:20] spohnz: has joined #RubyOnRails
[15:26:29] tcopeland: has joined #RubyOnRails
[15:26:35] jackhum: has joined #RubyOnRails
[15:28:45] jackhum: has joined #RubyOnRails
[15:29:45] akaiiro: has joined #RubyOnRails
[15:30:54] must-be: has left #RubyOnRails: ()
[15:31:10] tycoon177: is it bad practice to have a non db-based model? Like, I have some static data that I'd like a model for because it's used across several models and didn't know if it'd be best to just make a PORO or if there's some other way to do this
[15:34:12] mtkd: has joined #RubyOnRails
[15:34:53] ShekharReddy: has joined #RubyOnRails
[15:42:14] jcarl43: has joined #RubyOnRails
[15:50:33] NL3limin4t0r: It's not necessary bad to have PORO objects for static data. There are a few things to consider imo. 1) Even static data can be put in the DB to still make use of all the ActiveRecord::Base helpers, if you wan't to make sure nothing overrides the you can set only SELECT permissions on DB level. 2) If you're using your own model it's generaly better to have a PORO than extending from ActiveRecord::Base
[15:50:36] NL3limin4t0r: and trying to spoof all the build in methods, needed to get the whole thing working.
[15:54:07] Ryanar: has joined #RubyOnRails
[15:56:09] NL3limin4t0r: You don't really find to much about the best practices of having non db-based models, but that's what I experienced thus far.
[15:58:16] cagomez: has joined #RubyOnRails
[16:08:13] chouhoulis: has joined #RubyOnRails
[16:08:26] [Butch]: has joined #RubyOnRails
[16:11:57] chouhoulis: has joined #RubyOnRails
[16:17:49] Ericx2x: has joined #RubyOnRails
[16:27:38] glassresistor: has joined #RubyOnRails
[16:33:11] Ericx2x: has joined #RubyOnRails
[16:33:46] tycoon177: NL3limin4t0r: thanks for the input. I ended up just writing a standard class that doesn't inherit from activerecord::base and ended up just writing a few helper methods to get the right instance. In the end, it creates a maximum of 3 (at this time) objects in memory with 2 attributes each. It just started to get a bit messy with magic numbers flying around due to some legacy code
[16:34:46] jcarl43: has joined #RubyOnRails
[17:00:25] npgm: has joined #RubyOnRails
[17:02:39] za1b1tsu: has joined #RubyOnRails
[17:12:34] jottr: has joined #RubyOnRails
[17:13:14] eckhardt_: has joined #RubyOnRails
[17:16:33] dbugger_: has joined #RubyOnRails
[17:17:36] Ericx2x: has joined #RubyOnRails
[17:22:37] ramfjord: has joined #RubyOnRails
[17:29:23] sandstrom: has joined #RubyOnRails
[17:29:44] SteenJobs: has joined #RubyOnRails
[17:31:53] ttillotson: has joined #RubyOnRails
[17:35:29] akaiiro: has joined #RubyOnRails
[17:36:12] regedit: has joined #RubyOnRails
[17:38:34] jackhum: has joined #RubyOnRails
[17:38:55] mtkd: has joined #RubyOnRails
[17:39:31] jackhum: has joined #RubyOnRails
[17:43:14] Ericx2x: has joined #RubyOnRails
[17:44:40] jottr: has joined #RubyOnRails
[17:49:04] za1b1tsu: has joined #RubyOnRails
[17:58:18] jackhum: has joined #RubyOnRails
[18:01:01] NoGodDamnIdea: has joined #RubyOnRails
[18:04:57] cagomez: has joined #RubyOnRails
[18:15:11] cagomez: has joined #RubyOnRails
[18:17:45] jottr: has joined #RubyOnRails
[18:23:55] eckhardt_: has joined #RubyOnRails
[18:25:05] eckhardt_: has joined #RubyOnRails
[18:31:01] sameerynho: has joined #RubyOnRails
[18:31:17] jackhum: has joined #RubyOnRails
[18:36:07] tdy: has joined #RubyOnRails
[18:43:20] mtkd: has joined #RubyOnRails
[18:52:06] Cache_Money: has joined #RubyOnRails
[18:53:11] w0rd-driven: has joined #RubyOnRails
[18:53:26] kapil___: has joined #RubyOnRails
[18:55:25] za1b1tsu: has joined #RubyOnRails
[19:03:45] jackhum: has joined #RubyOnRails
[19:06:20] Inside: Radar: \o
[19:10:45] andywww: has joined #RubyOnRails
[19:14:46] SteenJobs: has joined #RubyOnRails
[19:16:59] desperek: has joined #RubyOnRails
[19:18:49] desperek: what's the best approach of making an gdpr acceptance?
[19:18:55] desperek: like new priv. policy?
[19:25:00] sandstrom: has joined #RubyOnRails
[19:31:25] dionysus69: has joined #RubyOnRails
[19:36:53] agent_white: has joined #RubyOnRails
[19:39:26] jackhum: has joined #RubyOnRails
[19:39:53] Inside: Does that affect 100% US based companies?
[19:53:18] Ryanar: has joined #RubyOnRails
[19:56:42] tycoon177: Inside: not if you don't have any EU customers afaik
[19:56:54] tycoon177: but you should still probably be compliant just in case
[20:00:42] jottr: has joined #RubyOnRails
[20:03:46] za1b1tsu: has joined #RubyOnRails
[20:14:36] spohnz: anyone have a minute to read a stupid question my this stupid man? I may be complicating this too much
[20:15:23] dminuoso: desperek: GDPR is *MORE* than just a text you write up.
[20:15:46] desperek: dminuoso, uh i solved it already
[20:15:56] spohnz: I have an index page that shows a mgmt_servers table one of the fields in this table is an int domain_id plucked from another table.
[20:15:58] desperek: i was just asking how do i make a thing, technically
[20:16:35] spohnz: Not they want the name of the domain and not the ID listed on index
[20:16:48] spohnz: how do I associate the name in place of the number
[20:18:18] dminuoso: spohnz: what
[20:19:24] spohnz: right... if I only knew how to ask this question
[20:19:54] desperek: spohnz, join?
[20:20:09] conr: has joined #RubyOnRails
[20:20:23] spohnz: I am afraid I dont know how
[20:20:47] spohnz: ill google join relations in rails
[20:21:38] conr: Found a Rails 4.2.5.1 project on GitHub that is not active. What's the best way to get the gems upgraded to the latest versions?
[20:21:43] dminuoso: spohnz: No please just ask your question properly.
[20:21:54] dminuoso: spohnz: There's absolutely no chance anyone could make any sense of anything you just said.
[20:22:31] dminuoso: conr: Open an issue. If its not active.. well - maybe fork it and carry the torch?
[20:22:45] spohnz: ok. I have a table called mgmt_servers. It lists an id that is from another table
[20:23:04] conr: Yeah, I need to carry the torch. Is there any best practices for upgrading gems?
[20:23:07] dminuoso: spohnz: can you use a gist to show your code from a) your controller, b) the related model and c) the view
[20:23:09] spohnz: I need to pull the name of each id in my index page in place of the id
[20:23:14] dminuoso: conr: does it have a test suite?
[20:23:19] Terens: has joined #RubyOnRails
[20:23:56] conr: dminuoso: development instance?
[20:24:03] dminuoso: conr: No a test suite.
[20:24:39] conr: dminuoso: I don't know.
[20:24:50] dminuoso: conr: well. look at it perhaps?
[20:25:30] conr: dminuoso: Like `group :development, :test do`
[20:25:49] Terens: their is an existing authorization class and all permissions (400 rows) are loaded at every request. Sure they aren't all needed and I wouldnt develop the system like that , however instead of loading what is needed developer suggested to keep globally loaded these data. Is this a bad idea?
[20:26:35] dminuoso: conr: No like a folder containing tests.
[20:27:18] dminuoso: terens: What server model do you have? multi server? multi process? multi thread?
[20:27:40] spohnz: https://gist.github.com/dallasspohn/69a721cea00f8b95116c719e0c0a5d1a
[20:27:49] spohnz: hope that is useful
[20:28:00] conr: dminuoso: Nope. https://github.com/TechLadies/home-web
[20:29:00] dminuoso: conr: https://github.com/TechLadies/home-web/tree/master/spec
[20:30:00] dminuoso: conr: It appears to have good to high coverage. I would first try to upgrade rails, see if the test suite passes. If not, fix it.
[20:30:05] dminuoso: And then successively upgrade gems.
[20:31:26] conr: dminuoso: Beautiful. How to do I run the unit tests after upgrading Rails?
[20:31:39] dminuoso: spohnz: what form builder are you using?
[20:33:33] weaksauce: has joined #RubyOnRails
[20:33:38] conr: dminuoso: simple_form?
[20:34:19] psychoslave: has joined #RubyOnRails
[20:34:49] dminuoso: terens: caching is not a bad idea, but you need a way to invalidate caches. and cache invalidation is hard.
[20:36:46] andywww: has joined #RubyOnRails
[20:37:26] spohnz: dminuoso: I don't know, do not see a gem for forms. I am just doing a <% @mgmt_servers.each do |mgmt_server| %> to loop through them
[20:39:05] Terens: dminuoso, multi process now
[20:39:32] Terens: This isn't exactly caching. And I believe 400 selects at least for every calls is too much IMO
[20:39:58] dminuoso: That sounds like two unrelated issues.
[20:40:14] dminuoso: If you are doing 400 *selects* to fetch 400 rows, you have an (N+1) bug.
[20:40:25] Terens: no 1 select that fetches 400 rows
[20:40:39] Terens: but we merely need 1
[20:40:42] dminuoso: terens: Is it a performance issue?
[20:41:02] Terens: it adds +30-50ms every request
[20:42:38] jottr: has joined #RubyOnRails
[20:42:47] Ericx2x: has joined #RubyOnRails
[20:43:12] dminuoso: Fetching 400 rows takes 50ms?
[20:43:23] dminuoso: What god awful query or database is this
[20:45:44] Terens: no database query doesnt take much but loading models etc does take that time
[20:48:47] Jon30: has joined #RubyOnRails
[20:51:46] conr: dminuoso: Should upgrade Rails to 5.0.0 with dependencies or without?
[20:54:16] jottr: has joined #RubyOnRails
[20:57:57] uks: has joined #RubyOnRails
[20:58:55] blackmesa: has joined #RubyOnRails
[21:00:06] jottr: has joined #RubyOnRails
[21:01:52] spohnz: https://gist.github.com/dallasspohn/69a721cea00f8b95116c719e0c0a5d1a
[21:03:06] spohnz: I added the models, new, controller pages
[21:09:03] Xiti: has joined #RubyOnRails
[21:11:12] Xiti: has joined #RubyOnRails
[21:11:40] bonhoeffer: has joined #RubyOnRails
[21:13:37] uks: has joined #RubyOnRails
[21:17:58] Xiti: has joined #RubyOnRails
[21:22:56] darkhanb: has joined #RubyOnRails
[21:24:24] dviola: has joined #RubyOnRails
[21:25:41] segy: has joined #RubyOnRails
[21:31:02] ur5us: has joined #RubyOnRails
[21:36:47] [Butch]: has joined #RubyOnRails
[21:41:48] Ryanar: has joined #RubyOnRails
[21:51:38] Ericx2x: has joined #RubyOnRails
[21:53:09] SteenJobs: has joined #RubyOnRails
[22:02:47] apeiros_: has joined #RubyOnRails
[22:03:48] agent_white: has joined #RubyOnRails
[22:03:50] SteenJobs: has joined #RubyOnRails
[22:05:28] conr: has left #RubyOnRails: ()
[22:08:31] fourcolors: has joined #RubyOnRails
[22:09:23] fourcolors: Hey, I'm having an issue setting window.ENV to Rails.env when I try to do that in my layout file I get an error that says "Rails is not defined" My layout file is in slim
[22:09:36] fourcolors: It's a pretty simple one liner
[22:09:48] fourcolors: `javascript: window.ENV = Rails.env`
[22:09:58] fourcolors: I'm not sure why this would cause the error. Any ideas?
[22:12:23] fourcolors: oh I figured it out that was simple
[22:12:30] fourcolors: it needed to be "#{Rails.env}"
[22:17:29] Radar: Inside: good morning
[22:21:37] dviola: good night
[22:23:47] Radar: spohnz: hi
[22:24:11] Radar: I guess on this line: <td><%= mgmt_server.domain_id %></td> is where you want to show the domain name?
[22:24:45] Radar: spohnz: Also I should mention that gist lets you add multiple files to the same gist in a neater way than what you've done: https://github.com/radar/guides/blob/master/using-gist.markdown
[22:28:45] Radar: spohnz: if that's the case, then mgmt_server.domain.name will let you fetch the name through an association
[22:28:54] Radar: assuming that you have belongs_to :domain defined on the server class.
[22:40:37] weaksauce: has joined #RubyOnRails
[23:17:50] wethu: has joined #RubyOnRails
[23:25:54] mjolnird: has joined #RubyOnRails
[23:29:11] spohnz: Radar: Thank you
[23:29:47] Ericx2x: has joined #RubyOnRails