« Back to channel list

#RubyOnRails - 11 February 2019

« Back 1 day Forward 1 day »
[00:06:35] blackmesa1: has joined #RubyOnRails
[00:07:02] crankharder: has joined #RubyOnRails
[00:09:32] za1b1tsu: has joined #RubyOnRails
[00:16:59] conta: has joined #RubyOnRails
[00:30:56] octos: has joined #RubyOnRails
[00:33:04] orbyt_: has joined #RubyOnRails
[00:41:02] ariedler: has joined #RubyOnRails
[00:44:37] mikecmpbll: has joined #RubyOnRails
[00:53:53] kmckelvin: has joined #RubyOnRails
[01:05:03] barhum2013: has joined #RubyOnRails
[01:08:47] barhum2013: has joined #RubyOnRails
[01:09:57] za1b1tsu: has joined #RubyOnRails
[01:13:19] cnsvc: has joined #RubyOnRails
[01:22:01] tdy: has joined #RubyOnRails
[01:47:46] Technodrome: has joined #RubyOnRails
[02:05:57] GodFather_: has joined #RubyOnRails
[02:17:05] conta: has joined #RubyOnRails
[02:22:26] sevenseacat: has joined #RubyOnRails
[02:42:07] ariedler: has joined #RubyOnRails
[02:59:15] djuber: has joined #RubyOnRails
[03:27:34] gambl0r3: has joined #RubyOnRails
[03:36:51] apparition: has joined #RubyOnRails
[03:39:10] barhum2013: has joined #RubyOnRails
[03:43:36] djuber: has left #RubyOnRails: ("ERC (IRC client for Emacs 27.0.50)")
[03:45:33] barhum2013: has joined #RubyOnRails
[03:49:47] Saukk: has joined #RubyOnRails
[03:52:54] akosednar: has joined #RubyOnRails
[04:01:46] barhum2013: has joined #RubyOnRails
[04:05:51] barhum2013: has joined #RubyOnRails
[04:09:10] braincrash: has joined #RubyOnRails
[04:18:08] NeXTSUN: has joined #RubyOnRails
[04:23:42] lexileo: has joined #RubyOnRails
[04:34:56] barhum2013: has joined #RubyOnRails
[04:42:51] ariedler: has joined #RubyOnRails
[04:43:54] barhum2013: has joined #RubyOnRails
[05:20:00] tdy: has joined #RubyOnRails
[05:24:10] ariedler: has joined #RubyOnRails
[05:26:42] srinidhi: has joined #RubyOnRails
[05:48:39] gambl0r3: has joined #RubyOnRails
[06:18:04] conta: has joined #RubyOnRails
[06:29:23] jane_booty_doe: has joined #RubyOnRails
[06:50:52] catbusters: has joined #RubyOnRails
[07:16:35] za1b1tsu: has joined #RubyOnRails
[07:25:13] old_relik: has joined #RubyOnRails
[07:25:20] ariedler: has joined #RubyOnRails
[07:25:30] old_relik: is it recommended to memoize within activerecord models?
[07:25:47] old_relik: memoize expensive query results
[07:26:06] old_relik: like mapping over a function that makes a query
[07:28:35] Souvent22: has joined #RubyOnRails
[07:33:16] sandstrom: has joined #RubyOnRails
[07:46:40] Technodrome: has joined #RubyOnRails
[07:57:27] sevenseacat: unknown command 'oops sorry'
[07:59:23] kapil____: has joined #RubyOnRails
[08:09:08] baweaver: Qo 1.0.0 PR is out, any feedback is appreciated :D
[08:09:08] baweaver: https://github.com/baweaver/qo/pull/23
[08:22:25] mikecmpbll: has joined #RubyOnRails
[08:24:51] deathwishdave: has joined #RubyOnRails
[08:34:13] srinidhi: has joined #RubyOnRails
[08:34:58] ur5us: has joined #RubyOnRails
[08:54:56] Technodrome: has joined #RubyOnRails
[08:57:45] sandstrom: has joined #RubyOnRails
[09:01:44] mikecmpbll: has joined #RubyOnRails
[09:03:39] deathwishdave: has joined #RubyOnRails
[09:07:48] srinidhi: has joined #RubyOnRails
[09:17:00] Guest24944: has joined #RubyOnRails
[09:18:05] egray: has joined #RubyOnRails
[09:26:01] Ergo: has joined #RubyOnRails
[09:32:31] lxsameer: has joined #RubyOnRails
[09:33:35] catbusters: It's my first time deploying a Rails application. When I set RAILS_ENV to production, I get this error and the application errors out `ActionView::Template::Error (The asset "application.js" is not present in the asset pipeline.)`
[09:33:47] catbusters: I understand I need to precompile the assets?
[09:34:23] catbusters: `RAILS_ENV=production rails assets:precompile` like this, is that correct?
[09:34:54] tbuehlmann: looks about right
[09:35:53] catbusters: Okay. When I do this, the application starts working, but all the files from the public directory get `404`ed
[09:36:46] tbuehlmann: try starting the server with the RAILS_SERVE_STATIC_FILES environment variable set to "1"
[09:38:00] catbusters: That makes it work, thanks
[09:38:10] catbusters: But I guess that's not the recommended way of doing things?
[09:38:26] tbuehlmann: yup, you should consider having a reverse proxy in front of the application that directly serves files from the public directory
[09:39:29] tbuehlmann: or configure a CDN that serves the assets. I'd go with nginx as a reverse proxy, though. it has other benefits beside directly serving assets
[09:40:01] catbusters: I do have Nginx set up already
[09:41:51] tbuehlmann: great, you just need to configure it properly then
[09:47:21] beholders_eye: has joined #RubyOnRails
[09:47:58] DTZUZO: has joined #RubyOnRails
[09:49:05] ariedler: has joined #RubyOnRails
[09:56:37] catbusters: Figured it out, thanks for the help tbuehlmann
[09:56:56] tbuehlmann: you're welcome!
[10:16:29] apparition: has joined #RubyOnRails
[10:17:03] sandstrom: has joined #RubyOnRails
[10:24:19] lxsameer: has joined #RubyOnRails
[10:29:12] Technodrome: has joined #RubyOnRails
[10:38:55] ldnunes: has joined #RubyOnRails
[10:48:44] conta: has joined #RubyOnRails
[11:10:16] jane_booty_doe: has joined #RubyOnRails
[11:11:00] Technodrome: has joined #RubyOnRails
[11:14:34] catbusters: I'm facing a problem with ActiveStorage only in production. The image links that are produced result in 404s (using S3, and they do get uploaded in the bucket, I checked)
[11:15:06] catbusters: I did `ActiveStorage::Blob.find_signed`
[11:15:18] catbusters: Got this `#<ActiveStorage::Blob id: 7, key: "VBmLQMxmroSDt1zkwYXxn7S3", filename: "WD2.jpg", content_type: "image/jpeg", metadata: {"identified"=>true, "width"=>1698, "height"=>898, "analyzed"=>true}, byte_size: 316932, checksum: "H60SeSt+Df8IB7vIjb1YhA==", created_at: "2019-02-11 10:54:32">`
[11:22:49] tbuehlmann: how do you generate the links? can you gist the server log for these requests?
[11:27:25] catbusters: `image_tag(url_for(f.object.cover_image))` in formtastic
[11:28:13] catbusters: When I did the same thing locally it had worked
[11:29:54] tbuehlmann: looks good to me
[11:32:20] catbusters: I'm getting an nginx 404 error, opening the link doesn't add anything to `production.log`
[11:34:20] tbuehlmann: ah, so it's probably the nginx configuration?
[11:35:58] catbusters: Yeah I got it
[11:36:14] catbusters: The previous rule I had set for the public folder assets not loading
[11:36:27] catbusters: It was intercepting the active_storage path
[11:38:42] wethu: has joined #RubyOnRails
[11:39:39] catbusters: I can't figure out what to do with the nginx config though
[11:40:39] catbusters: https://bpaste.net/show/62e5f222e2ec
[11:41:13] catbusters: If I remove the images block the files in the public folder don't load, and if I add it in, active_storage files don't load
[11:46:38] tbuehlmann: you could start by just having a config for /assets
[11:49:23] tbuehlmann: (and probably /packs)
[11:51:31] lankanmon: has joined #RubyOnRails
[11:55:00] catbusters: Okay I figured it out
[11:55:07] ariedler: has joined #RubyOnRails
[11:55:31] v01d4lph4: has joined #RubyOnRails
[12:06:49] sandstrom: has joined #RubyOnRails
[12:35:50] syndikate: Anybody used parallel_tests gem with database_cleaner to run capybara tests? I am running into issue in my pipeline where it gets stuck and not exiting eventually pipeline has to time out
[12:35:57] syndikate: Not sure where to start debugging from
[12:39:04] catbusters: Why does Spring keep regenerating Gemfile.lock? Gave me a literal headache with so many merge conflicts
[12:43:52] tbuehlmann: catbusters: spring shouldn't generate that file, bundle install should
[12:45:12] catbusters: Well I was trying to do a git pull, but it kept saying Gemfile.lock had changed. I tried it so many times to revert the changes, but each time I would, it'd get changed again. I tried deleting it, but it came back again.
[12:45:23] catbusters: Finally I did bin/spring stop and it started working
[12:49:37] tbuehlmann: regardless of whether spring was responsible for this, I can't recommend enough to not use spring at all
[12:58:19] catbusters: What should be used isntead?
[13:00:02] tbuehlmann: spring just tries to speed up your rails processes. if you don't use spring, it'll work nontheless
[13:06:45] defsdoor: has joined #RubyOnRails
[13:25:39] srinidhi: has joined #RubyOnRails
[13:36:15] Souvent22: has joined #RubyOnRails
[13:38:04] srinidhi: has joined #RubyOnRails
[13:44:17] status402: has joined #RubyOnRails
[13:56:42] davidh38: has joined #RubyOnRails
[14:23:44] bga57: has joined #RubyOnRails
[14:24:52] eclm: has joined #RubyOnRails
[14:29:13] tdy: has joined #RubyOnRails
[14:51:24] Jervis_: has joined #RubyOnRails
[14:52:31] Souvent22: has joined #RubyOnRails
[15:12:02] octos: has joined #RubyOnRails
[15:33:13] jgpawletko: has joined #RubyOnRails
[16:25:06] segy: has joined #RubyOnRails
[16:29:32] gambl0r3: has joined #RubyOnRails
[16:30:23] orbyt_: has joined #RubyOnRails
[16:36:06] conta: has joined #RubyOnRails
[16:47:01] segy: has joined #RubyOnRails
[17:01:15] dviola: has joined #RubyOnRails
[17:02:08] tdy: has joined #RubyOnRails
[17:10:51] conta: has joined #RubyOnRails
[17:12:31] old_relik: has joined #RubyOnRails
[17:17:50] old_relik: is there a way to do rails association if the association is not on either id col, for eg, Model A has_many Model B. Model B knows about A with a custom col call a_uuid and uses a custom column on A call real_a_id
[17:19:43] orbyt_: has joined #RubyOnRails
[17:21:36] Dbugger: has joined #RubyOnRails
[17:24:59] [Butch]: has joined #RubyOnRails
[17:29:39] segy: has joined #RubyOnRails
[17:32:04] v01d4lph4: has joined #RubyOnRails
[17:34:12] orbyt_: has joined #RubyOnRails
[17:37:55] conta: has joined #RubyOnRails
[17:40:51] maryo: has joined #RubyOnRails
[17:46:12] srinidhi: has joined #RubyOnRails
[17:51:07] ravenousmoose: has joined #RubyOnRails
[17:54:23] agent_white: has joined #RubyOnRails
[17:56:46] old_relik: has joined #RubyOnRails
[17:57:46] old_relik: I actually got it to work: has_many model_b -> (model_a) { where(a_uuid: model_a.real_a_id) }, foriegn_key: 'a_uuid'
[17:58:19] old_relik: but it puts a random model_b.a_uuid IS NULL in my query
[17:58:34] old_relik: I have no idea why
[17:59:03] old_relik: when I do ModelA.first.model_bs
[18:01:55] Saukk: has joined #RubyOnRails
[18:02:45] dachinat: has joined #RubyOnRails
[18:03:26] dachinat: hello. have you used Emotion with React rails?
[18:04:10] Souvent22: has joined #RubyOnRails
[18:05:09] maryo: has joined #RubyOnRails
[18:07:51] duderonomy: has joined #RubyOnRails
[18:14:10] davidh38: has joined #RubyOnRails
[18:25:10] dachinat: ok i switched to styled-components. i recommend it.
[18:26:19] mikecmpbll: has joined #RubyOnRails
[18:28:24] roshanavand1: has joined #RubyOnRails
[18:29:56] roshanavand1: has joined #RubyOnRails
[18:31:22] roshanavand1: has joined #RubyOnRails
[18:31:24] fmccann: has joined #RubyOnRails
[18:33:05] roshanavand1: has joined #RubyOnRails
[18:34:05] Souvent22: has joined #RubyOnRails
[18:34:37] roshanavand1: has joined #RubyOnRails
[18:38:01] ravenousmoose: has joined #RubyOnRails
[18:39:03] davidh38: has joined #RubyOnRails
[18:41:23] lxsameer: has joined #RubyOnRails
[18:44:21] markit: has joined #RubyOnRails
[18:45:42] gambl0r3: has joined #RubyOnRails
[18:53:20] ravenousmoose: has joined #RubyOnRails
[18:58:22] borodin: has joined #RubyOnRails
[18:58:31] roshanavand1: has joined #RubyOnRails
[19:05:13] reber: has joined #RubyOnRails
[19:05:40] reber__: has joined #RubyOnRails
[19:07:05] conta: has joined #RubyOnRails
[19:09:22] sandstrom: has joined #RubyOnRails
[19:09:44] Linuus`: has joined #RubyOnRails
[19:12:53] Puppet`: has joined #RubyOnRails
[19:14:16] davidh38: has joined #RubyOnRails
[19:28:09] DTZUZO: has joined #RubyOnRails
[19:34:07] orbyt_: has joined #RubyOnRails
[19:36:51] segy: has joined #RubyOnRails
[19:41:59] borodin: has joined #RubyOnRails
[19:43:25] Souvent22: has joined #RubyOnRails
[19:51:41] Linuus`: has joined #RubyOnRails
[19:54:52] catbusters: I'm facing this really weird issue. I've got a form and I'm trying to listen to `ajax:success`
[19:55:01] catbusters: Works perfectly on desktop doesn't work at all on mobile
[19:55:29] catbusters: Is Turbolinks to blame?
[19:57:04] Souvent22: has joined #RubyOnRails
[19:57:20] conta: has joined #RubyOnRails
[19:59:04] greengriminal: has joined #RubyOnRails
[19:59:36] greengriminal: Hey all quick question regarding Arel. I have the following: https://gist.github.com/davidpatters0n/68d034b9f8800f0b7432eed6dc5faa25 and am getting the following error: `Arel::Visitors::UnsupportedVisitError: Unsupported argument type: Symbol. Construct an Arel node instead.` when I call .to_sql on it.
[20:01:13] greengriminal: any idea on what I'm doing wrong here?
[20:04:32] v01d4lph4: has joined #RubyOnRails
[20:07:13] reber__: has joined #RubyOnRails
[20:08:11] reber: has joined #RubyOnRails
[20:15:01] segy: has joined #RubyOnRails
[20:17:33] planigan: has joined #RubyOnRails
[20:18:25] Fernando-Basso: has joined #RubyOnRails
[20:27:04] roshanavand1: has joined #RubyOnRails
[20:27:41] Puppet`: has joined #RubyOnRails
[20:32:14] davidh38: has joined #RubyOnRails
[20:32:55] Technodrome: has joined #RubyOnRails
[20:38:23] cnsvc: has joined #RubyOnRails
[20:39:22] ravenousmoose: has joined #RubyOnRails
[20:41:37] work_: has joined #RubyOnRails
[20:47:16] Puppet`: has joined #RubyOnRails
[20:50:49] Puppet`: has joined #RubyOnRails
[20:59:06] orbyt_: has joined #RubyOnRails
[21:02:06] segy: has joined #RubyOnRails
[21:02:55] Linuus`: has joined #RubyOnRails
[21:08:05] Souvent22_: has joined #RubyOnRails
[21:11:25] colypso: has joined #RubyOnRails
[21:11:57] conta: has joined #RubyOnRails
[21:28:19] Dbugger: Hi everyone. I am doing a fresh new Rails project (5.2.2) and when I start the server I get this message: "Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? can't activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0."
[21:28:47] Dbugger: I assume that the Gemfile that comes out-of-the-box when creating a new Rails system is correct, so what am I missing then?
[21:30:26] colypso: has joined #RubyOnRails
[21:31:13] Souvent22_: has joined #RubyOnRails
[21:31:35] colypso: has joined #RubyOnRails
[21:36:26] ur5us: has joined #RubyOnRails
[21:37:31] Technodrome: has joined #RubyOnRails
[21:42:19] colypso: has joined #RubyOnRails
[21:44:55] colypso: has joined #RubyOnRails
[22:01:57] IGnorAND: anyone know a rails api app which I can study? Most 'examples' I see seem to just expose the database tables. Hardly seems like an api. Obviously you can work, but then 'fat' models make no sense as most logic almost goes to the view
[22:12:29] akosednar: has joined #RubyOnRails
[22:18:17] orbyt_: has joined #RubyOnRails
[22:30:41] conta: has joined #RubyOnRails
[22:46:38] colypso: has joined #RubyOnRails
[22:52:34] orbyt_: has joined #RubyOnRails
[23:15:18] mikecmpbll: has joined #RubyOnRails
[23:27:23] greengriminal: has joined #RubyOnRails
[23:32:53] Souvent22: has joined #RubyOnRails
[23:33:17] quazimodo: has joined #RubyOnRails
[23:40:38] argoneus_: has joined #RubyOnRails
[23:40:56] aeffle: has joined #RubyOnRails
[23:51:31] spectra: has joined #RubyOnRails
[23:51:42] ghormoon: has joined #RubyOnRails
[23:52:06] FastJack: has joined #RubyOnRails
[23:55:39] bruul: has joined #RubyOnRails
[23:55:39] stretchlimo: has joined #RubyOnRails
[23:58:25] Puffball: has joined #RubyOnRails