« Back to channel list

#RubyOnRails - 03 March 2018

« Back 1 day Forward 1 day »
[00:01:23] cagomez: has joined #RubyOnRails
[00:04:45] gambl0re: has joined #RubyOnRails
[00:17:15] cstls: has joined #RubyOnRails
[00:42:48] hahuang61: has joined #RubyOnRails
[00:43:55] hahuang65: has joined #RubyOnRails
[00:45:33] workmad3: has joined #RubyOnRails
[00:50:39] durango: has joined #RubyOnRails
[01:01:32] Vashy: has joined #RubyOnRails
[01:09:01] orbyt_: has joined #RubyOnRails
[01:13:30] cagomez: has joined #RubyOnRails
[01:15:07] Puffball: has joined #RubyOnRails
[01:23:30] DTZUZO: has joined #RubyOnRails
[01:23:44] hahuang65: has joined #RubyOnRails
[01:34:21] twilling: has joined #RubyOnRails
[01:36:44] cstls: has joined #RubyOnRails
[01:37:12] hahuang65: has joined #RubyOnRails
[01:42:04] hahuang65: has joined #RubyOnRails
[01:42:34] apparition: has joined #RubyOnRails
[01:43:37] hahuang65: has joined #RubyOnRails
[01:49:02] GodFather: has joined #RubyOnRails
[01:51:22] Alchemical: has joined #RubyOnRails
[02:33:10] Alchemical: has joined #RubyOnRails
[02:42:39] garyserj: has joined #RubyOnRails
[02:43:27] garyserj: Why is it that even though my controllers are e.g. Class AbcController routes.rb refers to e.g. abc/.. So it refers to them with lowercase abc. why?
[02:46:12] workmad3: has joined #RubyOnRails
[02:49:33] darkhanb: has joined #RubyOnRails
[03:35:34] fryguy: has joined #RubyOnRails
[03:36:20] hahuang61: has joined #RubyOnRails
[03:36:46] orbyt_: has joined #RubyOnRails
[03:40:18] desnudopenguino: anyone have any good suggestions for code testing? I'm trying to work towards BDD, but have to set up tests for my already existing code first. I have some models covered with rspec, but was looking at using cucumber for integration tests, but i've found it a bit of a pain with session and cookie data
[03:47:38] cagomez: has joined #RubyOnRails
[04:11:48] kies: has joined #RubyOnRails
[04:15:37] Alchemical: has joined #RubyOnRails
[04:23:22] lunarkitty7: has joined #RubyOnRails
[04:24:22] DTZUZO: has joined #RubyOnRails
[04:25:14] trautwein: has joined #RubyOnRails
[04:26:41] Alchemical: has joined #RubyOnRails
[04:32:46] desnudopenguino: fryguy: do you have a suggested web driver to run with it?
[04:38:23] hahuang61: has joined #RubyOnRails
[04:58:56] LambdaSource: has joined #RubyOnRails
[05:12:25] desnudopenguino: fryguy: thanks!
[05:15:59] hahuang61: has joined #RubyOnRails
[05:52:28] Yzguy: has joined #RubyOnRails
[05:55:04] Saukk: has joined #RubyOnRails
[06:07:47] DTZUZO: has joined #RubyOnRails
[06:16:23] schneider: has joined #RubyOnRails
[06:27:06] _aeris_: has joined #RubyOnRails
[06:42:07] hahuang61: has joined #RubyOnRails
[06:47:39] workmad3: has joined #RubyOnRails
[07:33:55] conta: has joined #RubyOnRails
[07:37:37] hahuang61: has joined #RubyOnRails
[07:41:48] srinidhi: has joined #RubyOnRails
[07:53:55] Dimik: has joined #RubyOnRails
[07:55:01] bijan_: has joined #RubyOnRails
[08:00:52] shpoont: has joined #RubyOnRails
[08:04:53] mtkd: has joined #RubyOnRails
[08:20:18] bijan_: has joined #RubyOnRails
[08:31:38] schneider: has joined #RubyOnRails
[08:33:51] moei: has joined #RubyOnRails
[08:37:17] hahuang61: has joined #RubyOnRails
[08:57:10] srinidhi: has joined #RubyOnRails
[09:08:26] marr: has joined #RubyOnRails
[09:10:38] hahuang61: has joined #RubyOnRails
[09:14:27] shpoont: has joined #RubyOnRails
[09:22:25] Fusselgesicht: has joined #RubyOnRails
[09:24:32] Fusselgesicht: has joined #RubyOnRails
[09:25:43] sidx64: has joined #RubyOnRails
[09:30:20] sidx64_: has joined #RubyOnRails
[09:31:43] Ergo: has joined #RubyOnRails
[09:42:59] sidx64: has joined #RubyOnRails
[09:51:19] shpoont: has joined #RubyOnRails
[09:56:34] Prutheus: has joined #RubyOnRails
[09:58:07] Prutheus: Hello. I am on rails with mysql. I have some queries with a lot of data, very massive. But these queries do not get executed, or better: they get rolledback (Mysql2::Error: MySQL server has gone away)
[09:58:10] Prutheus: how to fix that?
[10:05:18] GodFather: has joined #RubyOnRails
[10:05:54] TvL2386: prutheus: seems like a timeout somewhere
[10:06:08] Prutheus: how to fix?
[10:07:04] TvL2386: depends on where it is happening
[10:07:22] TvL2386: are rails and mysql on the same server?
[10:10:24] TvL2386: I don't know to be honest... maybe the mysql logs show something interesting
[10:10:43] TvL2386: maybe execute the query in a mysql client outside of rails to see if it gives you something interesting
[10:10:56] Prutheus: hmmm holy thisis really not good :/
[10:11:48] Prutheus: any idea what i can do to fix that? no?
[10:12:13] TvL2386: you're diagnosing, not fixing
[10:13:08] TvL2386: to me it seems that if mysql goes away in the middle of a query, mysql has a problem
[10:13:18] Prutheus: okay i will check the logs
[10:13:39] Prutheus: the problem is that happens only at too big queries
[10:14:09] Prutheus: over 200000 characters
[10:14:37] TvL2386: so you have a query that has more than 200k chars?
[10:14:48] TvL2386: are you batch inserting?
[10:15:35] Prutheus: a lot of data, storing text files which are getting uploaded with a lot of data
[10:15:42] Prutheus: what is batch inserting?
[10:15:42] TvL2386: maybe you are exceeding max_allowed_packet
[10:15:55] Prutheus: how to find out max_allowed_packet?
[10:15:59] TvL2386: with batch inserting I mean insert more than 1 record at a time :)
[10:16:19] TvL2386: so you are storing files in mysql?
[10:17:41] TvL2386: SHOW VARIABLES LIKE 'max_allowed_packet';
[10:17:53] TvL2386: https://stackoverflow.com/questions/5688403/how-to-check-and-set-max-allowed-packet-mysql-variable
[10:18:51] TvL2386: but I'd check the mysql logs first
[10:19:05] TvL2386: and `dmesg`
[10:21:23] jlpeters: has joined #RubyOnRails
[10:22:08] Mutsuhito: has joined #RubyOnRails
[10:22:24] Prutheus: it worked now after setting max size new
[10:31:22] quazimodo: has joined #RubyOnRails
[10:36:55] Sirecote: has joined #RubyOnRails
[10:38:42] mtkd: has joined #RubyOnRails
[10:39:01] hahuang61: has joined #RubyOnRails
[10:39:51] dyyylan: has joined #RubyOnRails
[10:40:21] roshanavand: has joined #RubyOnRails
[10:42:13] defsdoor: has joined #RubyOnRails
[10:49:03] workmad3: has joined #RubyOnRails
[10:52:40] srinidhi: has joined #RubyOnRails
[10:55:40] Fusselgesicht: TvL2386: Thank you, that was very helpful. :)
[11:06:55] TvL2386: Fusselgesicht: yw!
[11:07:07] TvL2386: not sure how I helped you though :)
[11:18:13] Fusselgesicht: I only thought you deserve at least one thank you :)
[11:21:00] Penelope_Pitstop: has joined #RubyOnRails
[11:34:33] ams__: has joined #RubyOnRails
[11:37:07] hahuang61: has joined #RubyOnRails
[11:37:08] moad: has joined #RubyOnRails
[11:37:51] desperek: has joined #RubyOnRails
[11:40:51] moad: has joined #RubyOnRails
[11:50:04] moad: has joined #RubyOnRails
[11:51:12] tekk: has joined #RubyOnRails
[11:52:38] moad: What is the best way to store images and other media content in rails 5 ?
[11:53:39] tekk: there are many good ways
[11:53:46] tekk: i personally use https://github.com/thoughtbot/paperclip for historic reasons
[11:58:41] moad: Thank you Tekk, I am trying to learn Rails by building small things, I'm starting with a blog (classic lol )
[11:59:12] durango: has joined #RubyOnRails
[11:59:43] tekk: sure, i've been a Rails noob for almost 10 years, don't sweat it.
[12:05:35] LambdaSource: has joined #RubyOnRails
[12:13:08] moad: has joined #RubyOnRails
[12:16:16] moad: has left #RubyOnRails: ()
[12:18:33] lessd: has joined #RubyOnRails
[12:18:44] lgbr: has joined #RubyOnRails
[12:31:58] TvL2386: Fusselgesicht: ahhhh... thx! ^^
[12:35:41] hahuang61: has joined #RubyOnRails
[12:42:32] Saukk: has joined #RubyOnRails
[12:43:07] conta: has joined #RubyOnRails
[12:54:58] durango: has joined #RubyOnRails
[13:10:30] hahuang61: has joined #RubyOnRails
[13:13:46] tcopeland: has joined #RubyOnRails
[13:35:21] Sylario: has joined #RubyOnRails
[13:46:10] qyliss: re image storage, etc, there's https://github.com/rails/rails/tree/master/activestorage, which will be part of Rails as of 5.2 (currently in beta)
[14:03:44] mtkd: has joined #RubyOnRails
[14:10:04] schneider: has joined #RubyOnRails
[14:13:55] jnollette: has joined #RubyOnRails
[14:14:42] _aeris_: has joined #RubyOnRails
[14:23:01] mtkd: has joined #RubyOnRails
[14:23:11] sameerynho: has joined #RubyOnRails
[14:23:42] rikkipitt: has joined #RubyOnRails
[14:41:13] shpoont: has joined #RubyOnRails
[14:42:53] za1b1tsu: has joined #RubyOnRails
[14:43:41] hahuang61: has joined #RubyOnRails
[14:45:37] lemonpaul: has joined #RubyOnRails
[14:46:52] lemonpaul: Good time for all. Using fragment caching with memcached and seems like it works, but there are not protocol messages about read frome cache. How to enable them?
[14:47:55] aguestuser: has joined #RubyOnRails
[14:50:25] workmad3: has joined #RubyOnRails
[14:52:53] za1b1tsu: Hello, this: .includes(:ratings => :subject).where(:ratings => { subjects: {type: 'review'} }).distinct loads the Sessions that only have a rating that belong to Subject type review
[14:53:12] za1b1tsu: *Session.includes(:ratings => :subject).where(:ratings => { subjects: {type: 'review'} }).distinct
[14:53:51] za1b1tsu: What I need is to load all Sessions and include ratings only when ratings.subjects is of type review
[14:59:28] shpoont: has joined #RubyOnRails
[15:19:20] creature: has joined #RubyOnRails
[15:20:09] chouhoulis: has joined #RubyOnRails
[15:27:31] shpoont: has joined #RubyOnRails
[15:35:05] hahuang61: has joined #RubyOnRails
[15:35:13] lemonpaul: How to enable caching logging?
[15:38:46] _aeris_: has joined #RubyOnRails
[15:49:48] uks: has joined #RubyOnRails
[16:26:18] tpendragon: has joined #RubyOnRails
[16:30:25] DoubleMalt: has joined #RubyOnRails
[16:32:03] shpoont: has joined #RubyOnRails
[16:41:32] orbyt_: has joined #RubyOnRails
[16:41:58] hahuang61: has joined #RubyOnRails
[16:42:48] schneider: has joined #RubyOnRails
[16:43:35] jackhum: has joined #RubyOnRails
[16:51:11] workmad3: has joined #RubyOnRails
[16:51:55] schneider: has joined #RubyOnRails
[16:52:55] mices: has joined #RubyOnRails
[16:53:04] mices: layout proc { |controller| user.logged_in? "layout1" : "layout2" }
[16:53:35] mices: undefined method `layout' for #<PicturesController:0x007f3536015e60>
[17:01:53] qyliss: mices: layout is a class method. You're trying to call it on an instance.
[17:02:36] mices: qyliss: i should put it in my Picture model?
[17:02:49] qyliss: No, you should put it in your controller
[17:02:52] qyliss: But outside of any method
[17:03:21] mices: sorry i don't understand, outside of any method
[17:03:43] mices: it's a callback definition i named set_layout
[17:04:09] mices: i call it with before_action
[17:04:50] mices: i see everyone suggesting syntax that has layouts beginning with a colon
[17:04:59] mices: i don't understand that either
[17:05:23] mices: since a layout is a file how can you reference it with symbol syntax
[17:05:51] mices: https://stackoverflow.com/questions/6672385/rails-set-layout-from-within-a-before-filter-method/7650568
[17:09:19] qyliss: That symbol references a method
[17:09:49] mices: it's not for every action
[17:10:05] mices: so how can i not put it in any method
[17:11:06] hahuang61: has joined #RubyOnRails
[17:11:08] qyliss: Oh, I see
[17:11:32] qyliss: It that case, `render` can take a `layout:` option
[17:13:04] mtkd: has joined #RubyOnRails
[17:22:23] mices: qyliss: how do i reference the request params in proc
[17:25:15] mices: layout proc { |controller| controller.imageable_type==Blogit::Post ? '/blogit/application' : '/application' }
[17:25:31] mices: see what i'm trying to do?
[17:26:33] mices: on only the create action if the params[:imageable_type]=='Blogit::Post' then I need to redirect using the /blogit/application layout
[17:40:10] arielserafini: has joined #RubyOnRails
[17:42:05] hahuang61: has joined #RubyOnRails
[17:43:17] shpoont: has joined #RubyOnRails
[17:45:57] qyliss: mices: render(layout: user.logged_in? ? "layout1" : "layout2")
[17:47:00] mices: render is no good on create because refreshing the page causes the form to be resubmitted
[17:47:21] mices: render is only for when save fails
[17:47:39] mices: it has to work with redirect
[17:48:03] mices: or just layout as you say not in any method
[17:50:02] qyliss: Put it in the action you redirect to then
[17:58:16] schneider: has joined #RubyOnRails
[18:18:17] LambdaSource: has joined #RubyOnRails
[18:32:54] jackhum_: has joined #RubyOnRails
[18:44:10] hahuang61: has joined #RubyOnRails
[18:48:13] schneider: has joined #RubyOnRails
[18:51:53] workmad3: has joined #RubyOnRails
[18:58:21] Dimik: has joined #RubyOnRails
[18:59:55] dviola: has joined #RubyOnRails
[19:12:48] hahuang61: has joined #RubyOnRails
[19:26:18] shpoont: has joined #RubyOnRails
[19:34:49] garyserj: I can't see what fields_for is doing here https://pastebin.com/raw/yAhpQXAf it doesn't seem to generate any html
[19:40:25] hahuang61: has joined #RubyOnRails
[19:51:18] lupine: garyserj: it modifies the html generated by users of address_f
[19:51:39] lupine: (relative to using a)
[19:53:03] am55: has joined #RubyOnRails
[19:54:43] garyserj: where can I see the modification?
[20:18:28] desperek: has joined #RubyOnRails
[20:20:01] mtkd: has joined #RubyOnRails
[20:33:19] mtkd: has joined #RubyOnRails
[20:36:43] TinkerTyper: has joined #RubyOnRails
[20:41:35] Joufflu: has joined #RubyOnRails
[20:43:37] hahuang61: has joined #RubyOnRails
[20:52:30] workmad3: has joined #RubyOnRails
[21:12:37] hahuang61: has joined #RubyOnRails
[21:18:46] sidx64: has joined #RubyOnRails
[21:20:59] twilling: has joined #RubyOnRails
[21:35:31] shpoont: has joined #RubyOnRails
[21:40:06] mices: has joined #RubyOnRails
[21:40:33] hahuang61: has joined #RubyOnRails
[21:44:06] mices: this is how i'm trying to select the layout from a conditional expression in my controller but it's not "working" the layout stays at the default https://gist.github.com/mices/26af4443c5012a62b9e7096a7dd51b86
[21:57:04] DTZUZO: has joined #RubyOnRails
[22:03:45] twilling: has joined #RubyOnRails
[22:12:06] dionysus69: has joined #RubyOnRails
[22:13:04] DTZUZO: has joined #RubyOnRails
[22:13:35] helpa: has joined #RubyOnRails
[22:34:32] darkhanb: has joined #RubyOnRails
[22:36:43] hahuang61: has joined #RubyOnRails
[22:51:17] orbyt_: has joined #RubyOnRails
[22:51:23] fryguy: has joined #RubyOnRails
[22:53:14] workmad3: has joined #RubyOnRails
[22:53:34] ResidentBiscuit: has joined #RubyOnRails
[23:33:33] ElFerna: has joined #RubyOnRails
[23:34:33] hahuang61: has joined #RubyOnRails
[23:36:15] durango: has joined #RubyOnRails
[23:39:18] aguestuser: has joined #RubyOnRails
[23:40:33] Puffball: has joined #RubyOnRails
[23:41:24] aguestuser: has joined #RubyOnRails
[23:53:40] orbyt_: has joined #RubyOnRails
[23:55:16] tcopeland: has joined #RubyOnRails
[23:56:23] HappyHotDog: has joined #RubyOnRails
[23:58:58] HappyHotDog: Hey I'm having an issue with a partial where my loop seems to be looping the partial too
[23:59:00] HappyHotDog: https://repl.it/repls/GoodSeagreenControlpanel
[23:59:20] HappyHotDog: if anyone can help me figure out where I'm going wrong, that would be awesome
[23:59:42] tcopeland: has joined #RubyOnRails