« Back to channel list

#RubyOnRails - 18 March 2018

« Back 1 day Forward 1 day »
[00:00:20] ResidentBiscuit: has joined #RubyOnRails
[00:05:33] cagomez: has joined #RubyOnRails
[00:12:20] LambdaSource: has joined #RubyOnRails
[00:16:45] xuyuheng: has joined #RubyOnRails
[00:17:52] LambdaSource: has joined #RubyOnRails
[00:29:31] fcuk112: has joined #RubyOnRails
[00:36:54] xuyuheng: has joined #RubyOnRails
[00:45:02] LambdaSource: has joined #RubyOnRails
[00:48:03] gravity_pope: has joined #RubyOnRails
[00:50:50] fcuk112: has joined #RubyOnRails
[00:56:54] xuyuheng: has joined #RubyOnRails
[01:01:51] LambdaSource: has joined #RubyOnRails
[01:14:53] am55: has joined #RubyOnRails
[01:16:04] ponzii: has joined #RubyOnRails
[01:17:08] xuyuheng: has joined #RubyOnRails
[01:17:33] ponzii: When I switch some env variables in my .bashrc on my production server and restart my Rails app/Puma the app still seems to be using the old env variables. Why is this?
[01:20:38] za1b1tsu: has joined #RubyOnRails
[01:34:51] Omnilord: ponzii, try starting a new terminal session and restarting rails from there.
[01:37:02] xuyuheng: has joined #RubyOnRails
[01:40:09] ponzii: Omnilord: Is there any way of seeing which ENV variables Rails is using? Are ENV variables cached?
[01:41:17] ponzii: Omnilord: I checked the ENV vars with echo before restarting Puma so this shouldn't have happened.
[01:43:29] ponzii: Omnilord: Will Rails console give me Rails ENV vars or just read `env` from the shell?
[01:44:33] Omnilord: If you use a Rails console, you should be able to do a 'puts ENV.inspect' and see what is set.
[01:47:12] ponzii: Omnilord: Out of luck with Rails console. I'm running 5.2.0 RC1 and `bin/rail c` gives me an Active Record connection specification error.
[01:51:07] xuyuheng: has joined #RubyOnRails
[02:03:45] xuyuheng: has joined #RubyOnRails
[02:10:29] Omnilord: ponzii, I don't know if you would be able to get an output from rails server if you have an exception preventing the console from running.
[02:10:57] Omnilord: Is your application coming up and available over http?
[02:11:27] ponzii: Omnilord: I fixed it. Was using uri in database.yaml without specifying an adapter separately.
[02:12:21] ponzii: Omnilord: puts ENV.inspect just gives me the output of `env` in a Linux shell. Somehow my app seems to be getting different ENV variable values.
[02:13:56] ponzii: Omnilord: I have alternative ENV vars in .bashrc commented out but I've restarted the app since they were last used and they don't show up in `puts ENV.inspect`. Weird.
[02:14:43] Omnilord: do you have any gems like dotenv or envyable?
[02:15:01] ponzii: Omnilord: These particular ENV vars are email addresses for mailouts. Somehow Rails is mailing out to ENV vars which are commented out in my .bashrc.
[02:15:38] ponzii: Omnilord: Can Rails cache ENV vars?
[02:16:50] xuyuheng: has joined #RubyOnRails
[02:16:56] roca: has joined #RubyOnRails
[02:17:49] roca: has joined #RubyOnRails
[02:17:57] ponzii: Omnilord: No, don't have those gems.
[02:19:47] quazimodo: has joined #RubyOnRails
[02:22:42] Radar: [13:15:38] <ponzii> Omnilord: Can Rails cache ENV vars? <- no
[02:24:09] ponzii: Radar: I'm reading a SO post which mentions Spring not refreshing env changes.
[02:24:20] Radar: Spring doesn't run in a production environment.
[02:25:28] cstls: has joined #RubyOnRails
[02:26:33] ponzii: Radar: Yes, of course.
[02:27:16] Omnilord: Is `Rails.env.production?` true in the rails console?
[02:27:45] ponzii: Radar: Yes.
[02:29:20] xuyuheng: has joined #RubyOnRails
[02:33:03] alfiemax: has joined #RubyOnRails
[02:44:29] ebsen: has joined #RubyOnRails
[02:50:30] xuyuheng: has joined #RubyOnRails
[03:03:15] xuyuheng: has joined #RubyOnRails
[03:04:34] ponzii: Is it possible Rails is reading ENV vars which are commented-out in .bashrc?
[03:05:30] apparition: has joined #RubyOnRails
[03:09:11] cagomez: has joined #RubyOnRails
[03:16:02] xuyuheng: has joined #RubyOnRails
[03:18:10] alfiemax: has joined #RubyOnRails
[03:28:45] xuyuheng: has joined #RubyOnRails
[03:40:34] duderonomy: has joined #RubyOnRails
[03:41:57] xuyuheng: has joined #RubyOnRails
[03:45:57] alfiemax: has joined #RubyOnRails
[03:58:30] xuyuheng: has joined #RubyOnRails
[04:03:52] zacts: has joined #RubyOnRails
[04:04:46] lupine: has joined #RubyOnRails
[04:10:38] alfiemax: has joined #RubyOnRails
[04:11:07] xuyuheng: has joined #RubyOnRails
[04:13:50] LambdaSource: has joined #RubyOnRails
[04:14:48] alfiemax_: has joined #RubyOnRails
[04:23:58] xuyuheng: has joined #RubyOnRails
[04:25:14] trautwein: has joined #RubyOnRails
[04:26:11] cagomez: has joined #RubyOnRails
[04:34:52] timdotrb: has joined #RubyOnRails
[04:36:28] jcarl43: has joined #RubyOnRails
[04:37:32] timdotrb_: has joined #RubyOnRails
[04:39:59] kn-928: has joined #RubyOnRails
[04:40:51] xuyuheng: has joined #RubyOnRails
[04:59:32] xuyuheng: has joined #RubyOnRails
[05:19:03] xuyuheng: has joined #RubyOnRails
[05:35:13] Saukk: has joined #RubyOnRails
[05:36:06] KeyJoo: has joined #RubyOnRails
[05:43:12] alfiemax: has joined #RubyOnRails
[06:00:05] mikecmpbll: has joined #RubyOnRails
[06:01:53] quazimodo: has joined #RubyOnRails
[06:04:52] srinidhi: has joined #RubyOnRails
[06:28:00] kn-928: has joined #RubyOnRails
[06:29:08] kapil___: has joined #RubyOnRails
[06:39:02] ericmathison: has joined #RubyOnRails
[06:47:36] andrewray: has joined #RubyOnRails
[07:11:06] conta: has joined #RubyOnRails
[07:11:15] kies: has joined #RubyOnRails
[07:16:01] AntiSpamMeta_: has joined #RubyOnRails
[07:16:39] lipoqil: has joined #RubyOnRails
[07:17:01] ircmaxell: has joined #RubyOnRails
[07:17:06] Nucky: has joined #RubyOnRails
[07:17:09] mattwc_: has joined #RubyOnRails
[07:20:07] dmarr: has joined #RubyOnRails
[07:20:46] mr-spoon: has joined #RubyOnRails
[07:23:07] LightStalker: has joined #RubyOnRails
[07:26:39] kn-928: has joined #RubyOnRails
[07:29:28] russt: has joined #RubyOnRails
[07:29:45] spectra: has joined #RubyOnRails
[07:31:23] quazimodo: has joined #RubyOnRails
[07:41:43] reber: has joined #RubyOnRails
[07:49:24] Fusselgesicht: has joined #RubyOnRails
[08:23:04] sevenseacat: has joined #RubyOnRails
[08:36:39] diego1: has joined #RubyOnRails
[08:38:23] mtkd: has joined #RubyOnRails
[08:53:03] Ryzokuken: has joined #RubyOnRails
[09:35:39] marr: has joined #RubyOnRails
[09:39:59] duderonomy: has joined #RubyOnRails
[09:44:51] Saukk: has joined #RubyOnRails
[09:49:49] elcms: has joined #RubyOnRails
[10:07:07] cstls: has joined #RubyOnRails
[10:08:44] ^mtkd: has joined #RubyOnRails
[10:18:25] sameerynho: has joined #RubyOnRails
[10:24:59] mikecmpbll: has joined #RubyOnRails
[10:34:26] kapil___: has joined #RubyOnRails
[10:51:10] za1b1tsu: has joined #RubyOnRails
[10:57:36] pLaTo0n: has joined #RubyOnRails
[11:03:42] am55: has joined #RubyOnRails
[11:12:52] schneider: has joined #RubyOnRails
[11:15:26] xhoy: has joined #RubyOnRails
[11:17:00] xhoy: hi there, i have a new object, lets call it user, user is involed in almost all other models in my db, it createds stuff, it updates stuff, it deletest stuff, it does all kind of stuff, but there is no easy why of know what a user *all* did, since the actions are scadderd all over the place, should i reverse the relation and create a N:M model in the middle?
[11:40:01] duderonomy: has joined #RubyOnRails
[11:46:20] roshanavand: has joined #RubyOnRails
[11:46:42] Tempesta: has joined #RubyOnRails
[11:49:44] workmad3: has joined #RubyOnRails
[11:54:59] lupine: has joined #RubyOnRails
[11:56:17] LambdaSource: has joined #RubyOnRails
[12:01:03] defsdoor: has joined #RubyOnRails
[12:05:12] cstls: has joined #RubyOnRails
[12:09:07] Fernando-Basso: has joined #RubyOnRails
[12:17:38] ryan_ford: has joined #RubyOnRails
[12:24:52] schneider: has joined #RubyOnRails
[12:36:37] riotjones: has joined #RubyOnRails
[12:38:54] za1b1tsu: has joined #RubyOnRails
[12:40:42] deadnull: has joined #RubyOnRails
[12:44:03] sidx64: has joined #RubyOnRails
[12:50:15] desperek: has joined #RubyOnRails
[12:53:45] DTZUZO_: has joined #RubyOnRails
[12:55:33] apparition: has joined #RubyOnRails
[13:09:29] ryan_ford: has joined #RubyOnRails
[13:10:48] cstls: has joined #RubyOnRails
[13:22:00] roca: has joined #RubyOnRails
[13:26:04] Omnilord: xhoy, have you checked out the audited gem?
[13:30:30] hpfmn: has joined #RubyOnRails
[13:59:47] drale2k_: has joined #RubyOnRails
[13:59:51] sameerynho: has joined #RubyOnRails
[14:00:18] mtkd: has joined #RubyOnRails
[14:03:34] conta: has joined #RubyOnRails
[14:10:09] KeyJoo: has joined #RubyOnRails
[14:15:47] srinidhi: has joined #RubyOnRails
[14:23:15] arBmind: has joined #RubyOnRails
[14:27:12] roca: has joined #RubyOnRails
[14:38:00] antoine1: has joined #RubyOnRails
[14:47:11] antoine1: has joined #RubyOnRails
[15:14:03] gravity_pope: has joined #RubyOnRails
[15:22:24] rfoust: has joined #RubyOnRails
[15:25:42] roshanavand: has joined #RubyOnRails
[15:26:30] LambdaSource: has joined #RubyOnRails
[15:34:31] mtkd: has joined #RubyOnRails
[15:34:54] roca: has joined #RubyOnRails
[15:49:54] workmad3: has joined #RubyOnRails
[16:01:57] mtkd: has joined #RubyOnRails
[16:21:46] uksio: has joined #RubyOnRails
[16:24:59] segy_: has joined #RubyOnRails
[16:31:03] ryan_ford: has joined #RubyOnRails
[16:34:41] pLaTo0n: has joined #RubyOnRails
[16:43:38] AnotherOne: has joined #RubyOnRails
[16:44:33] AnotherOne: has joined #RubyOnRails
[16:54:22] DrYockel: has joined #RubyOnRails
[17:02:48] MasterAsia: has joined #RubyOnRails
[17:02:58] MasterAsia: Hey I'm having an issue with omniauth (redirect_uri is invalid)
[17:10:20] kn-928: has joined #RubyOnRails
[17:10:47] roshanavand: has joined #RubyOnRails
[17:13:16] rikkipitt: has joined #RubyOnRails
[17:18:15] rikkipitt: has joined #RubyOnRails
[17:24:06] segy: has joined #RubyOnRails
[17:25:12] cstls: has joined #RubyOnRails
[17:36:56] mikecmpbll: has joined #RubyOnRails
[17:40:33] orbyt_: has joined #RubyOnRails
[17:47:22] LambdaSource: has joined #RubyOnRails
[17:50:12] workmad3: has joined #RubyOnRails
[18:08:10] LambdaSource: has joined #RubyOnRails
[18:17:22] desperek: has joined #RubyOnRails
[18:17:33] LambdaSource: has joined #RubyOnRails
[18:20:19] rikkipitt: has joined #RubyOnRails
[18:36:15] cstls: has joined #RubyOnRails
[18:39:00] gravity_pope: has joined #RubyOnRails
[18:44:09] andrewray: has joined #RubyOnRails
[18:51:22] mtkd: has joined #RubyOnRails
[19:00:04] fox_mulder_cp: hi. i try to create alias for method in my plain ruby class, but have a exeption that no method defined. where i have a mistake?
[19:00:46] LambdaSource: has joined #RubyOnRails
[19:23:00] IanMalcolm: if I have an association like Foo has_many :bars, is there any way to do something like `Foo.new(bars: [1,2])`?
[19:23:19] IanMalcolm: i.e. passing a list of ids for the association instead of a list of AR objects
[19:28:56] fox_mulder_cp: Foo.bars.build(arr) some like this
[19:30:20] antoine1: has joined #RubyOnRails
[19:30:40] mtkd: has joined #RubyOnRails
[19:31:35] moei: has joined #RubyOnRails
[19:37:25] Dimik: has joined #RubyOnRails
[19:38:24] Diabolik: has joined #RubyOnRails
[19:43:26] ebsen: has joined #RubyOnRails
[19:47:06] das3in: has joined #RubyOnRails
[19:48:51] das3in: Hi everyone, I have a poro that listens to a serial port and has some functions to respond to that data. I want to be able to make a get request to call some of those functions (like "/average" => controller#average)
[19:49:10] das3in: What's the best way to access that service from my controller?
[19:50:26] workmad3: has joined #RubyOnRails
[19:50:33] das3in: I thought about writing a "start" endpoint that does something like "@bot = Service.new" but then I'm not sure how i'd access the same instance of @bot from other controller functions
[19:54:49] IanMalcolm: fox_mulder_cp: thanks. Another question: is this better than querying and passing the list of AR objects? Like `foos = Foo.where(baz: 5); Bar.new(foos: foos)`
[19:55:04] IanMalcolm: I'm trying to optimize a very large query here
[19:55:36] IanMalcolm: and I'm trying to see if doing `Foo.where(baz: 5).pluck(:id)` and passing that is better
[19:55:42] IanMalcolm: because Foo is rather large in this case
[20:01:28] mtkd: has joined #RubyOnRails
[20:03:43] IanMalcolm: has joined #RubyOnRails
[20:06:15] IanMalcolm: has joined #RubyOnRails
[20:11:49] cagomez: has joined #RubyOnRails
[20:14:19] ebsen: has joined #RubyOnRails
[20:15:09] sidx64: has joined #RubyOnRails
[20:23:14] roshanavand: has joined #RubyOnRails
[20:23:40] cstls: has joined #RubyOnRails
[20:26:45] LambdaSource: has joined #RubyOnRails
[20:30:07] LambdaSource: has joined #RubyOnRails
[20:33:42] duderonomy: has joined #RubyOnRails
[20:35:28] ebsen: has joined #RubyOnRails
[20:46:39] funnel: has joined #RubyOnRails
[20:51:08] LambdaSource: has joined #RubyOnRails
[20:54:17] _aeris_: has joined #RubyOnRails
[20:54:18] roshanavand: has joined #RubyOnRails
[20:56:31] roshanavand: has joined #RubyOnRails
[20:59:54] duderonomy: has joined #RubyOnRails
[21:00:52] roshanavand: has joined #RubyOnRails
[21:06:32] kapil___: has joined #RubyOnRails
[21:08:15] roshanavand: has joined #RubyOnRails
[21:12:00] roshanavand: has joined #RubyOnRails
[21:12:53] c0dec: has joined #RubyOnRails
[21:31:28] schneider: has joined #RubyOnRails
[21:31:40] LambdaSource: has joined #RubyOnRails
[21:31:41] cstls: has joined #RubyOnRails
[21:35:37] jcarl43: has joined #RubyOnRails
[21:47:21] Radar: ianmalcolm: Can you give us an example of where you're using that query?
[21:47:31] Radar: ianmalcolm: You might want to look at Active Record's merge.
[21:50:28] cagomez: has joined #RubyOnRails
[21:50:41] workmad3: has joined #RubyOnRails
[21:51:16] LambdaSource: has joined #RubyOnRails
[22:18:41] alfiemax: has joined #RubyOnRails
[22:18:42] LambdaSource: has joined #RubyOnRails
[22:21:29] LambdaSource: has joined #RubyOnRails
[22:28:22] cstls: has joined #RubyOnRails
[22:42:54] arBmind: has joined #RubyOnRails
[22:47:13] LambdaSource: has joined #RubyOnRails
[22:49:02] drale2k_: has joined #RubyOnRails
[22:56:23] alfiemax: has joined #RubyOnRails
[23:03:52] LambdaSource: has joined #RubyOnRails
[23:08:57] alfiemax: has joined #RubyOnRails
[23:10:45] dminuoso: ACTION pokes Radar with the same poking stick he used to poke sevenseacat with
[23:10:50] dminuoso: GOOD NIGHT>
[23:12:02] moei: has joined #RubyOnRails
[23:25:45] alfiemax: has joined #RubyOnRails
[23:27:46] jnollette: has joined #RubyOnRails
[23:38:45] alfiemax: has joined #RubyOnRails
[23:40:43] drale2k_: has joined #RubyOnRails
[23:42:00] roshanavand: has joined #RubyOnRails
[23:42:56] ebsen: has joined #RubyOnRails
[23:50:57] workmad3: has joined #RubyOnRails
[23:55:57] alfiemax: has joined #RubyOnRails