« Back to channel list

#RubyOnRails - 17 November 2017

« Back 1 day Forward 1 day »
[00:15:23] conta2: has joined #RubyOnRails
[00:23:35] ornerymoose: has joined #RubyOnRails
[00:32:42] quazimodo: has joined #RubyOnRails
[00:34:12] fragamus: has joined #RubyOnRails
[00:46:04] lupine: has joined #RubyOnRails
[00:46:37] wethu: has joined #RubyOnRails
[00:59:06] uks: has joined #RubyOnRails
[01:26:53] orbyt_: has joined #RubyOnRails
[01:43:02] easzero: has joined #RubyOnRails
[01:49:47] blindMoe: has joined #RubyOnRails
[01:49:56] blindMoe: Is it possible to set a model as invalid w/o using a validator?
[01:50:28] workmad3: has joined #RubyOnRails
[01:56:03] fragamus: has joined #RubyOnRails
[02:01:33] guacamole: has joined #RubyOnRails
[02:17:47] Jameser: has joined #RubyOnRails
[02:24:14] drowze: has joined #RubyOnRails
[02:29:24] orbyt_: has joined #RubyOnRails
[02:31:26] cagomez: has joined #RubyOnRails
[02:38:09] xpl0iter: has joined #RubyOnRails
[02:40:14] podlech: has joined #RubyOnRails
[02:40:29] irishfromua: has joined #RubyOnRails
[03:05:36] cagomez: has joined #RubyOnRails
[03:10:18] sevenseacat: has joined #RubyOnRails
[03:17:53] roshanavand: has joined #RubyOnRails
[03:40:13] srinidhi: has joined #RubyOnRails
[04:03:58] cagomez: has joined #RubyOnRails
[04:13:10] Saukk: has joined #RubyOnRails
[04:18:02] dviola: has joined #RubyOnRails
[04:20:09] easzero: has joined #RubyOnRails
[04:46:40] Technodrome: has joined #RubyOnRails
[05:01:00] cagomez: has joined #RubyOnRails
[05:28:38] iamarun: has joined #RubyOnRails
[05:50:54] workmad3: has joined #RubyOnRails
[05:53:33] dionysus69: has joined #RubyOnRails
[06:05:34] apeiros: has joined #RubyOnRails
[06:11:06] Puffball: has joined #RubyOnRails
[06:15:44] armyriad: has joined #RubyOnRails
[06:27:39] kies: has joined #RubyOnRails
[06:30:37] MrCrackPotBuilde: has joined #RubyOnRails
[06:36:16] memo1: has joined #RubyOnRails
[06:37:00] fragamus: has joined #RubyOnRails
[06:56:32] dionysus69: has joined #RubyOnRails
[06:57:22] ornerymoose: has joined #RubyOnRails
[06:57:40] guacamole: has joined #RubyOnRails
[07:03:39] someish: has joined #RubyOnRails
[07:04:51] apeiros: has joined #RubyOnRails
[07:05:56] iamarun: has joined #RubyOnRails
[07:51:16] workmad3: has joined #RubyOnRails
[07:52:24] _ritchie_: has joined #RubyOnRails
[08:21:38] _ritchie_: has joined #RubyOnRails
[08:42:19] conta: has joined #RubyOnRails
[08:52:57] marr: has joined #RubyOnRails
[08:53:10] mikecmpbll: has joined #RubyOnRails
[08:59:20] Doldge: has joined #RubyOnRails
[09:08:15] iamarun: has joined #RubyOnRails
[09:13:50] walidvb: has joined #RubyOnRails
[09:14:35] jottr: has joined #RubyOnRails
[09:14:51] walidvb: hey, i'm trying to switch to using X-SMTPAPI generally, but i'm having issues testing it. Mainly, all my old tests consider each mail is sent once for each user.
[09:17:10] walidvb: rspec's expect(mail).to have_header('X-SMTPAPI', 'somevalue'), but the header returned seems to have a broken key (smth like /[!-9;-~]+/=>MY_X_SMTPAPI_VALUE)
[09:26:22] defsdoor: has joined #RubyOnRails
[09:29:34] defsdoor: has joined #RubyOnRails
[09:38:56] hammer065: has joined #RubyOnRails
[09:49:52] cagomez: has joined #RubyOnRails
[09:51:34] workmad3: has joined #RubyOnRails
[09:52:38] deur-: has joined #RubyOnRails
[09:58:11] dminuoso: activesupport-5.1.4/lib/active_support/callbacks.rb:93:in `ActiveSupport::Callbacks#run_callbacks' (4486 samples - 99.78%)
[09:58:13] dminuoso: Lovely stuff.
[10:00:29] dminuoso: ActionView is slow :(
[10:00:50] dminuoso: Apparently it's not good to render 20,000 partials..
[10:07:43] DrYockel: has joined #RubyOnRails
[10:07:51] tanuki: has joined #RubyOnRails
[10:09:19] tbuehlmann: who would've guessed
[10:09:45] marahin: Could anyone recommend some kind of an article that mentions couple of ways to structurize your Rails REST API? This will be api-only project (from a generic Rails one, so it has to get some parts stripped), but I'm wondering how to approach the project tree, namespacing, inheritance etc.
[10:10:02] marahin: I've read some articles related to Swagger but they aren't precise on those particular matters
[10:12:11] dminuoso: tbuehlmann: Honestly, with ReactJS it's blazing fast.
[10:12:24] dminuoso: Even reducing this to about 1000 render invocations costs me about 1s
[10:12:43] dminuoso: Roughly a factor of 200-1000x
[10:12:51] dminuoso: It's crazy slow
[10:21:37] rgr: has joined #RubyOnRails
[10:26:12] snickers: has joined #RubyOnRails
[10:46:47] gregf_: has joined #RubyOnRails
[10:52:09] ferr: has joined #RubyOnRails
[10:52:17] arBmind: has joined #RubyOnRails
[10:52:29] _ritchie_: has joined #RubyOnRails
[10:54:02] ferr: has left #RubyOnRails: ()
[11:01:39] alexday: has left #RubyOnRails: ("WeeChat 1.8")
[11:25:13] apeiros: semi-OT: does anybody happen to know whether google boosts mybusiness entries which feature a street view tour?
[11:25:30] MrCrackPotBuilde: has joined #RubyOnRails
[11:25:52] MrCrackPotBuilde: WWhich bootstrap gem are we supposed to use with rails 5
[11:26:04] MrCrackPotBuilde: ive been searching online but found 4 different ones
[11:26:29] MrCrackPotBuilde: gem 'bootstrap', '~> 4.0.0.beta2.1'
[11:26:41] MrCrackPotBuilde: using that one right now but doesnt want to work properly
[11:26:58] _ritchie_: has joined #RubyOnRails
[11:27:21] MrCrackPotBuilde: i have a button class that has three links but when you click the button nothing happens and i assumes the button was only supposed to be there when its too small
[11:35:13] mostlybadfly: has joined #RubyOnRails
[11:51:52] workmad3: has joined #RubyOnRails
[11:54:10] defsdoor: has joined #RubyOnRails
[11:55:07] Jameser: has joined #RubyOnRails
[11:55:37] roshanavand: has joined #RubyOnRails
[11:57:22] marahin: What is the way-to-go to handle JSON:API compliant auth for Devise resources? Can anyone suggest something?
[11:57:51] marahin: https://github.com/lynndylanhurley/devise_token_auth - I've checked this but they don't really focus on json:api RN, and I'm uncertain when it comes to overriding libraries regarding security. :D
[12:18:42] DTZUZO: has joined #RubyOnRails
[12:21:15] andrecavallari: has joined #RubyOnRails
[12:25:23] someish: has joined #RubyOnRails
[12:32:47] Jameser: has joined #RubyOnRails
[12:37:46] uks: has joined #RubyOnRails
[12:38:43] fragamus: has joined #RubyOnRails
[12:40:06] rgr_: has joined #RubyOnRails
[12:42:16] AntiSpamMeta: has joined #RubyOnRails
[12:58:11] tcopeland: has joined #RubyOnRails
[13:08:51] DrYockel: has joined #RubyOnRails
[13:14:57] fragamus: has joined #RubyOnRails
[13:15:40] apeiros: has joined #RubyOnRails
[13:19:50] Aherin: has joined #RubyOnRails
[13:33:16] senayar: has joined #RubyOnRails
[13:35:52] keegnotrub: has joined #RubyOnRails
[13:38:21] Kutakizukari: has joined #RubyOnRails
[13:42:26] fragamus: has joined #RubyOnRails
[13:58:42] tcopeland: has joined #RubyOnRails
[14:02:53] DrYockel: has joined #RubyOnRails
[14:17:05] roshanavand: has joined #RubyOnRails
[14:22:17] TViernion: has joined #RubyOnRails
[14:26:02] gauravgoyal: has joined #RubyOnRails
[14:37:06] safetypin: has joined #RubyOnRails
[14:40:09] ornerymoose: has joined #RubyOnRails
[14:45:44] fragamus: has joined #RubyOnRails
[14:47:11] ornerymoose: has joined #RubyOnRails
[14:51:53] jottr: has joined #RubyOnRails
[14:52:33] troys: has joined #RubyOnRails
[14:53:29] Jameser: has joined #RubyOnRails
[14:55:32] dviola: has joined #RubyOnRails
[14:56:57] ahrs: has joined #RubyOnRails
[15:22:25] safetypin: has joined #RubyOnRails
[15:33:32] memo1: has joined #RubyOnRails
[15:45:29] clair13: has joined #RubyOnRails
[15:48:55] Technodrome: has joined #RubyOnRails
[15:49:46] dminuoso: MrCrackPotBuilde: !rule3
[15:49:46] helpa: MrCrackPotBuilde: Clearly explain what is happening and create a Gist (http://gist.github.com), (formatted neatly please: http://bit.ly/1q75oia) of the code that is causing the problem you are encountering, as well as any useful output like stacktraces.
[15:50:09] drowze: has joined #RubyOnRails
[15:52:31] workmad3: has joined #RubyOnRails
[15:57:09] apeiros_: has joined #RubyOnRails
[15:59:09] MrCrackPotBuilde: dminuoso i think its im using bootstrap3 code with bootstrap 4
[15:59:57] MrCrackPotBuilde: https://pastebin.com/TecHSPMN
[16:00:20] migeorge: has joined #RubyOnRails
[16:00:47] MrCrackPotBuilde: and very basic css
[16:00:49] MrCrackPotBuilde: https://pastebin.com/QDmDuJ0h
[16:01:41] migeorge: Does anyone know if there is a way to specify the connection object to use for an action cable channel?
[16:01:55] dminuoso: MrCrackPotBuilde: Please include your application.js
[16:02:10] dminuoso: MrCrackPotBuilde: !gist
[16:02:10] helpa: MrCrackPotBuilde: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[16:02:35] dminuoso: Use multiple files in a single gist, and give them meaningful file extensions so that syntax highlighting is enabled.
[16:04:08] clair13: hello how can i not display that part below benefit but the of the checked boxes that i have checked in edit page on ActiveAdmin?
[16:04:15] clair13: here is the gist
[16:04:30] clair13: https://gist.github.com/clair13/cce8d1168743a9cf6a859263390e70e5
[16:04:39] MrCrackPotBuilde: gah im not reg in github only bitbucket
[16:04:47] dminuoso: MrCrackPotBuilde: You do not need to be registered.
[16:04:58] dminuoso: MrCrackPotBuilde: You can post gists anonymously. You just cant edit them unless you are registered.
[16:05:10] dminuoso: (But you can still delete your gists too)
[16:05:11] MrCrackPotBuilde: haha ok give me two seconds
[16:06:35] clair13: i have tried if f.object.new_record?
[16:07:01] clair13: but then i can't type if i want to add a new one
[16:08:15] apparition: has joined #RubyOnRails
[16:08:25] guacamole: has joined #RubyOnRails
[16:09:00] MrCrackPotBuilde: https://gist.github.com/scope2229/175e172c54b6e94f9f30d21b6228ff39
[16:09:04] MrCrackPotBuilde: turns out i was reg
[16:10:38] MrCrackPotBuilde: with that there basically even full screen the button is visible and all links hidden but the logo you can see
[16:11:13] MrCrackPotBuilde: im pretty sure its compatibility issue with me being a noob
[16:13:31] ornerymoose: has joined #RubyOnRails
[16:13:40] fragamus: has joined #RubyOnRails
[16:14:01] iamdevnul: so weird question, is there a way to write a change_table block that will add foreign keys to multiple columns in a table? trying to be able to do this all in one alter table statement
[16:14:08] iamdevnul: instead of several add_foreign_key statements
[16:16:19] SteenJobs: has joined #RubyOnRails
[16:22:24] snickers: has joined #RubyOnRails
[16:23:38] urk187: has joined #RubyOnRails
[16:25:05] LBRapid: has joined #RubyOnRails
[16:30:19] LBRapid: has joined #RubyOnRails
[16:31:58] LBRapid: has joined #RubyOnRails
[16:33:16] LBRapid: has joined #RubyOnRails
[16:34:24] LBRapid: has joined #RubyOnRails
[16:36:35] cagomez: has joined #RubyOnRails
[16:37:23] clair13: has joined #RubyOnRails
[16:38:14] cagomez: has joined #RubyOnRails
[16:39:59] kapil___: has joined #RubyOnRails
[16:41:58] LBRapid: has joined #RubyOnRails
[16:59:51] dblessing: has joined #RubyOnRails
[17:00:12] one_zero: has joined #RubyOnRails
[17:00:59] LBRapid: has joined #RubyOnRails
[17:01:37] mcr1: has joined #RubyOnRails
[17:03:26] dgsan: has joined #RubyOnRails
[17:06:45] Exhiled: has joined #RubyOnRails
[17:07:39] brycesenz: has joined #RubyOnRails
[17:10:10] Dimik: has joined #RubyOnRails
[17:11:34] Papierkorb: has left #RubyOnRails: ("Konversation terminated!")
[17:12:08] dionysus69: has joined #RubyOnRails
[17:12:22] cagomez: is there a pattern to run a method if a certain attribute is updated? or should I just check after .update_all in the controller?
[17:19:48] NoGodDamnIdea: has joined #RubyOnRails
[17:28:14] Papierkorb: has joined #RubyOnRails
[17:29:06] jtperreault: cagomez: attribute_changed? is prob what you're after
[17:30:05] cagomez: jtperreault: I'm using update_all, would attribute_changed? even detect changes? if I understand correctly, update_all doesn't invoke the model/callbacks/etc
[17:30:25] jtperreault: cagomez: ahh, no it would not then
[17:32:32] orbyt_: has joined #RubyOnRails
[17:34:55] Technodrome: has joined #RubyOnRails
[17:40:09] one_zero: has joined #RubyOnRails
[17:47:47] tcopeland: iamdevnul: it’s not elegant, but I’ve seen that done by falling back to using a single SQL statement: execute “alter table foobars add foreign key (account_id) references accounts(id), add foreign key (owner_id) references owners(id)”
[17:48:33] someish: has joined #RubyOnRails
[17:52:54] workmad3: has joined #RubyOnRails
[17:53:31] ivanskie: has joined #RubyOnRails
[17:54:26] iamdevnul: tcopeland: that's what i was trying to avoid
[17:54:35] iamdevnul: but thanks, i think that's the way i have to go
[17:55:32] iamdevnul: it's a large table and i'm trying to avoid rebuilding the table 3X
[17:57:14] tcopeland: yeah I hear you
[17:57:32] iamdevnul: thanks for the suggestion
[17:57:38] iamdevnul: i think that's the way i'm going to go
[18:10:01] the_f0ster: has joined #RubyOnRails
[18:10:22] the_f0ster: does anyone know a way I can profile DB pooling usage / info to optimize it?
[18:21:41] Exhiled: has joined #RubyOnRails
[18:22:00] Papierkorb: has left #RubyOnRails: ("Konversation terminated!")
[18:22:25] guacamole: has joined #RubyOnRails
[18:23:33] dminuoso: the_f0ster: Are you using AR pooling?
[18:23:49] the_f0ster: dminuoso: yes I am
[18:24:19] cagomez: has joined #RubyOnRails
[18:24:26] fryguy: the_f0ster: what webserver are you using?
[18:24:48] srinidhi: has joined #RubyOnRails
[18:25:14] kies: has joined #RubyOnRails
[18:26:04] the_f0ster: fryguy: unicorn
[18:26:26] fryguy: the_f0ster: then you aren't using anything in the AR pool
[18:26:27] cabotto: has joined #RubyOnRails
[18:27:01] fryguy: well, you are using 1 connection from the pool
[18:27:55] noob_on_rails: has joined #RubyOnRails
[18:27:58] the_f0ster: we are using makara as our db driver and it uses active record connection pooling underneath as far as I can tell
[18:28:22] dminuoso: the_f0ster: So, since you have not mentioned that bit..
[18:28:24] the_f0ster: how does unicorn affect this ?
[18:28:37] dminuoso: the_f0ster: Tell us about your setup. Anything other "non-standard" we should know about?
[18:28:39] fryguy: unicorn is single-threaded
[18:30:04] the_f0ster: we are using foreman -> unicorn which specifies worker_processes 7 .. so this is only 7 workers per thread ?
[18:30:43] tcopeland: has joined #RubyOnRails
[18:32:14] the_f0ster: my apologies I did not architect this codebase
[18:32:29] the_f0ster: cleaning up at a start up
[18:32:54] noob_on_rails: hey all , if i have a case where the user does some transactions which could be buy / sell of some items and these items stay in some kind of stock and get added/removed accordingly
[18:33:06] noob_on_rails: how would you model these associations?
[18:33:35] noob_on_rails: should i have 2 types of transactions , or transaction with a flag(type) field
[18:40:20] fryguy: the_f0ster: that's processes, not threads, each process has it's own connection pool, and they can't be shared with each other
[18:40:42] kickr: has joined #RubyOnRails
[18:40:48] the_f0ster: fryguy: thank you for explaining, that makes sense
[18:41:00] the_f0ster: unicorn has really shitty documentation and web presence lol
[18:43:12] the_f0ster: fryguy: so each worker has it's own process, and the db connection is pooling internally with threads on each process right ?
[18:48:36] lunarkitty7: has joined #RubyOnRails
[18:52:16] noob_on_rails: any ideas ? :D
[18:54:12] conta1: has joined #RubyOnRails
[18:54:51] guacamole: has joined #RubyOnRails
[19:00:00] cagomez: has joined #RubyOnRails
[19:00:43] Exhiled: has joined #RubyOnRails
[19:02:05] noob_on_rails: has joined #RubyOnRails
[19:06:54] guacamole: has joined #RubyOnRails
[19:07:09] truenito: has joined #RubyOnRails
[19:08:15] jottr: has joined #RubyOnRails
[19:09:52] mikecmpbll: has joined #RubyOnRails
[19:19:04] ivanskie_work: has joined #RubyOnRails
[19:22:14] guacamole: has joined #RubyOnRails
[19:24:36] ivanskie: has joined #RubyOnRails
[19:31:53] snickers: has joined #RubyOnRails
[19:37:25] keegnotrub_: has joined #RubyOnRails
[19:42:46] LBRapid: has joined #RubyOnRails
[19:47:27] jottr: has joined #RubyOnRails
[19:50:35] ShalokShalom: has joined #RubyOnRails
[19:51:30] mtkd: has joined #RubyOnRails
[19:53:08] workmad3: has joined #RubyOnRails
[19:58:14] arBmind: has joined #RubyOnRails
[20:06:07] mtkd: has joined #RubyOnRails
[20:08:02] jottr_: has joined #RubyOnRails
[20:19:25] workmad3: has joined #RubyOnRails
[20:26:17] Exhiled: has joined #RubyOnRails
[20:32:11] ur5us: has joined #RubyOnRails
[20:37:19] workmad3: has joined #RubyOnRails
[20:38:31] uksio: has joined #RubyOnRails
[20:56:26] beingjohnm: anybody having issues with workers/database connections with Heroku right now?
[20:59:37] michael_mbp: has joined #RubyOnRails
[21:04:22] brycesenz: has joined #RubyOnRails
[21:05:44] jottr: has joined #RubyOnRails
[21:10:35] Kutakizukari: has joined #RubyOnRails
[21:15:56] Papierkorb: has joined #RubyOnRails
[21:18:58] ornerymoose: has joined #RubyOnRails
[21:31:25] cagomez: has joined #RubyOnRails
[21:36:56] the_f0ster: so If I am using unicorn and MRI, does my database connection actually pool
[21:38:29] jottr_: has joined #RubyOnRails
[21:38:55] the_f0ster: got it, because of the GIL in MRI fryguy?
[21:40:54] fryguy: because of the lack of threads in unicorn
[21:41:10] fryguy: (and, to some lesser extent, the GIL)
[21:43:31] the_f0ster: fryguy: sorry I am reading through documentation to udnerstand how unicorn works, so underlying code that uses threads is not possible with unicorn?
[21:45:40] fryguy: it is possible
[21:49:42] dminuoso: the_f0ster: It's realistically not an issue.
[21:49:52] the_f0ster: dminuoso: why is that ?
[21:49:59] dminuoso: the_f0ster: the GVL basically only blocks multiple threads from executing ruby code.
[21:50:16] dminuoso: the_f0ster: blocking IO (as any syscall) releases the GVL
[21:50:32] dminuoso: (This is a somewhat simplified explanation, but its close enough)
[21:53:49] the_f0ster: my app response times went through the roof when teh db went down, so I'm going to lower the timeout to prevent it, but if pooling isnt really happening in parallel then it is not that useful
[21:59:02] jottr: has joined #RubyOnRails
[22:09:18] dminuoso: the_f0ster: pooling does.
[22:09:42] dminuoso: the_f0ster: If its blocing IO, it will run in parallel.
[22:12:55] guacamole: has joined #RubyOnRails
[22:21:57] apeiros: has joined #RubyOnRails
[22:23:06] orbyt_: has joined #RubyOnRails
[22:25:51] ornerymoose: has joined #RubyOnRails
[22:37:11] fragamus: has joined #RubyOnRails
[22:39:52] rfoust: has joined #RubyOnRails
[22:41:21] apeiros: has joined #RubyOnRails
[22:44:32] Exhiled: has joined #RubyOnRails
[22:47:27] wdperson: has joined #RubyOnRails
[22:55:24] apeiros: has joined #RubyOnRails
[22:58:12] Exhiled: has joined #RubyOnRails
[23:18:48] uks: has joined #RubyOnRails
[23:22:41] NoGodDamnIdea: has joined #RubyOnRails
[23:24:41] Iarfen: has joined #RubyOnRails
[23:24:49] Iarfen: I can't install rails on windows, I get an error
[23:24:52] apeiros: has joined #RubyOnRails
[23:24:55] Iarfen: what's the easier way?
[23:30:00] uksio: has joined #RubyOnRails
[23:34:50] brycesenz: has joined #RubyOnRails
[23:35:15] tcopeland: has joined #RubyOnRails
[23:37:01] apeiros: has joined #RubyOnRails
[23:40:04] fragamus: has joined #RubyOnRails
[23:44:09] ali_g: has joined #RubyOnRails
[23:47:20] Technodrome: has joined #RubyOnRails
[23:51:25] Puffball: has joined #RubyOnRails
[23:53:00] the_f0ster: Iarfen: idk, run in docker ?
[23:53:28] Iarfen: mmmm, I don't use docker yet
[23:54:08] the_f0ster: perhapsa. good time to start then https://blog.codeship.com/running-rails-development-environment-docker/