« Back to channel list

#RubyOnRails - 13 January 2018

« Back 1 day Forward 1 day »
[00:09:20] JusticeFries: has joined #RubyOnRails
[00:30:01] aiguuu: has joined #RubyOnRails
[00:37:40] jrp93_2: has joined #RubyOnRails
[00:40:49] alfiemax: has joined #RubyOnRails
[00:45:21] orbyt_: has joined #RubyOnRails
[00:55:08] bronson: has joined #RubyOnRails
[01:06:12] aiguuu: has joined #RubyOnRails
[01:09:39] jrp93: has joined #RubyOnRails
[01:10:20] alfiemax: has joined #RubyOnRails
[01:20:37] orbyt_: has joined #RubyOnRails
[01:29:01] aiguuu: has joined #RubyOnRails
[01:41:44] aiguuu: has joined #RubyOnRails
[01:54:34] kapil___: has joined #RubyOnRails
[01:57:43] mtkd: has joined #RubyOnRails
[02:22:10] fugee: has joined #RubyOnRails
[02:22:24] fugee: can i discuss refinerycms in here
[02:38:17] alfiemax: has joined #RubyOnRails
[02:39:42] darkhanb: has joined #RubyOnRails
[02:56:54] bronson: has joined #RubyOnRails
[02:59:06] cagomez: has joined #RubyOnRails
[03:08:55] [Butch]: has joined #RubyOnRails
[03:09:40] orbyt_: has joined #RubyOnRails
[03:09:50] Jameser: has joined #RubyOnRails
[03:12:01] Jameser: has joined #RubyOnRails
[03:14:23] helpa: has joined #RubyOnRails
[03:22:15] drale2k_: has joined #RubyOnRails
[03:25:50] alfiemax: has joined #RubyOnRails
[03:54:07] wethu: has joined #RubyOnRails
[03:57:46] bronson: has joined #RubyOnRails
[04:01:53] mtkd: has joined #RubyOnRails
[04:12:25] Cache_Money: has joined #RubyOnRails
[04:18:40] alfiemax: has joined #RubyOnRails
[04:22:39] jrp93: has joined #RubyOnRails
[04:26:44] Cache_Money: has joined #RubyOnRails
[04:28:04] Cache_Money: has joined #RubyOnRails
[04:29:13] ghormoon: has joined #RubyOnRails
[04:36:49] darkhanb: has joined #RubyOnRails
[04:58:32] bronson: has joined #RubyOnRails
[05:00:18] Cache_Money: has joined #RubyOnRails
[05:11:50] za1b1tsu: has joined #RubyOnRails
[05:18:59] kies: has joined #RubyOnRails
[05:19:58] alfiemax: has joined #RubyOnRails
[05:23:45] Saukk: has joined #RubyOnRails
[05:31:35] cschneid_: has joined #RubyOnRails
[05:53:26] za1b1tsu: has joined #RubyOnRails
[05:59:18] bronson: has joined #RubyOnRails
[06:04:29] JusticeFries: has joined #RubyOnRails
[06:06:01] mtkd: has joined #RubyOnRails
[06:11:35] alfiemax: has joined #RubyOnRails
[06:13:01] segy: has joined #RubyOnRails
[06:13:29] desnudopenguino: anyone using ansible for provisioning and rbenv? i'm running into an issue where installing ruby through rbenv takes too long or breaks on this path
[06:15:01] ule: I am using RVM desnudopenguino
[06:15:05] ule: works fine
[06:16:08] ule: desnudopenguino: is your machine too crappy? How much memory?
[06:16:38] ule: desnudopenguino: I guess your rbenv is trying to compile something isn't it?
[06:17:07] desnudopenguino: it's only 512 mb of ram, just a cheap vps instance
[06:18:15] desnudopenguino: and yeah rbenv is compiling a bunch of stuff
[06:18:34] ule: desnudopenguino: how big is your swap memory?
[06:19:18] desnudopenguino: there's no swap afaik
[06:19:27] ule: desnudopenguino: impossible
[06:19:37] ule: desnudopenguino: I recommend increasing swap to ~2gb
[06:19:47] ule: that would help a bit
[06:20:15] ule: then you have 512MB of memory with some extra free 2GB
[06:20:50] ule: that is basically memory from disk. Yes, quite slow, but for situations like this where you need to compile these stuff, maybe worth trying
[06:21:14] ule: desnudopenguino: maybe you can also try pushing a already compiled rbenv via ansible. How about that?
[06:21:43] jrp93_2: has joined #RubyOnRails
[06:22:02] desnudopenguino: might be a possibility
[06:26:16] desnudopenguino: it installs fine when i run it through normal ssh, just not over ansible
[06:26:34] desnudopenguino: so i think something is breaking somewhere with the ssh connection in ansible
[06:26:48] cschneid_: has joined #RubyOnRails
[06:27:44] ule: I remember seeing an option to keep the connection alive for ssh
[06:27:59] ule: but I guess that was an issue on MacOS + iterm2
[06:28:10] ule: anyways
[06:35:54] jrp93_3: has joined #RubyOnRails
[06:41:01] desnudopenguino: i'll do some messing and figure it out haha
[06:41:10] desnudopenguino: thanks for the suggestions!
[06:41:22] desnudopenguino: i'll let you guys know once i figure it out
[06:41:53] jrp93: has joined #RubyOnRails
[06:45:13] tpendragon: has joined #RubyOnRails
[06:54:37] darkhanb_: has joined #RubyOnRails
[06:58:20] darkhanb: has joined #RubyOnRails
[07:00:09] bronson: has joined #RubyOnRails
[07:01:03] fugee: has joined #RubyOnRails
[07:01:21] fugee: can i discuss refinerycms in here
[07:06:40] cschneid_: has joined #RubyOnRails
[07:10:50] fugee: has left #RubyOnRails: ("Leaving")
[07:10:58] fugee: has joined #RubyOnRails
[07:14:40] jrp93: has joined #RubyOnRails
[07:41:57] cschneid_: has joined #RubyOnRails
[08:01:20] bronson: has joined #RubyOnRails
[08:17:33] alfiemax: has joined #RubyOnRails
[08:18:35] apparition: has joined #RubyOnRails
[08:23:47] cschneid_: has joined #RubyOnRails
[09:02:08] bronson: has joined #RubyOnRails
[09:15:50] za1b1tsu: Regarding Factories, to test a service object I need to create (a cluster) multiple models and associations and to do this elegantly I need to find some nice design patterns, I found this https://stackoverflow.com/a/44335689/8217653
[09:16:34] za1b1tsu: I looks great and did read up on what are aggregates, but I don't think aggregates are what I'm looking for
[09:17:26] za1b1tsu: I mean I have an 'aggregate root' that is the client, but I'm not really interested in client, I need to see if the service object updates other model instances.
[09:17:57] za1b1tsu: So is there something else? A design pattern for a cluster of factories of different types?
[09:18:05] blackmesa: has joined #RubyOnRails
[09:21:38] conta: has joined #RubyOnRails
[09:22:41] marr: has joined #RubyOnRails
[09:33:36] AzaToth: has joined #RubyOnRails
[09:37:16] cschneid_: has joined #RubyOnRails
[09:39:41] apparition: has joined #RubyOnRails
[09:43:11] AzaToth: has joined #RubyOnRails
[09:43:17] jnollette: has joined #RubyOnRails
[09:43:25] za1b1tsu: Is there something like factories collection?
[09:49:53] za1b1tsu: I cannot find what I want. Is it a bad design choice to create my own thing? I thinking about designing something called 'environment' or 'package' or 'ecosystem' and put it /factories/environment/serviceobjectname.rb ?
[09:50:38] za1b1tsu: and will look like something like this?
[09:51:15] za1b1tsu: https://stackoverflow.com/questions/44334843/build-multiple-objects-with-a-single-factory-with-factorygirl/44335689#44335689
[09:59:36] my123: has joined #RubyOnRails
[10:02:57] bronson: has joined #RubyOnRails
[10:14:35] cschneid_: has joined #RubyOnRails
[10:15:03] arefaslani: has joined #RubyOnRails
[10:15:51] arefaslani: Hey guys! I’ve found a new authorization library based on Pundit, but some sugar added to it. Take a look at Hadir, the new Rails authorization gem :)
[10:15:51] arefaslani: https://github.com/AliSepehri/hadir
[10:45:38] mtkd: has joined #RubyOnRails
[10:53:14] cschneid_: has joined #RubyOnRails
[10:55:47] platoon23: has joined #RubyOnRails
[10:56:24] jnollette: has joined #RubyOnRails
[10:58:57] blackmesa: has joined #RubyOnRails
[10:59:09] ams__: has joined #RubyOnRails
[11:03:45] bronson: has joined #RubyOnRails
[11:38:23] cschneid_: has joined #RubyOnRails
[11:49:43] aiguuu: has joined #RubyOnRails
[12:04:36] bronson: has joined #RubyOnRails
[12:06:19] NoGodDamnIdea: has joined #RubyOnRails
[12:21:16] DTZUZO: has joined #RubyOnRails
[12:46:37] cschneid_: has joined #RubyOnRails
[12:59:14] gambl0re: has joined #RubyOnRails
[13:05:30] bronson: has joined #RubyOnRails
[13:08:25] Gizmokid2005: has joined #RubyOnRails
[13:09:51] Jameser: has joined #RubyOnRails
[13:18:52] kapil___: has joined #RubyOnRails
[13:21:35] dionysus69: has joined #RubyOnRails
[13:21:59] Jameser: has joined #RubyOnRails
[13:28:04] Jameser: has joined #RubyOnRails
[13:39:29] blackmesa: has joined #RubyOnRails
[13:40:36] gambl0re: has joined #RubyOnRails
[13:49:18] gambl0re: has joined #RubyOnRails
[13:57:47] vichib: has joined #RubyOnRails
[14:04:28] arBmind: has joined #RubyOnRails
[14:06:41] bronson: has joined #RubyOnRails
[14:08:21] MrCrackPotBuilde: has joined #RubyOnRails
[14:09:48] crova: has joined #RubyOnRails
[14:10:13] crova: Sup folks, everyone all right? Anyone familiar with webhooks available to give me a hand, please?
[14:12:20] Cache_Money: has joined #RubyOnRails
[14:14:29] blackmesa: has joined #RubyOnRails
[14:20:53] KevinSjoberg: has joined #RubyOnRails
[14:21:52] dviola: has joined #RubyOnRails
[14:22:31] fmcgeough: has joined #RubyOnRails
[14:38:18] defsdoor: has joined #RubyOnRails
[14:40:37] jnollette: has joined #RubyOnRails
[14:41:35] chocoelho: has joined #RubyOnRails
[14:41:47] blackmesa: has joined #RubyOnRails
[14:45:09] cschneid_: has joined #RubyOnRails
[15:01:07] zigzig: has joined #RubyOnRails
[15:07:26] bronson: has joined #RubyOnRails
[15:12:38] KevinSjoberg: has joined #RubyOnRails
[15:19:00] mtkd: has joined #RubyOnRails
[15:21:35] ladipo: has joined #RubyOnRails
[15:27:38] cschneid_: has joined #RubyOnRails
[15:28:46] ladipo: has left #RubyOnRails: ()
[15:34:44] tpendragon: has joined #RubyOnRails
[15:45:09] Saukk: has joined #RubyOnRails
[15:45:57] alfiemax: has joined #RubyOnRails
[15:48:11] nickjj_: has joined #RubyOnRails
[15:49:34] KevinSjoberg: has joined #RubyOnRails
[15:51:52] nickjj__: has joined #RubyOnRails
[15:53:01] bonhoeffer_: has joined #RubyOnRails
[16:05:04] desperek: has joined #RubyOnRails
[16:07:11] desperek: how do i add sanitizer?
[16:07:23] desperek: should i put it in app/sanitizers?
[16:08:29] bronson: has joined #RubyOnRails
[16:20:18] wethu: has joined #RubyOnRails
[16:26:01] blackmesa: has joined #RubyOnRails
[16:36:56] crova: Folks, I have the following: Parameters: {"id"=>55303, "campaign name"=>"name"} // How can I search for params[:campaign name] ? Using params[:campaign_name] I get NIL when saving to the database
[16:40:49] desperek: crova, what about params['campaign name'] ?
[16:42:47] crova: let me give it a shot desperek
[16:43:55] uks: has joined #RubyOnRails
[16:45:01] crova: desperek, you were almost there, [:'campaign name'] did the trick
[16:45:03] crova: cheers mate
[16:49:34] za1b1tsu: has joined #RubyOnRails
[16:52:53] za1b1tsu: So I'm working with a database with millions of entries. From what I understand models = Model.where(something) it's okay to do since it's lazy loaded? From what I understand what's important is that when I want to use the data, I should do models.find_each { |m| m.update(attr, v). Right?}
[16:57:10] kapil___: how to get issue weight automatically from previeous entry for job id? https://usercontent.irccloud-cdn.com/file/OTrbDm9O/how%20to%20get%20issue%20weight%20automatically%3F
[16:57:10] kapil___: how to get issue weight automatically?
[17:00:03] Tempesta: has joined #RubyOnRails
[17:01:44] jottr: has joined #RubyOnRails
[17:08:59] bronson: has joined #RubyOnRails
[17:10:40] desperek: za1b1tsu, you can use chunks
[17:11:22] desperek: 't load milions of entries at once...
[17:23:20] mtkd: has joined #RubyOnRails
[17:23:53] alfiemax: has joined #RubyOnRails
[17:25:44] za1b1tsu: desperek: you are refering to the where? or the find_each?
[17:26:02] desperek: za1b1tsu, to the thing generally, you can pull the record in batches
[17:27:26] desperek: za1b1tsu, and yes, find_each
[17:27:42] desperek: http://guides.rubyonrails.org/active_record_querying.html#retrieving-multiple-objects-in-batches
[17:27:45] za1b1tsu: so what is the correct way?
[17:27:52] desperek: its in the docs
[17:28:25] desperek: za1b1tsu, you may aswell do the thing with for loop and .limit and offset
[17:30:05] za1b1tsu: desperek: Im sorry, my head hurts and this might seem dumb, but what's dif in the docs from what I did. I mean I used find_each, they used find_each, same thing no?
[17:30:49] desperek: za1b1tsu, you can i think that's right way, you can also specify batch_size there
[17:31:46] za1b1tsu: so why did you say it was wrong though :)
[17:34:25] desperek: sorry 'bout that, i know less than you prob.
[17:34:58] za1b1tsu: that's unprobable, I'm the least knowledgeable on this channel
[17:35:53] desperek: wanna bet, uh?
[17:36:30] za1b1tsu: you could play dumb and I will still win
[17:36:38] za1b1tsu: I dont want to take your money bro
[17:37:02] KevinSjoberg: has joined #RubyOnRails
[17:40:57] KeyJoo: has joined #RubyOnRails
[17:41:57] za1b1tsu: desperek: I never used limit (only limit 1) and no offset, how would this approach look?
[17:42:10] za1b1tsu: it will be an each nested in an each?
[17:42:19] desperek: za1b1tsu, umm, yes i think
[17:42:51] desperek: that's desperek's way, so don't try it unless you are really desperate because it's not scalable at all (tm)
[17:43:36] orbyt_: has joined #RubyOnRails
[17:47:57] za1b1tsu: So I have this ratings = Rating.where(session: sessions)
[17:48:20] za1b1tsu: Sorry let me start over
[17:49:02] za1b1tsu: So I have this sessions = Session.where(closed: false) and then I have this ratings = Rating.where(session: sessions)
[17:49:35] za1b1tsu: will sessions still be easy loaded? Since it gets called in the assigning of ratings?
[17:51:34] desperek: za1b1tsu, what's easy loaded?
[17:52:13] desperek: you can combine these two by the way
[17:55:17] JusticeFries: has joined #RubyOnRails
[17:58:41] conta: has joined #RubyOnRails
[17:59:09] desperek: za1b1tsu, .includes or .joins
[18:02:24] za1b1tsu: easy loading it means the data is not loaded from the database
[18:02:56] za1b1tsu: so for example if I say sessions = Session.where(closed: false)
[18:03:12] za1b1tsu: it does not execute the sql, until I do something with var sessions
[18:03:32] desperek: isnt that called eager loading or something
[18:04:11] za1b1tsu: you see? you know more then me
[18:04:24] za1b1tsu: I was calling it easy loading :), so dumb
[18:04:38] za1b1tsu: and it's called lazy loading
[18:05:18] za1b1tsu: eager loading is when it executes the sql, using arel or raw sql or stuff like includes
[18:06:57] desperek: i wonder how can i loop over relations ;-;
[18:09:23] za1b1tsu: what do you mean?
[18:09:57] bronson: has joined #RubyOnRails
[18:09:58] desperek: za1b1tsu, i have relation on model
[18:10:02] desperek: which is mutual
[18:10:17] jottr: has joined #RubyOnRails
[18:10:20] desperek: X has many X's (optional) and belongs to X (optional)
[18:10:55] desperek: I wonder how to do the thing.
[18:12:15] za1b1tsu: you sti? single table inheritance?
[18:12:39] za1b1tsu: x can be of many types?
[18:12:42] desperek: i think doing {X: {X: {X: {X: {X...}, X: {X...}}}}
[18:12:54] desperek: za1b1tsu, X is one model
[18:13:03] desperek: and yes i guess
[18:14:29] za1b1tsu: and what do you mean by loop over relations?
[18:16:10] za1b1tsu: does rails console keep a log?
[18:16:27] ur5us: has joined #RubyOnRails
[18:17:47] desperek: za1b1tsu, i want to get all has_many till the end
[18:17:57] desperek: and i think you can turn on logginng soemwhere
[18:18:13] keyjoo_: has joined #RubyOnRails
[18:32:04] sameerynho: has joined #RubyOnRails
[18:38:40] ur5us: has joined #RubyOnRails
[18:42:42] p8m: has joined #RubyOnRails
[18:47:50] KevinSjoberg: has joined #RubyOnRails
[18:48:14] srinidhi: has joined #RubyOnRails
[18:50:19] davic: has left #RubyOnRails: ("Leaving")
[18:51:59] drale2k_: i am defining a model in a subfolder, "class Loot::Password < ApplicationRecord" How do i reference that with "has_many" ?
[18:52:19] drale2k_: tried just has_many :passwords but i get an error. It expects the namespace i guess
[18:52:51] ur5us: has joined #RubyOnRails
[18:53:26] drale2k_: nvm got it, "has_many :passwords, class_name: 'Loot::Password"
[18:53:28] AnotherOne: has joined #RubyOnRails
[18:57:10] ladipo: has joined #RubyOnRails
[19:00:23] miromanyth: has joined #RubyOnRails
[19:06:13] dyyylan: is there any way to (eager) load relations against a model that you already have an instance of?
[19:09:18] ur5us: has joined #RubyOnRails
[19:10:45] bronson: has joined #RubyOnRails
[19:21:04] blackmesa: has joined #RubyOnRails
[19:27:41] ur5us: has joined #RubyOnRails
[19:31:23] JusticeFries: has joined #RubyOnRails
[19:31:47] alfiemax_: has joined #RubyOnRails
[19:33:08] ladipo: has left #RubyOnRails: ()
[19:47:48] blackmesa: has joined #RubyOnRails
[20:10:47] CJKinni: has joined #RubyOnRails
[20:11:21] fmcgeough: has joined #RubyOnRails
[20:12:12] bronson: has joined #RubyOnRails
[20:13:33] blackmesa1: has joined #RubyOnRails
[20:15:29] CJKinni: has joined #RubyOnRails
[20:18:15] CJKinni: has joined #RubyOnRails
[20:30:00] wethu: has joined #RubyOnRails
[20:43:51] ur5us: has joined #RubyOnRails
[20:56:57] darkhanb: has joined #RubyOnRails
[21:07:02] jottr: has joined #RubyOnRails
[21:12:58] bronson: has joined #RubyOnRails
[21:28:24] mtkd: has joined #RubyOnRails
[21:30:32] blackmesa1: has joined #RubyOnRails
[21:44:33] bigtawm: has joined #RubyOnRails
[21:45:24] alfiemax: has joined #RubyOnRails
[21:45:47] bigtawm: Im trying to deploy my first application to AWS Elastic Beanstalk and I'm running into some issues. Is anyone available to help me out? Would be greatly appreciated.
[21:49:56] Guest18: has joined #RubyOnRails
[22:03:33] hive-mind: has joined #RubyOnRails
[22:09:57] LightStalker: has joined #RubyOnRails
[22:13:50] bronson: has joined #RubyOnRails
[22:19:03] LateralOctober: has joined #RubyOnRails
[22:21:46] elcontrastador: has joined #RubyOnRails
[22:22:23] alfiemax: has joined #RubyOnRails
[22:27:29] fschuindt: has joined #RubyOnRails
[22:37:26] jottr_: has joined #RubyOnRails
[22:42:15] CustosLimen: has left #RubyOnRails: ("Leaving")
[22:54:18] Cyrus: has joined #RubyOnRails
[22:55:04] toastercup: has joined #RubyOnRails
[22:57:00] toastercup: Howdy, folks! Does anyone have any ideas how to support some kind of 'dynamic plugin/engine' system for multitenant, SaaS Rails applications? Plugins in our system are Rails Engines, and we'd like users to dynamically load them on-the-fly for their particular instance. Is the only way to do this to spin up multiple instances of the server? Bundler doesn't seem to be built for this sort of thing.
[23:00:09] alfiemax: has joined #RubyOnRails
[23:01:14] ladipo: has joined #RubyOnRails
[23:14:39] bronson: has joined #RubyOnRails
[23:21:48] jottr_: has joined #RubyOnRails
[23:29:07] ahrs: has joined #RubyOnRails
[23:36:48] one_zero: has joined #RubyOnRails
[23:42:30] mtkd: has joined #RubyOnRails
[23:43:27] mtkd: has joined #RubyOnRails
[23:43:28] nso95: has joined #RubyOnRails
[23:43:56] nso95: When I try to generate some scaffolds on WSL it just sort of idles
[23:48:11] Guest18: can anyone help me with some basic association issues?
[23:52:19] nso95: https://gyazo.com/8b51bbf0a6034b2243ae7f407be0f725
[23:52:28] nso95: The cursor just flashes indefinitely and nothing happens
[23:53:42] nso95: "spring stop" followed by the generate command fixed it
[23:54:37] nso95: don't even know what spring is
[23:56:21] dviola: has joined #RubyOnRails