#RubyOnRails - 15 March 2018
« Back 1 day Forward 1 day »
[02:30:14] beingjohnm: trying to use fontawesome 5 but having trouble with production. When deploying it is adding the "fingerprint" to the end of the font filenames but the fontawesome scss file is not including the fingerprtinted version of the filenames. I tried using asset-url and font-url in the path. Those give me the correct path but don't add the fingerprinted filename.
[02:40:35] fryguy: it can serve as a basis for the right approach to use to integrate it with the asset pipeline
[04:55:23] Axsuul: Has anyone ever had their sidekiq workers just hang and work on jobs for tens of minutes? Any suggestions on how to debug this?
[05:16:33] syndikate: axsuul, is your job code working fine on local? Are the tests running fine for the job?
[05:17:36] syndikate: To the experience people here, relating to the discussion from last day. What approach would you guys take if you want to load a resource and eager load an association where in which you have to filter the eager loaded association only and not the parent resource?
[05:22:11] Axsuul: syndikate : yep it works fine, actually what's odd is it hangs like once a day, at random, I have to restart sidekiq and it works again
[05:23:18] andrewray: hmm, I think I *get* webpacker now, although it's still pretty scary that it touches the rails asset pipeline at all
[05:23:43] andrewray: after assets are compiled, does sprockets try to do *anything* to the assets? parse them, concat them, *anything*? I'm worried that might be the case and don't understand the internals
[05:48:23] syndikate: Radar axsuul here is a gist https://gist.github.com/anonymous/cf87039c33cc26cb01c67e430044ac9b
[05:49:03] Radar: I'm getting off at the next station so hopefully you'll be quick or axsuul can help you.
[05:50:56] syndikate: What I am aiming to get here is a all the employees and their leaves which are approved during a certain date
[05:51:54] syndikate: So if an employee who has a leave which is not approved say during the month of march, it should not be present given the date part passed is march
[05:58:59] syndikate: axsuul, oh okay. I don't know, I can't seem to figure this out with that. Let me think again for a bit
[06:19:25] syndikate: Radar, I can't show you the exact code, but I will try create a very similar one and share in sometime
[08:29:28] syndikate: JS people should actually make method names like smoosh for flatten, woosh for reduce etc. So they can go "just smoosh and woosh it"
[08:41:25] dminuoso: Radar: I have this thing in all my apps now: https://github.com/staltz/prevent-smoosh
[09:05:35] dminuoso: Radar: The point is to cause code that uses .smoosh in way that is incompatible to the TC39 proposal.
[11:10:31] Torrone: Hello, I have a js.erb file that loads data in json format and I tried to wrap the data loading in a <% cache %> block. Rails does not allow me to do it, I want to make sure that the database isn't hit every time I request that file in production. Do I need to worry about that? Can I trust Rails to pre-compile it as long as it is in the assets pipeline?
[11:28:18] Torrone: Hello, I have a js.erb file that loads data in json format and I tried to wrap the data loading in a <% cache %> block. Rails does not allow me to do it, I want to make sure that the database isn't hit every time I request that file in production. Do I need to worry about that? Can I trust Rails to pre-compile it as long as it is in the assets pipeline?
[12:34:14] snowcatman: hello, this i got a proble i dont understand how to fix. system admin question. how to run server corrected as root or as privileged?
[12:35:25] snowcatman: i am trying to get apache2 and passenger with ruby on rails to work. here are all my notes https://pastebin.com/0evRKfb8
[12:41:27] Sylario: snowcatman: I am not sure about passenger having problem with loading a gem, but it should not need minitest. In the gemfile minitest should be in tests only
[12:44:21] snowcatman: can you clerify please, i am new to this. should i get a pastben of my gemfile.
[12:48:14] Sylario: @snowcatman : minitest is only needed for the tests. In gemfile you should specify the gem is only needed for the test environnement
[12:52:34] Sylario: It may solve the passenger problem, or not, but ion any case minitest should not be loaded in produciton
[13:01:21] snowcatman: thank you for that clerification. um but seems there is already an entry. "group :development, :test do" at line line 385. i added to the pastebin. gem file at the bottem. lines 348 - 403 https://pastebin.com/gZTsJF7j what edit should i make?
[13:05:40] Sylario: well, I was wrong, it seems minitest is loaded via some dependency. YOu need to solve the apache passenger problem
[13:09:16] snowcatman: ya, i dont know how to do that yet. i am looking for the answer put dont know anough to be dangerous
[13:11:28] snowcatman: i guess i need to know how to check the permisions for the app and ruby on rails as well as apache2 and passenger, something like that
[13:13:20] Sylario: Also, check that the RVM gemset used is the same one when you bundle install and when passenger run ruby
[13:15:42] snowcatman: how do i do that?. were can i find a channel for that and what server? thank you for the help. unless you know how to do that.
[13:45:22] tycoon177: i just picked up simple_form this morning for the first time and have to say that i regret not picking it up beforehand
[14:49:52] drale2k_: Does anyone know of a Ruby terminal implementation for the browser? A local shell basically within the browser
[14:55:13] drale2k_: like this but it want to add it to a rails app http://paradoxxxzero.github.io/2014/02/28/butterfly.html
[14:56:59] Cork: is there a way to "see" the assosiated model before .new is done? (meaning it haven't set the reference object or id in the new object)
[15:06:40] tycoon177: also, what authorization libraries should i be using with rails 5? i'm rewriting a very old rails app (rails 2!!!) on rails 5 and don't know what auth libraries are the best right now. i've used cancan in the past, fwiw
[15:45:59] mustmodify: I filled out the form to join the Rails slack chanel ... am I supposed to get an email or something? It has been days.
[19:05:48] tycoon177: when using turbolinks, do i need to manage my js event handlers any differently? like, should i be using event delegation rather than directly putting the listeners on the objects?
[19:13:08] spohnz: I have a CRUD app with a nav-bar on the right. I am getting reports of when they add a lot of notes that the last button gets cut off
[19:15:28] spohnz: ok, crud is short for create, read, update, delete. I have a boot strap making those links into buttons. during testing it is reported that the buttons get cut off.
[19:26:34] mustmodify: @spohnz: I think the correct question is "can I limit the width of the other fields to make sure my page isn't longer than the viewport."
[20:56:39] espressocannon: Fetching selenium-webdriver 3.11.0 Retrying download gem from https://rubygems.org/ due to error (2/4): Gem::RemoteFetcher::UnknownHostError timed out (https://rubygems.org/gems/selenium-webdriver-3.11.0.gem)
[22:49:30] samort7: I have been moved off of my last Java project and am now working exclusively on three rails apps... I guess I'm a rails developer now.