« Back to channel list

#RubyOnRails - 05 April 2018

« Back 1 day Forward 1 day »
[00:02:02] HoierM: has joined #RubyOnRails
[00:02:22] cagomez: has joined #RubyOnRails
[00:18:48] ur5us: has joined #RubyOnRails
[00:25:48] fourcolors: has joined #RubyOnRails
[00:26:38] ur5us: has joined #RubyOnRails
[00:33:58] ur5us: has joined #RubyOnRails
[00:46:14] sunya7a__: has joined #RubyOnRails
[00:46:48] sung_: has joined #RubyOnRails
[00:49:43] trautwein_: has joined #RubyOnRails
[00:50:02] hfp__work: has joined #RubyOnRails
[00:50:06] tomaw_: has joined #RubyOnRails
[00:50:43] LenPayne: has joined #RubyOnRails
[00:54:48] michael_mbp: has joined #RubyOnRails
[00:56:05] qyliss: has joined #RubyOnRails
[00:58:20] shenghi: has joined #RubyOnRails
[00:59:23] WalterPeck: has joined #RubyOnRails
[01:00:48] Alchemical: has joined #RubyOnRails
[01:04:38] kn-928: has joined #RubyOnRails
[01:07:28] duderonomy: has joined #RubyOnRails
[01:25:10] beingjohnm: has joined #RubyOnRails
[01:40:20] fourcolors: has joined #RubyOnRails
[02:02:11] workmad3: has joined #RubyOnRails
[02:03:46] segy: has joined #RubyOnRails
[02:14:33] fourcolors: has joined #RubyOnRails
[02:15:59] kapil___: has joined #RubyOnRails
[02:20:45] darkhanb: has joined #RubyOnRails
[02:27:09] uks: has joined #RubyOnRails
[02:51:58] beingjohnm: has joined #RubyOnRails
[02:55:45] uksio: has joined #RubyOnRails
[03:00:47] beingjohnm: has joined #RubyOnRails
[03:20:34] Saukk: has joined #RubyOnRails
[03:21:44] alfiemax: has joined #RubyOnRails
[03:25:15] harrycs: has joined #RubyOnRails
[03:26:30] bga57: has joined #RubyOnRails
[03:27:57] harrycs: has joined #RubyOnRails
[03:29:56] harrycs: has joined #RubyOnRails
[03:30:16] DTZUZO: has joined #RubyOnRails
[03:36:01] Dimik: has joined #RubyOnRails
[03:37:33] fourcolors: has joined #RubyOnRails
[03:41:37] alfiemax: has joined #RubyOnRails
[03:53:54] harrycs: has joined #RubyOnRails
[03:55:54] harrycs: has joined #RubyOnRails
[03:57:59] harrycs: has joined #RubyOnRails
[03:59:53] harrycs: has joined #RubyOnRails
[04:01:54] harrycs: has joined #RubyOnRails
[04:13:08] fourcolors: has joined #RubyOnRails
[04:24:03] ur5us: has joined #RubyOnRails
[04:36:04] srinidhi: has joined #RubyOnRails
[04:45:47] cschneid_: has joined #RubyOnRails
[04:48:00] hndk: has joined #RubyOnRails
[04:49:39] GodFather: has joined #RubyOnRails
[05:01:02] _aeris_: has joined #RubyOnRails
[05:01:20] reber: has joined #RubyOnRails
[05:02:28] jnollette: has joined #RubyOnRails
[05:06:54] cam27: has joined #RubyOnRails
[05:23:01] cam27: How do I find a project to work on? An open source one.
[05:28:08] Radar: cam27: https://github.com/radar/hanami-twist
[05:29:24] babykosh: has joined #RubyOnRails
[05:30:05] conta: has joined #RubyOnRails
[05:43:32] cam27: There’s no read me for this Radar, but I’m in
[05:43:53] Radar: I need some tests written for the graphql endpoint.
[05:43:59] Radar: Can you do that? :D
[05:48:19] Radar: cam27: What do you want to gain by contributing to an open source project?
[05:49:54] cam27: Experience, keep me developing, maybe a job. (I got a job in a Casino working on slot machines) So I don’t want to get reusty from coding
[05:50:05] kn-928: has joined #RubyOnRails
[05:51:18] Radar: OK, well I can provide the project and some advice on what you can do to improve if you can provide the code :)
[05:52:15] cam27: I’ll try, I read about Rspec and all of that, but never been asked to do it, but I’m sure I can
[05:53:02] cam27: Actually I have some Lynda videos on it (using let and things) RSpec, Cucumber, etc
[06:22:50] fourcolors: has joined #RubyOnRails
[06:39:19] dionysus69: has joined #RubyOnRails
[06:46:47] Radar: cam27: I added a README if that will help.
[06:53:08] dionysus69: hey all, I came across this yesterday
[06:53:09] dionysus69: https://github.com/excid3/jumpstart
[06:53:16] dionysus69: has anyone here used this template?
[06:53:24] dionysus69: template.rb in repo
[06:55:59] tbuehlmann: dionysus69: just by looking at what gems it adds to the gemfile: nopedinope
[06:56:05] fourcolors: has joined #RubyOnRails
[06:57:31] dionysus69: tbuehlmann: that's what I wanted to ask about, the gems, which ones should I give shot to, thing is I am starting a new project and i am making a bit of a research before I get started.
[06:57:44] fourcolors: has joined #RubyOnRails
[06:57:52] dionysus69: two main things I am looking at atm are administrate and webpack
[06:58:04] dionysus69: I dont really like activeadmin
[06:58:46] dminuoso: tbuehlmann: Look you can make cool websites by just adding a bunch of random stuff to your Gemfile.
[06:58:49] dminuoso: Declarative programming!
[06:59:05] dionysus69: and as for webpack, it is still vague on what it does exactly and what rails parts would become obsolete if I decide to use it. for example, uglifier would not work with webpack, other parts maybe?
[06:59:07] tbuehlmann: I don't use any administration gem, I always recommend implementing that yourself
[06:59:40] dminuoso: Some people are under the mistaken impression that you dont need to have coding skills to write websites.
[06:59:47] dionysus69: ok done, I have done that actually for my past app, I am just working on app that some studio made while ago, and it uses activeadmin
[07:00:10] dminuoso: My condolences.
[07:01:21] dionysus69: so what about webpack in rails context?
[07:01:36] dionysus69: there's webpack and webpacker, which one should I look at for?
[07:02:26] tbuehlmann: I have some must-have gems that I always use, depending on what's needed though. like, I always add pry-rails, or slim (when in need of a template engine), or rspec-rails
[07:10:00] dminuoso: dionysus69: depends. webpacker is cancer to customize
[07:10:09] dminuoso: but webpack is not tied into any asset management.
[07:10:35] dminuoso: (and that's ignoring the pure webpack itself is)
[07:13:21] cam27: has left #RubyOnRails: ()
[07:18:24] defsdoor: has joined #RubyOnRails
[07:24:06] srinidhi: has joined #RubyOnRails
[07:26:08] dionysus69: dminuoso: roger that :)
[07:26:43] DTZUZO: has joined #RubyOnRails
[07:32:52] uks: has joined #RubyOnRails
[07:36:27] cam27_: has joined #RubyOnRails
[07:42:18] apeiros: has joined #RubyOnRails
[07:49:05] schneider: has joined #RubyOnRails
[07:49:06] elcms: has joined #RubyOnRails
[07:50:03] kn-928: has joined #RubyOnRails
[07:56:16] lunarkitty7: has joined #RubyOnRails
[08:10:44] mikecmpbll: has joined #RubyOnRails
[08:10:51] tfitts: has joined #RubyOnRails
[08:12:03] fox_mulder_cp: has joined #RubyOnRails
[08:12:08] Psy-Q: has joined #RubyOnRails
[08:12:12] elcms: has joined #RubyOnRails
[08:12:20] tjbp_: has joined #RubyOnRails
[08:13:48] arooni: has joined #RubyOnRails
[08:14:11] fl4sh_: has joined #RubyOnRails
[08:14:20] ur5us: has joined #RubyOnRails
[08:14:31] Vircung: has joined #RubyOnRails
[08:15:23] tdy: has joined #RubyOnRails
[08:16:48] arooni: has joined #RubyOnRails
[08:18:37] srinidhi: has joined #RubyOnRails
[08:21:11] tdy: has joined #RubyOnRails
[08:21:35] Cork: has joined #RubyOnRails
[08:27:43] ellcs: has joined #RubyOnRails
[08:31:29] shtirlic: has joined #RubyOnRails
[08:32:03] Cork: has joined #RubyOnRails
[08:32:43] Psy-Q: has joined #RubyOnRails
[08:33:16] arooni: has joined #RubyOnRails
[08:33:51] ur5us: has joined #RubyOnRails
[08:37:40] DrYockel: has joined #RubyOnRails
[08:50:31] Ergo: has joined #RubyOnRails
[08:54:16] fourcolors: has joined #RubyOnRails
[08:54:46] jtperreault: has joined #RubyOnRails
[08:58:03] arthurwozniak: has joined #RubyOnRails
[08:58:26] arthurwozniak: Hi guys, I have a problem with attaching after_create_commit callback to my model. Code snippet is here https://pastebin.com/w64DhhSv . Problem is, that in controller I'm updating Customer class and its related orders (connecctable only by customer hash due to GDPR, so I have to update all of them). IMHO this should be done in transaction, as written in the code.
[08:59:34] arthurwozniak: Another thing is, that I want to run specific action after creating Customer record. Again, I assume that creating user can fail, so I think it should be called in after_create_commit callback.
[09:00:42] EXCHGR: has joined #RubyOnRails
[09:00:48] arthurwozniak: Registering action to mentioned callback raises rollback when calling update_all on Customer instance. When I change callback to after_create (which I don't want to) or remove it completely, no rollback or error is raised
[09:01:47] arthurwozniak: Unfortunatelly I'm stucked with debugging and don't know how to move on with this. Yes, it can be "workarounded", but I think that approach with using after_create_commit callback is correct
[09:14:16] rikkipitt: has joined #RubyOnRails
[09:21:00] fourcolors: has joined #RubyOnRails
[09:33:06] fourcolors: has joined #RubyOnRails
[09:53:47] srinidhi: has joined #RubyOnRails
[09:55:52] ur5us: has joined #RubyOnRails
[10:06:27] workmad3_: has joined #RubyOnRails
[10:22:15] marr: has joined #RubyOnRails
[10:29:55] Puffball_: has joined #RubyOnRails
[10:34:19] KeyJoo: has joined #RubyOnRails
[10:46:02] babykosh: has joined #RubyOnRails
[10:49:00] ur5us: has joined #RubyOnRails
[10:49:00] drale2k_: has joined #RubyOnRails
[10:49:42] babykosh: has joined #RubyOnRails
[10:52:38] hfp_work: has joined #RubyOnRails
[10:55:46] ur5us: has joined #RubyOnRails
[11:00:30] srinidhi: has joined #RubyOnRails
[11:01:52] mikecmpbll: has joined #RubyOnRails
[11:18:56] Fernando-Basso: has joined #RubyOnRails
[11:20:57] Cavallari: has joined #RubyOnRails
[11:26:31] schneider: has joined #RubyOnRails
[11:28:23] Cavallari: has joined #RubyOnRails
[11:37:51] nertzy: has joined #RubyOnRails
[11:37:58] babykosh: has joined #RubyOnRails
[11:42:46] ur5us: has joined #RubyOnRails
[11:54:13] Dimik: has joined #RubyOnRails
[12:02:09] fourcolors: has joined #RubyOnRails
[12:25:21] wethu: has joined #RubyOnRails
[12:28:11] ellcs: has joined #RubyOnRails
[12:31:47] soule: has joined #RubyOnRails
[12:32:33] duderonomy: has joined #RubyOnRails
[12:44:59] drale2k_: has joined #RubyOnRails
[13:20:52] kn-928: has joined #RubyOnRails
[13:22:29] hammer065: has joined #RubyOnRails
[13:27:01] duderonomy: has joined #RubyOnRails
[13:31:14] rfoust: has joined #RubyOnRails
[13:31:57] WalterPeck: has joined #RubyOnRails
[14:01:10] workmad3: has joined #RubyOnRails
[14:16:05] chouhoulis: has joined #RubyOnRails
[14:35:31] mikecmpb_: has joined #RubyOnRails
[14:37:22] keegnotrub: has joined #RubyOnRails
[14:50:24] mikecmpbll: has joined #RubyOnRails
[14:50:46] one_zero: has joined #RubyOnRails
[15:00:44] rikkipitt: has joined #RubyOnRails
[15:10:08] ephemer0l: has joined #RubyOnRails
[15:23:42] Scient: has joined #RubyOnRails
[15:26:12] jcarl43: has joined #RubyOnRails
[15:27:09] apeiros: has joined #RubyOnRails
[15:32:14] cagomez: has joined #RubyOnRails
[15:34:31] beingjohnm: Been pulling my hair out with something for the past couple of hours: https://gist.github.com/global001/13c241f57a74be0b46f669b76dca409b
[15:34:34] kn-928: has joined #RubyOnRails
[15:35:03] schneider: has joined #RubyOnRails
[15:38:33] apeiros: has joined #RubyOnRails
[15:43:18] ebsen: has joined #RubyOnRails
[15:46:16] conta: has joined #RubyOnRails
[15:49:29] cagomez: what is the natural sort for ActiveModels?
[16:07:26] kevinburke: has joined #RubyOnRails
[16:10:02] beingjohnm: anybody want to help a brother keep his hair and let me know while this view loop prints out what is inside an if statement regardless? https://gist.github.com/global001/13c241f57a74be0b46f669b76dca409b
[16:10:11] ebsen: has joined #RubyOnRails
[16:19:17] Fernando-Basso: has joined #RubyOnRails
[16:21:44] alfiemax: has joined #RubyOnRails
[16:24:43] rikkipitt: has joined #RubyOnRails
[16:29:36] drale2k_: has joined #RubyOnRails
[16:31:34] darkhanb: has joined #RubyOnRails
[16:32:15] kevinburke: So, I'm working on a Rails app for the first time (yay), and I notice it's taking about 20-25 seconds for Rails to start up (boo). Say I wanted to figure out which components were taking the most time in startup, and/or print out e.g. "loading models - 5 seconds", "loading controllers - 5 seconds" etc.
[16:32:20] kevinburke: Where should I start looking/reading?
[16:33:39] thomasfedb: kevinburke, start up time is a problem why?
[16:34:00] thomasfedb: kevinburke, if it's a vanilla app it's probably not something you're going to be able to reduce
[16:34:31] kevinburke: I guess 20 seconds is a long time to wait to get feedback when e.g. you change a test file. in a Go app I wrote recently the entire suite of database tests compiled and completed in about 1 second.
[16:34:41] kevinburke: It's an existing application not a vanilla Rails app. About 100 models.
[16:36:37] thomasfedb: kevinburke, loading files generally takes the most time, so that'll do it
[16:37:14] thomasfedb: kevinburke, you can use spring to keep the framework loaded and just reload code for each test run
[16:38:00] thomasfedb: kevinburke, np
[16:38:25] MasterAsia: Is there a difference between module X class Ycontroller end end vs class x::ycontroller end
[16:39:01] MasterAsia: kevinburke, look into using spring
[16:39:07] thomasfedb: masterasia, not that I'm aware of
[16:39:32] MasterAsia: oh it was already mentioned
[16:39:41] thomasfedb: masterasia, though I think `class A::B; end` will fail if A doesn't already exist
[16:39:50] thomasfedb: 2.5.1 :001 > class A::B::C; end
[16:39:50] thomasfedb: NameError: uninitialized constant A
[16:40:17] thomasfedb: masterasia, though Rails will handle that for you when loading nested files methinks
[16:40:43] thomasfedb: masterasia, I've always gone with Foo::BarController
[16:41:48] MasterAsia: I think it is better to use the explicit style
[16:41:50] MasterAsia: just in case
[16:41:56] MasterAsia: even though foo::bar looks better
[16:41:58] thomasfedb: masterasia, in case what?
[16:42:14] MasterAsia: > NameError: uninitialized constant A
[16:42:15] alfiemax: has joined #RubyOnRails
[16:42:32] thomasfedb: masterasia, that was in irb, in 99% certain it's handled in Rails
[16:42:46] thomasfedb: masterasia, it's not gonna suddenly break in prod
[16:45:01] thomasfedb: did you work it out beingjohnm
[16:46:15] mtkd: has joined #RubyOnRails
[16:46:44] markoa: has joined #RubyOnRails
[16:50:41] beingjohnm: thomasfedb: no...
[16:51:06] markoa: hi everyone, I just co-published my first (free) ebook and it's about outside-in testing, check it out on https://semaphoreci.com/ebooks/rails-testing-handbook
[16:51:10] thomasfedb: beingjohnm, I'd add some debugs in there if I was trying to work it out
[16:51:19] alfiemax: has joined #RubyOnRails
[16:51:50] spohnz: has joined #RubyOnRails
[16:52:38] pLaTo0n: has joined #RubyOnRails
[16:52:42] beingjohnm: I did. And it seems to be testing the even/odd correctly based on the debugs. The issue seems to be a quirk of views or something.
[16:53:02] beingjohnm: I feel like I came across this a couple of years ago but can't remember exactly what the issue was.
[16:54:07] thomasfedb: beingjohnm, can you rewrite as <%= "<tr>" if i % 2 == 0 %> ?
[16:54:46] beingjohnm: I'll try that
[16:57:33] beingjohnm: that resulted in some strange behaviour. It put all of them on one row (inside of <tr></tr>) with the other four rows appearing empty and outside of the table
[16:58:41] thomasfedb: did you do the same for </tr> ?
[16:59:27] ebsen: has joined #RubyOnRails
[16:59:53] thomasfedb: beingjohnm, maybe try compiling your template to ruby code to see what's going on: https://ruby-doc.org/stdlib-2.5.0/libdoc/erb/rdoc/ERB.html
[17:05:09] duderonomy: has joined #RubyOnRails
[17:06:34] beingjohnm: thomasfedb: this is going to be helpful with debugging. thanks.
[17:07:18] thomasfedb: beingjohnm: np
[17:14:55] npgm: has joined #RubyOnRails
[17:17:24] _aeris_: has joined #RubyOnRails
[17:26:06] _aeris_: has joined #RubyOnRails
[17:30:25] mikecmpbll: has joined #RubyOnRails
[17:33:31] bphogan: has joined #RubyOnRails
[17:41:18] orbyt_: has joined #RubyOnRails
[17:45:51] darkhanb: has joined #RubyOnRails
[18:07:01] elcms: has joined #RubyOnRails
[18:12:18] keegnotrub: has joined #RubyOnRails
[18:12:36] drale2k_: has joined #RubyOnRails
[18:20:56] sameerynho: has joined #RubyOnRails
[18:25:44] schneider: has joined #RubyOnRails
[18:40:06] orbyt_: has joined #RubyOnRails
[18:44:17] CGibsonmm: has joined #RubyOnRails
[18:49:04] CGibsonmm: goodday I Have a user 1:1 user_profile User is handled by devise I am trying to create the User_profile, with default params along with the create of the USER, I tried a before_create in the user model setting @profile = create_user_profile!(default_parmas) I am getting a stack lvl too deep error when I run RSPEC
[18:49:59] nogic: has joined #RubyOnRails
[18:51:47] CGibsonmm: When I run through rails s and try to create my user It attempts to beginnig the transaction and calls CACHE User Exists (0.0ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "test@gmail.com"], ["LIMIT", 1]] about 100 times and then fails, Any help with why this is happining would be awesome
[18:51:58] duderonomy: has joined #RubyOnRails
[19:17:58] alfiemax: has joined #RubyOnRails
[19:19:58] keegnotrub: has joined #RubyOnRails
[19:21:08] tcopeland: has joined #RubyOnRails
[19:23:08] rikkipitt: has joined #RubyOnRails
[19:28:15] harrycs: has joined #RubyOnRails
[19:33:20] Omnilord: has joined #RubyOnRails
[19:33:43] elcms: has joined #RubyOnRails
[19:34:47] gambl0re: has joined #RubyOnRails
[19:34:49] cagomez: has joined #RubyOnRails
[19:36:20] kevinburke: has joined #RubyOnRails
[19:39:27] tdy: has joined #RubyOnRails
[19:40:39] cagomez: has joined #RubyOnRails
[19:41:27] kevinburke: can I ask a dumb question? i've been running dtrace on my executing ruby process
[19:41:34] kevinburke: a file in globalid-0.3.7/lib/global_id/global_id.rb calls "require 'global_id/uri/gid'". the file we are looking for is adjacent, in globalid-0.3.7/lib/global_id/uri/gid.rb. but instead of looking there, we stat all ~300 rubygems for <gemname>/lib/global_id/uri/gid.rb
[19:41:43] orbyt_: has joined #RubyOnRails
[19:41:57] kevinburke: that seems... slow? surely there is a flag or something that says "look in the currently required gem first"
[19:48:17] istrasci: has joined #RubyOnRails
[19:52:52] istrasci: For a has_one/has_many with conditions, what are the pros/cons of putting the conditions directly on the association vs. making a scope on the associated class and using that?
[20:01:59] cseder: has joined #RubyOnRails
[20:06:28] rikkipitt: has joined #RubyOnRails
[20:07:43] elcms: has joined #RubyOnRails
[20:13:42] arooni: for connecting to a remote mysql database; must i specify the socket and the port number or does providing the socket enough
[20:14:13] workmad3: has joined #RubyOnRails
[20:26:36] cagomez: has joined #RubyOnRails
[20:26:41] Cavallari: has joined #RubyOnRails
[20:30:06] orbyt_: has joined #RubyOnRails
[21:04:59] harrycs: has joined #RubyOnRails
[21:12:25] bdnelson: has joined #RubyOnRails
[21:18:13] gambl0re: has joined #RubyOnRails
[21:19:06] nemesit|znc: has joined #RubyOnRails
[21:19:19] bdnelson: has joined #RubyOnRails
[21:21:18] rfoust: has joined #RubyOnRails
[21:24:29] nemesit|znc: has joined #RubyOnRails
[21:26:28] tdy: has joined #RubyOnRails
[21:26:49] nemesit|znc: can I somehow link to a new form with some values being prefilled?
[21:27:41] nemesit|znc: e.g. from a new york to a form with a city field that then gets "new york" passed to it?
[21:28:37] duderonomy: has joined #RubyOnRails
[21:31:06] CGibsonmm: has joined #RubyOnRails
[21:50:09] hfp_work: has joined #RubyOnRails
[22:13:14] hfp_work: has joined #RubyOnRails
[22:13:48] workmad3: has joined #RubyOnRails
[22:32:04] jcarl43: has joined #RubyOnRails
[22:33:43] jcarl43: has joined #RubyOnRails
[22:35:15] hfp_work: has joined #RubyOnRails
[22:42:05] cjohnson: Just make your server render the form with those values in the HTML
[22:49:46] rikkipitt: has joined #RubyOnRails
[23:06:06] wethu: has joined #RubyOnRails
[23:28:20] kapil___: has joined #RubyOnRails
[23:35:23] GodFather: has joined #RubyOnRails
[23:45:03] duderonomy: has joined #RubyOnRails