« Back to channel list

#RubyOnRails - 10 April 2017

« Back 1 day Forward 1 day »
[00:01:26] uksio: has joined #RubyOnRails
[00:10:27] SteenJobs: has joined #RubyOnRails
[00:17:18] samgranieri: has joined #RubyOnRails
[00:18:16] PresidentBiscuit: has joined #RubyOnRails
[00:30:37] hahuang61: has joined #RubyOnRails
[00:31:47] cschneid_: has joined #RubyOnRails
[00:34:05] PresidentBiscuit: has joined #RubyOnRails
[00:41:48] b3l914n: has joined #RubyOnRails
[00:43:53] jgt2: has joined #RubyOnRails
[00:50:45] quazimodo: has joined #RubyOnRails
[00:54:40] uks: has joined #RubyOnRails
[00:58:32] das3in: has joined #RubyOnRails
[00:59:37] das3in: Hi everyone, I'm writing a request spec for a rails api and when i run my test it's returning "missing template for this request format ["text/html"]" - how can i bypass this?
[00:59:49] das3in: the request is returning json (jbuilder) normally as it should
[01:00:41] Jayson_Virissimo: has joined #RubyOnRails
[01:04:33] irishfromua: has joined #RubyOnRails
[01:07:44] nya: has joined #RubyOnRails
[01:10:37] pwnd_nsfw`: das3in, it helps to see some code
[01:11:49] irishfromua: has joined #RubyOnRails
[01:14:01] harfangk: has joined #RubyOnRails
[01:16:28] bawsky: has joined #RubyOnRails
[01:21:16] sevenseacat: has joined #RubyOnRails
[01:21:57] byteflame: has joined #RubyOnRails
[01:30:01] nebiros: has joined #RubyOnRails
[01:30:01] nebiros: has joined #RubyOnRails
[01:30:05] hndk: has joined #RubyOnRails
[01:35:08] _djbkd: has joined #RubyOnRails
[01:36:15] irishfromua: has joined #RubyOnRails
[01:38:07] irishfromua: has joined #RubyOnRails
[01:49:49] irishfromua: has joined #RubyOnRails
[01:50:37] irishfromua: has joined #RubyOnRails
[01:51:53] ebbflowgo: has joined #RubyOnRails
[01:54:43] aajjbb: has joined #RubyOnRails
[01:54:51] soppe: has joined #RubyOnRails
[01:57:03] br0d1n: has joined #RubyOnRails
[02:05:09] libastral: has joined #RubyOnRails
[02:10:48] soppe: has joined #RubyOnRails
[02:11:04] lord4163: has joined #RubyOnRails
[02:11:53] xixi: has joined #RubyOnRails
[02:19:44] alexggordon: has joined #RubyOnRails
[02:21:59] armyriad: has joined #RubyOnRails
[02:24:43] Technodrome: has joined #RubyOnRails
[02:24:43] alexggordon: has joined #RubyOnRails
[02:31:26] hahuang61: has joined #RubyOnRails
[02:35:03] xall: has joined #RubyOnRails
[02:35:07] PresidentBiscuit: has joined #RubyOnRails
[02:37:17] irishfromua: has joined #RubyOnRails
[02:42:44] _djbkd: has joined #RubyOnRails
[02:43:24] soppe: has joined #RubyOnRails
[02:46:31] mochiyoda_: has joined #RubyOnRails
[02:47:25] Pumukel: has joined #RubyOnRails
[02:48:53] rogue_koder: has joined #RubyOnRails
[03:09:09] Pumukel: has joined #RubyOnRails
[03:09:56] Pumukel: has joined #RubyOnRails
[03:10:17] _djbkd: has joined #RubyOnRails
[03:10:44] Pumukel: has joined #RubyOnRails
[03:11:32] Pumukel: has joined #RubyOnRails
[03:12:20] Pumukel: has joined #RubyOnRails
[03:13:13] cschneid_: has joined #RubyOnRails
[03:26:05] knight33: has joined #RubyOnRails
[03:26:29] _djbkd: has joined #RubyOnRails
[03:28:27] jusa: has joined #RubyOnRails
[03:32:54] hous: has joined #RubyOnRails
[03:34:08] byteflame: has joined #RubyOnRails
[03:34:08] byteflam1: has joined #RubyOnRails
[03:44:54] xall: has joined #RubyOnRails
[03:50:47] jdm: has joined #RubyOnRails
[03:51:39] nya: has joined #RubyOnRails
[03:54:12] _djbkd: has joined #RubyOnRails
[03:58:35] itsgokul: has joined #RubyOnRails
[04:03:34] jgt2: has joined #RubyOnRails
[04:11:24] JDeen: Hello there.. I got a question on nested attributes and Rails5. I have 3 models Account, Membership, User (some thing like this: http://stackoverflow.com/questions/13506735/rails-has-many-through-nested-form). But when I create an account with a user, I get an error on membership that 'memberships.account must exist'. Its regarding the new rails behaviour regarding belongs_to. How can I fix this?
[04:13:56] cerulean: make sure you set @membership.account before save
[04:14:04] cerulean: to an existing account object
[04:14:45] Ropeney: has joined #RubyOnRails
[04:14:52] sevenseacat: without seeing any code, it's a bit hard to help
[04:15:58] Radar: GOOD AFTERNOON
[04:19:45] babykosh: has joined #RubyOnRails
[04:20:29] rogue_koder: has joined #RubyOnRails
[04:24:14] irishfromua: has joined #RubyOnRails
[04:24:15] JDeen: sevenseacat: ya sure... i was witing for my machine too boot... here it goes... https://gist.github.com/ziyan-junaideen/d3d62221e9d24530aa304ca5fa99de17
[04:26:59] Radar: Raaailllsssss
[04:27:24] Radar: Rails: "Let me help you" Me: "oh no no no no argghhhh"
[04:27:37] Radar: This is a classic case of that.
[04:28:28] srinidhi: has joined #RubyOnRails
[04:29:09] figures_: has joined #RubyOnRails
[04:31:51] JDeen: Radar: good afternoon, I remember you are in Aus? its morning here in Sri Lanka... was the comment above for me?
[04:32:18] hahuang61: has joined #RubyOnRails
[04:33:47] JDeen: cool, thats good to know, because then it can be fixed... what silly did i do there pls...
[04:42:03] lele: has joined #RubyOnRails
[04:42:10] iamayam: has joined #RubyOnRails
[04:42:53] peterpp: has joined #RubyOnRails
[04:44:05] rogue_koder: has joined #RubyOnRails
[04:44:46] am55: has joined #RubyOnRails
[04:52:20] eclecticjohny: has joined #RubyOnRails
[04:58:35] sevenseacat: jdeen: can you try changing `belongs_to :account` to `belongs_to :account, inverse_of: :memberships` in the Membership model? out of curiosity
[05:08:00] pickle_: has joined #RubyOnRails
[05:10:43] babykosh: has joined #RubyOnRails
[05:16:31] pickle_: has joined #RubyOnRails
[05:17:27] goodroot: has joined #RubyOnRails
[05:18:05] jdm: has joined #RubyOnRails
[05:19:14] pickle_: has joined #RubyOnRails
[05:21:48] naprimer: has joined #RubyOnRails
[05:24:17] armyriad: has joined #RubyOnRails
[05:29:05] lilster: has joined #RubyOnRails
[05:34:25] byteflam1: has joined #RubyOnRails
[05:34:25] byteflame: has joined #RubyOnRails
[05:36:44] xco: has joined #RubyOnRails
[05:48:38] soppe: has joined #RubyOnRails
[05:55:53] pickle_: has joined #RubyOnRails
[05:56:58] _djbkd: has joined #RubyOnRails
[05:57:03] bobsburgers68: has joined #RubyOnRails
[05:59:05] dminuoso: Is there anyone who has tried to re-structure rails folders to organize by feature?
[05:59:19] sevenseacat: I thnk that would be an exercise in futility
[05:59:41] dminuoso: sevenseacat: Why so? At least the controller/view/helpers are usually coupled extremely tightly.
[06:00:05] sevenseacat: because i don't think Rails will play nice
[06:00:15] dminuoso: Well let's ignore that for a second.
[06:00:20] dminuoso: Rails can be fixed. ;-)
[06:02:10] User458764: has joined #RubyOnRails
[06:03:06] dminuoso: sevenseacat: I mean you do have a point. It makes magical things like "render @post.comments" require explicit partials -> but I actually kind of enjoy explicitly referring views because it conveys clear intend.
[06:03:34] ReBa_: has joined #RubyOnRails
[06:03:43] dminuoso: But then again I stopped using ActionView anyway. :-)
[06:03:58] pLaTo0n: has joined #RubyOnRails
[06:07:58] jgt2: has joined #RubyOnRails
[06:18:46] ferr1: has joined #RubyOnRails
[06:19:25] soppe: has joined #RubyOnRails
[06:26:04] pLaTo0n: has joined #RubyOnRails
[06:33:21] hahuang61: has joined #RubyOnRails
[06:35:50] PresidentBiscuit: has joined #RubyOnRails
[06:37:10] bungoman: has joined #RubyOnRails
[06:37:51] conta: has joined #RubyOnRails
[06:37:57] Qchmqs: has joined #RubyOnRails
[06:43:56] alexggordon: has joined #RubyOnRails
[07:09:42] darutoko: has joined #RubyOnRails
[07:14:12] arBmind: has joined #RubyOnRails
[07:15:02] Pumukel: has joined #RubyOnRails
[07:20:15] arBmind1: has joined #RubyOnRails
[07:20:16] DrYockel: has joined #RubyOnRails
[07:28:05] mark_66: has joined #RubyOnRails
[07:34:30] babykosh: has joined #RubyOnRails
[07:34:32] kristofferR: has joined #RubyOnRails
[07:34:37] byteflame: has joined #RubyOnRails
[07:34:37] byteflam1: has joined #RubyOnRails
[07:35:14] jusa: has joined #RubyOnRails
[07:46:21] snickers: has joined #RubyOnRails
[07:49:27] artto: has joined #RubyOnRails
[08:09:04] zero1one0: has joined #RubyOnRails
[08:13:11] mikecmpbll: has joined #RubyOnRails
[08:13:51] tvw: has joined #RubyOnRails
[08:14:38] Olipro: has joined #RubyOnRails
[08:18:15] aenialis: has joined #RubyOnRails
[08:20:35] arBmind: has joined #RubyOnRails
[08:23:49] jsrn_: has joined #RubyOnRails
[08:23:54] arBmind1: has joined #RubyOnRails
[08:27:25] marr: has joined #RubyOnRails
[08:27:57] artto: has joined #RubyOnRails
[08:31:20] zpe: has joined #RubyOnRails
[08:31:23] artto: has joined #RubyOnRails
[08:34:11] hahuang61: has joined #RubyOnRails
[08:35:08] artto: has joined #RubyOnRails
[08:43:28] conta: has joined #RubyOnRails
[08:45:10] alexggordon: has joined #RubyOnRails
[08:52:11] lxsameer: has joined #RubyOnRails
[08:54:41] dblessing: has joined #RubyOnRails
[08:55:11] cgfbee: has joined #RubyOnRails
[08:58:25] jenrzzz: has joined #RubyOnRails
[08:58:25] jenrzzz: has joined #RubyOnRails
[09:03:11] artto: has joined #RubyOnRails
[09:04:42] pulkit4tech: has joined #RubyOnRails
[09:13:38] defsdoor: has joined #RubyOnRails
[09:19:04] artto: has joined #RubyOnRails
[09:25:27] srinidhi: has joined #RubyOnRails
[09:30:16] teddysmoker: has joined #RubyOnRails
[09:31:08] jaequery: has joined #RubyOnRails
[09:34:50] byteflam1: has joined #RubyOnRails
[09:34:50] byteflame: has joined #RubyOnRails
[09:40:12] teddysmoker: Has anyone used Cloudinary here?
[09:41:45] artto: has joined #RubyOnRails
[09:43:14] jaequery: has joined #RubyOnRails
[09:45:16] dionysus69: has joined #RubyOnRails
[09:53:22] artto: has joined #RubyOnRails
[09:55:08] ferr1: has joined #RubyOnRails
[09:57:41] artto_: has joined #RubyOnRails
[10:02:37] jottr: has joined #RubyOnRails
[10:12:19] artto: has joined #RubyOnRails
[10:14:41] ebbflowgo: has joined #RubyOnRails
[10:15:16] wethu: has joined #RubyOnRails
[10:20:53] artto: has joined #RubyOnRails
[10:31:33] artto: has joined #RubyOnRails
[10:32:56] pwnd_nsfw`: has joined #RubyOnRails
[10:34:24] byteflam1: has joined #RubyOnRails
[10:34:24] byteflame: has joined #RubyOnRails
[10:34:59] hahuang61: has joined #RubyOnRails
[10:36:33] PresidentBiscuit: has joined #RubyOnRails
[10:37:38] GodFather: has joined #RubyOnRails
[10:39:32] Guest96: has joined #RubyOnRails
[10:42:17] jusa: has joined #RubyOnRails
[10:45:42] artto: has joined #RubyOnRails
[10:46:36] cschneid_: has joined #RubyOnRails
[10:55:48] User458764: has joined #RubyOnRails
[11:05:54] jeyraof^mbpr: has joined #RubyOnRails
[11:06:04] gloscombe: has joined #RubyOnRails
[11:09:13] quazimodo: has joined #RubyOnRails
[11:10:24] ebbflowgo: has joined #RubyOnRails
[11:15:12] artto: has joined #RubyOnRails
[11:27:45] jgt2: has joined #RubyOnRails
[11:34:49] artto: has joined #RubyOnRails
[11:37:41] byteflame: has joined #RubyOnRails
[11:37:45] byteflam1: has joined #RubyOnRails
[11:41:04] harfangk: has joined #RubyOnRails
[11:44:54] artto: has joined #RubyOnRails
[11:45:17] andywww: has joined #RubyOnRails
[11:52:17] yaw: has joined #RubyOnRails
[12:02:24] ldnunes: has joined #RubyOnRails
[12:02:51] HoierM: has joined #RubyOnRails
[12:05:53] sunya7a: Radar: good evening. did you have a chance to take a peek at that where query. what's your opinion on the safety of it?
[12:09:44] User458764: has joined #RubyOnRails
[12:19:21] samgranieri: has joined #RubyOnRails
[12:20:18] cseder: has joined #RubyOnRails
[12:20:52] bbrowning_: has joined #RubyOnRails
[12:22:37] artto: has joined #RubyOnRails
[12:23:30] bungoman: has joined #RubyOnRails
[12:24:42] buckrockwell: has joined #RubyOnRails
[12:27:59] csk: has joined #RubyOnRails
[12:29:45] pupsicle: has joined #RubyOnRails
[12:30:44] csk: has joined #RubyOnRails
[12:33:16] xall: has joined #RubyOnRails
[12:33:26] arBmind: has joined #RubyOnRails
[12:34:03] handicraftsman: has joined #RubyOnRails
[12:35:41] DrYockel1: has joined #RubyOnRails
[12:36:37] hahuang61: has joined #RubyOnRails
[12:39:29] naprimer: has joined #RubyOnRails
[12:43:56] Pumukel: has joined #RubyOnRails
[12:44:41] Pumukel: has joined #RubyOnRails
[12:46:32] alexggordon: has joined #RubyOnRails
[12:47:50] harfangk: has joined #RubyOnRails
[12:52:14] iamayam: has joined #RubyOnRails
[12:53:32] User458764: has joined #RubyOnRails
[12:59:16] andywww: has joined #RubyOnRails
[13:00:39] HoierM: has joined #RubyOnRails
[13:01:39] DrYockel1: has joined #RubyOnRails
[13:04:07] ramortegui: has joined #RubyOnRails
[13:08:57] pLaTo0n: has joined #RubyOnRails
[13:12:49] fattuna: has joined #RubyOnRails
[13:15:15] pulkit4tech: has joined #RubyOnRails
[13:19:00] byteflame: has joined #RubyOnRails
[13:19:02] byteflam1: has joined #RubyOnRails
[13:21:37] ramortegui: has joined #RubyOnRails
[13:22:26] artto: has joined #RubyOnRails
[13:24:00] mcr-credil: has joined #RubyOnRails
[13:24:45] claudevandort: has joined #RubyOnRails
[13:27:33] banisterfiend: has joined #RubyOnRails
[13:28:48] Arkentias: has joined #RubyOnRails
[13:32:41] DLSteve: has joined #RubyOnRails
[13:35:45] scrooloose: has joined #RubyOnRails
[13:35:47] patarr: has joined #RubyOnRails
[13:36:24] keerthana: has joined #RubyOnRails
[13:43:26] xall: has joined #RubyOnRails
[13:43:39] mazeinmaze_: has joined #RubyOnRails
[13:46:19] byteflam1: has joined #RubyOnRails
[13:46:19] byteflame: has joined #RubyOnRails
[13:47:32] IRCFrEAK: has joined #RubyOnRails
[13:48:14] arBmind1: has joined #RubyOnRails
[13:48:30] IRCFrEAK: has left #RubyOnRails: ()
[13:49:11] rogue_koder: has joined #RubyOnRails
[13:51:49] buckrockwell: has joined #RubyOnRails
[13:52:25] akshat: has joined #RubyOnRails
[13:52:52] jusa: has joined #RubyOnRails
[13:52:58] pLaToOn: has joined #RubyOnRails
[13:56:05] pupsicle: has joined #RubyOnRails
[13:59:18] artto_: has joined #RubyOnRails
[14:00:21] Technodrome: has joined #RubyOnRails
[14:02:09] agent_white: has joined #RubyOnRails
[14:09:20] EXCHGR: has joined #RubyOnRails
[14:09:48] chouhoulis: has joined #RubyOnRails
[14:10:17] xall: has joined #RubyOnRails
[14:11:33] platoon23: has joined #RubyOnRails
[14:15:10] jgt2: has joined #RubyOnRails
[14:15:34] roshanavand: has joined #RubyOnRails
[14:17:40] roshanavand: has joined #RubyOnRails
[14:19:46] shinnya: has joined #RubyOnRails
[14:21:37] ldnunes: has joined #RubyOnRails
[14:24:01] chouhoulis: has joined #RubyOnRails
[14:26:33] agent_white: Mornin' folks
[14:31:15] knight33: has joined #RubyOnRails
[14:34:18] narval: has joined #RubyOnRails
[14:34:44] User458764: has joined #RubyOnRails
[14:36:46] rubyonrailed: has joined #RubyOnRails
[14:37:09] Arkentias: has joined #RubyOnRails
[14:37:22] hahuang61: has joined #RubyOnRails
[14:38:14] dionysus69: has joined #RubyOnRails
[14:41:10] mazeinmaze_: has joined #RubyOnRails
[14:41:21] tubbo: has joined #RubyOnRails
[14:45:06] byteflame: has joined #RubyOnRails
[14:45:08] byteflam1: has joined #RubyOnRails
[14:45:32] Guest96: has joined #RubyOnRails
[14:49:04] ghormoon: has joined #RubyOnRails
[15:08:16] cschneid_: has joined #RubyOnRails
[15:16:23] cerulean: gmourin agent_white
[15:21:13] artto: has joined #RubyOnRails
[15:22:08] [Tyrant]: has joined #RubyOnRails
[15:23:53] artto: has joined #RubyOnRails
[15:24:33] artto: has joined #RubyOnRails
[15:29:54] artto: has joined #RubyOnRails
[15:32:26] polishdub: has joined #RubyOnRails
[15:37:19] byteflame: has joined #RubyOnRails
[15:37:20] byteflam1: has joined #RubyOnRails
[15:38:31] dionysus69: has joined #RubyOnRails
[15:41:21] gregf_: has joined #RubyOnRails
[15:45:55] ketan: has joined #RubyOnRails
[15:47:16] ketan: Hi everyone, can anyone recommend how to test a method that has `return unless Rails.env.production?`
[15:47:45] dminuoso: ketan: minitest or rspec?
[15:47:51] dminuoso: ketan: Either way, stub.
[15:47:52] ketan: test unit lol
[15:47:58] rakm: has joined #RubyOnRails
[15:48:00] dminuoso: That means minitest. Stub it.
[15:48:12] ketan: ok, thanks
[15:48:45] dminuoso: ketan: Though personally I would advise against any unless Rails.env.production? in the first place.
[15:49:02] dminuoso: Behavior that depends on which environment it runs on is error prone and will make your tests lose a lot of value.
[15:49:28] dminuoso: ketan: That test for that specific component has 0 value, because it won't say anything about production (which means its useless)
[15:49:59] ketan: What could I use instead, the method redirects to https and we don't want this behaviour in test or development
[15:50:26] dminuoso: ketan: Can you explain what this does exactly?
[15:50:30] [Butch]: has joined #RubyOnRails
[15:50:33] dminuoso: ketan: redirect to https on the same rails app?
[15:50:54] dminuoso: ketan: There's a Rails middleware that does this for you.
[15:51:09] ketan: this is a rails 2 project which doesn't have config.force_ssl, so I need to make our site https site wide
[15:51:24] ketan: currently only a few form pages are https
[15:51:29] dminuoso: ketan: I would say mimic the same behavior. Write your own middleware to do this.
[15:51:44] dminuoso: (And just enable the middleware depending on the environment(
[15:51:58] ketan: interesting, I'll look into that. Thanks
[15:54:13] dminuoso: ketan: https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/ssl.rb
[15:54:31] dminuoso: This is the current implementation. It's very likely that you can reuse this with little to no modification.
[15:55:32] ketan: great, thanks for that!
[15:57:47] Slinky_Pete: has joined #RubyOnRails
[15:58:16] levifig: has joined #RubyOnRails
[15:59:54] jusa: has joined #RubyOnRails
[16:02:52] patarr1: has joined #RubyOnRails
[16:04:38] AzaToth: has joined #RubyOnRails
[16:05:15] byteflame: has joined #RubyOnRails
[16:05:16] byteflam1: has joined #RubyOnRails
[16:13:17] knight33: has joined #RubyOnRails
[16:18:14] mephistophocles: has joined #RubyOnRails
[16:20:54] cschneid_: has joined #RubyOnRails
[16:26:23] liquid-silence: has joined #RubyOnRails
[16:27:58] liquid-silence: using devise with nested forms and its not creating the nested model, receiving a ActiveRecord::AssociationTypeMismatch: Company(#70111777399940) expected, got ActiveSupport::HashWithIndifferentAccess(#70111765387260) error
[16:28:02] liquid-silence: anyone seen this before?
[16:28:12] ResidentBiscuit: has joined #RubyOnRails
[16:28:20] fryguy: show some code
[16:28:29] liquid-silence: fryguy doing so now
[16:30:54] liquid-silence: https://pastebin.com/bCZUNLTZ
[16:32:39] gusrub: has joined #RubyOnRails
[16:33:20] liquid-silence: not really sure why its throwing that specific error..
[16:35:15] liquid-silence: @fryguy can you see anything that I am not seeing?
[16:38:28] hahuang61: has joined #RubyOnRails
[16:40:26] liquid-silence: nevermind I was being dumb
[16:41:59] andywww: has joined #RubyOnRails
[16:46:54] jaequery: has joined #RubyOnRails
[16:48:21] alexggordon: has joined #RubyOnRails
[16:49:18] DoctorMonocular: has joined #RubyOnRails
[16:56:05] Cache_Money: has joined #RubyOnRails
[16:56:15] _djbkd: has joined #RubyOnRails
[16:58:21] chouhoulis: has joined #RubyOnRails
[17:03:31] Cache_Money: I have a custom validation that looks verifies that a column is unique. However, when I go to update the record it throws an error because that column value already exists.
[17:03:42] Cache_Money: How should I modify my validation? https://gist.github.com/anonymous/170aa9598352785f53fc4b79d6399fd1
[17:04:43] handicraftsman: has joined #RubyOnRails
[17:04:43] handicraftsman: has joined #RubyOnRails
[17:05:00] cerulean: my guess is you should refactor how you are checking for uniqueness
[17:05:28] tbuehlmann: Cache_Money: any reason why you don't use rails' uniqueness validation for this?
[17:05:57] keerthana: has joined #RubyOnRails
[17:06:26] Cache_Money: tbuehlmann: I was just thinking about that myself. I'm not sure why I originally did that... I just changed my validation to use `uniqueness` and I'm able to update just fine. I'll move to that approach
[17:10:28] pLaToOn: has joined #RubyOnRails
[17:12:46] gusrub: has joined #RubyOnRails
[17:14:06] gusrub: has joined #RubyOnRails
[17:14:12] jgt2: has joined #RubyOnRails
[17:21:05] ketan: has joined #RubyOnRails
[17:22:21] keerthana: has joined #RubyOnRails
[17:23:30] byteflam1: has joined #RubyOnRails
[17:23:30] byteflame: has joined #RubyOnRails
[17:24:01] s2013: has joined #RubyOnRails
[17:29:04] hakash: has joined #RubyOnRails
[17:29:31] mikecmpbll: has joined #RubyOnRails
[17:35:54] chouhoulis: has joined #RubyOnRails
[17:37:23] jgt2: has joined #RubyOnRails
[17:39:32] froglegs: has joined #RubyOnRails
[17:40:15] akshat: has joined #RubyOnRails
[17:46:18] hahuang61: has joined #RubyOnRails
[17:47:45] CGibsonmm: has joined #RubyOnRails
[17:48:24] duderonomy: has joined #RubyOnRails
[17:54:17] gusrub: has joined #RubyOnRails
[17:58:44] gbailey: has joined #RubyOnRails
[17:58:52] gusrub: has joined #RubyOnRails
[17:59:24] byteflam1: has joined #RubyOnRails
[17:59:25] byteflame: has joined #RubyOnRails
[18:01:51] GodFather: has joined #RubyOnRails
[18:04:10] GodFather: has joined #RubyOnRails
[18:18:30] GodFather: has joined #RubyOnRails
[18:21:26] contradictioned: has joined #RubyOnRails
[18:23:24] keerthana: has joined #RubyOnRails
[18:29:28] User458764: has joined #RubyOnRails
[18:29:46] SteenJobs: has joined #RubyOnRails
[18:32:04] NoGodDamnIdea: has joined #RubyOnRails
[18:32:04] NoGodDamnIdea: has joined #RubyOnRails
[18:33:15] crystalneth: has joined #RubyOnRails
[18:39:25] jusa: has joined #RubyOnRails
[18:41:35] reaVer: has joined #RubyOnRails
[18:49:31] Jayson_Virissimo: has joined #RubyOnRails
[18:49:33] alexggordon: has joined #RubyOnRails
[18:57:56] patarr: has joined #RubyOnRails
[18:58:38] war_pigs: has joined #RubyOnRails
[18:59:06] sceem: has joined #RubyOnRails
[19:04:24] Jasaka: has joined #RubyOnRails
[19:05:49] byteflam1: has joined #RubyOnRails
[19:05:49] byteflame: has joined #RubyOnRails
[19:05:51] chrisgopher: has joined #RubyOnRails
[19:17:51] patarr: Why do I continuously get i18n-debug debug level log messages when I set the rails logger to :info?
[19:20:28] epochwolf: patarr: did you verify the log level is actually set to default?
[19:20:51] arBmind: has joined #RubyOnRails
[19:21:19] epochwolf: because you shouldn't be getting debug message at the info setting.
[19:28:44] patarr: epochwolf: I've verified that something is resetting my level to 0 on Rails.logger
[19:28:54] epochwolf: patarr: there we go
[19:28:59] patarr: I step through and debug my initializers, and the loggers they produce look good (set at 1 or Logger::INFO)
[19:29:13] patarr: But then I try bringing up a rails console, and check Rails.logger to see it has a 0.
[19:29:16] patarr: And I have no idea where to even look
[19:29:42] patarr: mmm this may be lograge..
[19:29:45] epochwolf: Well, you could modify the rails logger object and record every access to level?
[19:30:02] epochwolf: That's just my brute force idea.
[19:30:17] epochwolf: I tend to have unelegant, straightforward solutions. :)
[19:32:04] patarr: epochwolf: how would I go about doing that?
[19:33:48] epochwolf: patarr: um... def Rails.logger.level=(*args); super(*args); end
[19:34:21] epochwolf: And after super just raise and rescue an exception to get a stack trace.
[19:35:15] epochwolf: http://stackoverflow.com/questions/9786495/dynamically-replace-method-implementation-on-an-object-in-ruby
[19:36:11] epochwolf: Or you could use the debugger to stick a breakpoint in the method.
[19:36:27] epochwolf: Forgot about that.
[19:36:35] patarr: Thanks epochwolf. I will give those a shot
[19:40:50] srinidhi: has joined #RubyOnRails
[19:47:05] srinidhi1: has joined #RubyOnRails
[19:47:27] babykosh: has joined #RubyOnRails
[19:48:23] Guest96_: has joined #RubyOnRails
[19:54:27] patarr: I'm back with more questions :) I'm currently working with delayed_job, and I was wondering how I would set a breakpoint in some of its internal code with byebug. I write the line in there, and the BP _does_ get hit, but delayed_job seems to just continue chugging along ignoring my input (I can't step, etc)
[19:54:47] Robtop__: has joined #RubyOnRails
[19:54:52] patarr: It's like some kind of background thread continued spewing things onto the screen, and my input was not registering with the BP
[19:55:57] jenrzzz: has joined #RubyOnRails
[19:55:58] jenrzzz: has joined #RubyOnRails
[19:56:30] epochwolf: It's possible there's something in another thread or process
[20:02:30] bungoman: has joined #RubyOnRails
[20:02:42] SteenJobs: has joined #RubyOnRails
[20:02:49] knight33: has joined #RubyOnRails
[20:04:19] meoblast001: has joined #RubyOnRails
[20:04:39] Jon30: i am going crazy here.. why would a simple to_json with (include: [:id]) result in an error NoMethodError: undefined method `serializable_hash' for 154:Fixnum
[20:04:51] Jon30: I have tried using other fields in include, and I am getting the same error
[20:06:49] Jon30: n/m i am an idiot.. i meant to use only: instead of include: lol
[20:07:57] epochwolf: Jon30: glad I could help.
[20:11:38] GodFather: has joined #RubyOnRails
[20:19:58] aajjbb: has joined #RubyOnRails
[20:24:18] hazelux: has joined #RubyOnRails
[20:25:09] hazelux: Hey all! Has anyone played around with Docker + Rails? I'm having trouble with assets not resolving
[20:28:57] dminuoso: hazelux: Yes.
[20:35:33] bbrowning: has joined #RubyOnRails
[20:36:33] hazelux: dminuoso: did you bump into that issue too? How do you get around it? I tried accessing both the digested and non-digested asset and both 404'd
[20:36:57] jdm: has joined #RubyOnRails
[20:39:33] cam27: has joined #RubyOnRails
[20:41:05] jane_booty_doe: has joined #RubyOnRails
[20:44:59] lxsameer: has joined #RubyOnRails
[20:47:04] gusrub: has joined #RubyOnRails
[20:52:51] daveomcd: has joined #RubyOnRails
[20:53:06] dminuoso: hazelux: "Your car suddenly stopped working. Did you bump into that issue too? How did you get around it? I tried filling up the gas but it didn't work"
[20:53:33] dminuoso: That's the car analogy of what you just said.
[20:54:04] dminuoso: hazelux: Instead of asking whether someone bumped into that issue, try figuring out the *cause* for that issue.
[20:54:14] rakm: has joined #RubyOnRails
[20:55:00] dminuoso: Let's start by pointing out that docker has no impact on any Rails parts. So whatever problem you had, it was very likely unrelated to docker itself.
[20:57:01] hazelux: dminuoso: the problem is that the assets are 404'ing. I've tried accessing the fingerprinted asset and the bare asset, and none work. It only happens when inside of Docker
[20:57:43] hive-mind: has joined #RubyOnRails
[20:59:36] dminuoso: No the problem is not that assets are 404'ing.
[21:00:03] dminuoso: hazelux: How do you want to serve assets?
[21:01:21] hazelux: dminuoso: via a CDN.
[21:02:22] dminuoso: hazelux: This is the time when you start showing me exactly what you are doing.
[21:04:10] narval: has joined #RubyOnRails
[21:05:58] hazelux: dminuoso: ok, I think I'm not doing anything fancy here. I have my application.js with different directives for sprockets, the front end is on React, so there's a separate file called react_bundle.js that sits in the public folder. The way I did it before Docker was to deploy and have rake assets:precompile run on every instance on AWS. Then I set `config.asset_host` to the CDN url, and that's it.
[21:06:17] dminuoso: I said show, not explain.
[21:06:25] helpa: If you're going to tell someone to "Just google it" or "RTFM", tell them what terms to use on Google exactly, or link them to the place in the documentation.
[21:07:02] dminuoso: hazelux: !rule3
[21:07:02] helpa: hazelux: 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.
[21:07:53] hazelux: dminuoso: what do you need in the gist? Just wanna make sure I include everything.
[21:08:15] byteflame: has joined #RubyOnRails
[21:08:16] byteflam1: has joined #RubyOnRails
[21:08:40] dminuoso: hazelux: Well as long as you create a personal gist (so you can add stuff as we go) let's just start with your config/application.js and config/environments/<your_env>.rb
[21:08:54] dminuoso: hazelux: Also your Dockerfile.
[21:09:36] war_pigs: has joined #RubyOnRails
[21:10:54] dminuoso: hazelux: Also just from personal experience, unless there are good reasons it's best if you completely separate rails from your react app.
[21:11:00] dminuoso: But that's just a hint on the side.
[21:13:50] hazelux: thanks, yeah I've been bitten by that in the past, too.
[21:13:56] hazelux: dminuoso: here we go: https://gist.github.com/maxcodes/255ecfb9f6c2a7e95ae6e9130af08af5
[21:15:10] dminuoso: hazelux: And how exactly do the assets come to be?
[21:16:09] jusa: has joined #RubyOnRails
[21:17:24] hazelux: just updated the gist with `assets.rake`. Assets live either in /public or in /app/assets, and then rake assets:precompile is run
[21:17:47] hazelux: That file just makes sure that the React stuff gets compiled as well when running rake assets:precompile
[21:18:12] dminuoso: Let's have it.
[21:20:08] dminuoso: hazelux: I have no idea about this react_webpack_rails thing.
[21:21:38] dminuoso: hazelux: But I would look and check whether the glue between rails assets and the webpack manifest works properly.
[21:22:08] hazelux: dminuoso: no worries. It has nothing to do with the rest of the assets, it doesn't make much of a difference. It basically just runs webpack build.
[21:22:30] dminuoso: hazelux: Which assets are not working anyway?
[21:22:35] dminuoso: The webpack asset?
[21:22:38] dminuoso: Other assets?
[21:22:40] dminuoso: All of them?
[21:22:47] dminuoso: Are they properly fingerprinted?
[21:23:00] dminuoso: Are the generated asset helpers fingerprinted?
[21:24:04] hazelux: dminuoso: the way I'm testing it is just accessing a single asset via its direct URL. All of them are failing (both CSS and JS). The asset helpers are fingerprinted. How can I know if the asset itself is fingerprinted?
[21:24:16] dminuoso: hazelux: Look at them...
[21:24:39] dminuoso: hazelux: All precompiling assets does is generate a bunch of files.
[21:24:59] hazelux: dminuoso: oh, yeah. They are fingerprinted too. I have the non-fingerprinted version in `app/assets` and the fingerprinted in `public/assets`
[21:25:07] dminuoso: hazelux: Do the fingerprints match?
[21:26:50] dminuoso: hazelux: Well look at the url from any assets helper then. Does the URL look valid? If so you deployed it wrongly.
[21:28:50] jenrzzz: has joined #RubyOnRails
[21:28:50] jenrzzz: has joined #RubyOnRails
[21:31:48] hazelux: dminuoso: it does, and it still 404s. Say I have an asset called `verified.png`. I have `verified-fingerprint.png` in `public/assets`. If I visit `localhost/assets/verified-fingerprint.png` I get a 404...why would this be?
[21:32:53] dminuoso: hazelux: Not a rails problem if your CDN does not serve your asset.
[21:33:02] ccchris: has joined #RubyOnRails
[21:33:09] dminuoso: hazelux: Though my first instinct would be cache.
[21:34:24] dminuoso: hazelux: http://edgeguides.rubyonrails.org/asset_pipeline.html#cdns consult section 4.4.2
[21:34:29] dminuoso: And following
[21:35:20] alexggordon: has joined #RubyOnRails
[21:35:25] ccchris: has left #RubyOnRails: ("User left")
[21:36:48] hazelux: dminuoso: thanks, I have some ideas now.
[21:37:58] dminuoso: hazelux: Also wrt to your question, it's very simple. You dont have rails configured to serve assets...
[21:38:18] hazelux: dminuoso: what do you mean?
[21:38:27] dminuoso: 23:31 < hazelux> dminuoso: it does, and it still 404s. Say I have an asset called `verified.png`. I have `verified-fingerprint.png` in `public/assets`. If I visit `localhost/assets/verified-fingerprint.png` I get a 404...why would this
[21:38:37] dminuoso: hazelux: Which application do you expect to serve up that asset?
[21:38:41] dminuoso: Some webserver?
[21:38:47] hazelux: yeah, Rails itself
[21:39:19] dminuoso: hazelux: https://gist.github.com/maxcodes/255ecfb9f6c2a7e95ae6e9130af08af5#file-production-rb-L23
[21:39:22] dminuoso: Except you told it not to.
[21:40:38] dminuoso: hazelux: And since you also configured it to not fallback to dynamically generating them when a static asset is missed: https://gist.github.com/maxcodes/255ecfb9f6c2a7e95ae6e9130af08af5#file-production-rb-L30
[21:40:47] dminuoso: Rails has no choice to tell you "No way, bro"
[21:41:21] dminuoso: So all in all you neither precompiling the assets in your Dockerfile, nor is Rails configured to serve them if they were precompiled.
[21:43:46] hazelux: dminuoso: oh wow. Yeah that sounds bad. Ok, I didn't know about this. Thanks for the pointers!
[21:48:04] am55: has joined #RubyOnRails
[21:48:14] dminuoso: hazelux: Also if you want a sleek and elegant and actually simple webpack integration, look at this: https://github.com/mipearson/webpack-rails
[21:50:19] pupsicle: has joined #RubyOnRails
[21:52:12] dminuoso: Though mmm.
[21:52:19] dminuoso: The more I look at react_webpack_rails it doesnt seem too bad,
[21:53:22] hazelux: I tried both, and I ended up liking react_webpack_rails a little better. webpack-rails seems a bit more widely used though
[21:56:04] babykosh: has joined #RubyOnRails
[21:57:01] Technodrome: has joined #RubyOnRails
[22:05:16] gambl0re: has joined #RubyOnRails
[22:09:45] war_pigs: has joined #RubyOnRails
[22:10:03] rakm: has joined #RubyOnRails
[22:10:29] carlosd: has joined #RubyOnRails
[22:11:08] carlosd: I have a gem A that is a runtime dependency of gem B
[22:11:21] carlosd: When I add the B gem in my rails project
[22:11:52] carlosd: The goodies of A isn't available in my project, is this by design?
[22:16:32] mikecmpbll: has joined #RubyOnRails
[22:20:46] byteflam1: has joined #RubyOnRails
[22:20:46] byteflame: has joined #RubyOnRails
[22:21:09] rubyonrailed: has joined #RubyOnRails
[22:23:28] rubyonrailed: has joined #RubyOnRails
[22:25:20] matthewd: carlosd: Gem B may not be requiring gem A automatically
[22:25:58] matthewd: carlosd: But really, if you're using gem A's goodies, you generally be listing it in your gemfile anyway
[22:26:48] carlosd: I have this in gemspec: `s.add_runtime_dependency "country_select", ">= 3.0.0"`
[22:26:57] dminuoso: hazelux: After about 2 days I raged too much and just created a new repo with just raw webpack.
[22:27:00] dminuoso: Never looked back since then
[22:27:19] dminuoso: hazelux: My coworkers still hate me for the amount of pencils and other office items I have thrown around me.
[22:27:52] carlosd: I need anything else so an automatic loading would occur?
[22:28:08] King_Rex: has joined #RubyOnRails
[22:28:20] matthewd: carlosd: Yes; you need to require it
[22:28:46] carlosd: Nice, thanks!
[22:29:05] Radar: GOOD MORNING
[22:29:17] dminuoso: GOOD EVENING.
[22:29:23] war_pigs: has joined #RubyOnRails
[22:29:27] Radar: night and day
[22:30:25] carlosd: But this don't appear to be an automatic loading :)
[22:30:29] hazelux: has joined #RubyOnRails
[22:34:49] rubyonrailed: has joined #RubyOnRails
[22:37:02] rubyonrailed: has joined #RubyOnRails
[22:37:38] cam27: has joined #RubyOnRails
[22:41:48] rubyonrailed: has joined #RubyOnRails
[22:44:04] rubyonrailed: has joined #RubyOnRails
[22:48:22] keerthana: has joined #RubyOnRails
[22:50:58] workmad3: has joined #RubyOnRails
[22:52:31] s2013: has joined #RubyOnRails
[22:54:02] sunya7a: hi...i seem to have trouble loading javascript files that have periods in their name using rails 5. is there a way around that or is the only way to replace with underscore? I tried putting quotes around it in application.js but noluck
[22:54:43] dminuoso: sunya7a: Just wait a day or two. Periods dont last longer that.
[22:54:49] sunya7a: dminuoso: =)
[22:55:00] Radar: sunya7a: what happens when you try to load this file?
[22:55:19] dminuoso: GOOD NIGHT RADAR
[22:55:21] sunya7a: Radar: rails says that it can't find the file
[22:55:33] Radar: sunya7a: what does it say exactly?
[22:55:36] dminuoso: boy writing in all caps really relieves stress.
[22:55:48] Radar: dminuoso: GOOD NIGHT
[22:56:03] sunya7a: Radar: couldn't find file 'jquery.mark.es6' with type 'application/javascript'
[22:56:36] sunya7a: Radar: it lists where it looks and i put it in /vendor/assets/javascripts. When i do the underscore substitution it works
[23:00:04] sunya7a: Radar: i see jquery.turbolinks in application.js .. so i don't understand why it doesn't like this one
[23:02:07] am55: has joined #RubyOnRails
[23:02:49] hazelux: has joined #RubyOnRails
[23:08:20] Radar: sunya7a: what is the file's full name, including the extension?
[23:08:36] Radar: It could be interpreting .es6 as part of the file's extension
[23:10:45] sunya7a: Radar: the full name is 'jquery.mark.es6.js'
[23:10:51] sunya7a: Radar: let me try removing es6
[23:11:57] sunya7a: Radar: yup...that's it
[23:15:56] jusa: has joined #RubyOnRails
[23:20:29] wethu: has joined #RubyOnRails
[23:26:03] Guest96: has joined #RubyOnRails
[23:27:03] byteflame: has joined #RubyOnRails
[23:27:06] byteflam1: has joined #RubyOnRails
[23:33:52] tdy: has joined #RubyOnRails
[23:36:24] s2013: has joined #RubyOnRails
[23:39:53] keerthana: has joined #RubyOnRails
[23:40:38] Omnilord: has joined #RubyOnRails
[23:43:03] fox_mulder_cp: has joined #RubyOnRails
[23:43:22] webdestroya: has joined #RubyOnRails
[23:43:59] uks: has joined #RubyOnRails
[23:45:24] aajjbb: has joined #RubyOnRails
[23:47:09] goodroot: has joined #RubyOnRails
[23:48:46] chouhoulis: has joined #RubyOnRails
[23:50:27] webdestroya: has joined #RubyOnRails
[23:58:13] uks: has joined #RubyOnRails