« Back to channel list

#RubyOnRails - 20 October 2017

Forward 1 day »
[03:12:36] helpa: has joined #RubyOnRails
[03:15:28] alfiemax: has joined #RubyOnRails
[03:15:56] Saukk: has joined #RubyOnRails
[03:27:48] Radar: has joined #RubyOnRails
[03:28:07] Radar: !botsnack
[03:28:07] helpa: Nom nom. Thanks, Radar!
[03:30:32] apparition: has joined #RubyOnRails
[03:32:05] andrew9184: has joined #RubyOnRails
[03:48:04] orbyt_: has joined #RubyOnRails
[04:00:13] aperkins81: has joined #RubyOnRails
[04:05:02] LambdaSource: has joined #RubyOnRails
[04:06:03] DTZUZO_: has joined #RubyOnRails
[04:14:09] workmad3: has joined #RubyOnRails
[04:26:29] ringrong: has joined #RubyOnRails
[04:42:31] LambdaSource: has joined #RubyOnRails
[04:44:38] quazimodo: has joined #RubyOnRails
[04:59:22] knight33: has joined #RubyOnRails
[05:06:36] aperkins81: hmm no go.. after removing the events (disabled all our js .. replaced jquery_ujs with rails-ujs) it still submits the form to the server
[05:12:55] aperkins81: think found it.. putting a debugger in both forms and inspecting the form object, rails 5.2.0.alpha has alot of active_storage references, but our app doesnt.. so something is not loading..
[05:22:08] wethu: has joined #RubyOnRails
[05:22:20] aperkins81: (but in our app, ActiveStore is working and saving the files correctly... just not using direct_upload: true) ... last piece of the puzzle
[05:41:07] kazim59: has joined #RubyOnRails
[05:46:21] Cyrus: has joined #RubyOnRails
[05:59:12] Technodrome: has joined #RubyOnRails
[06:14:43] workmad3: has joined #RubyOnRails
[06:18:56] dminuoso: !goodmorning
[06:18:56] helpa: おはよう ございます
[06:20:26] conta: has joined #RubyOnRails
[06:26:46] dionysus69: has joined #RubyOnRails
[06:34:45] kapil___: has joined #RubyOnRails
[06:38:57] kazim59: Hello... I've been doing Ruby/Rails since a few years, and mostly worked on Rails 3 (started with 2...). All basics are clear, and am able to deploy production-ready stuff. I'm looking for some videos that show how an expert goes about starting a new project, from scratch, doing BDD ... you know some kind of recorded pair programming session, or kind of where you can watch an expert do the magic by standing near them?
[06:39:09] kazim59: Any thoughts where one can find such resources?
[06:39:58] kazim59: It should just be work video, no long intros needed, no explaining concepts. One can just pause video and google around if something's not clear...
[07:15:30] dminuoso: kazim59: Find a job as a junior developer in a company that does actual pair programming.
[07:15:46] dminuoso: kazim59: Watching a video of someone solving problems is unlikely to yield fruitful results.
[07:17:43] kazim59: well, not really looking for a pair programming alternative
[07:18:16] kazim59: but rather want to watch the experts, and their thinking process while they develop.
[07:18:55] kazim59: a good alternative is to read source code of good projects, but source code are not a timeline (of course, reading commit by commit is possible)
[07:19:27] kazim59: maybe I didn't phrase myself well.
[07:21:13] BloodyMer: has joined #RubyOnRails
[07:27:01] mtkd: has joined #RubyOnRails
[07:29:10] sekmo: has joined #RubyOnRails
[07:31:37] sekmo: Hi everyone! On my server I'm using two instances of puma for two rails applications, behind nginx. What's the simplest way to demonize the servers? (I plan to use Capistrano)
[07:38:43] dminuoso: sekmo: puma can demonize on its own.
[07:38:53] dminuoso: sekmo: https://github.com/puma/puma/blob/master/examples/config.rb#L37-L38
[07:39:54] sekmo: oh sorry, I mean how to start automatically on boot...
[07:44:21] dminuoso: sekmo: Just write a simple init/systemd/upstart script.
[07:44:29] dminuoso: There really is not much magic to it.
[07:44:44] dminuoso: I highly recommend understanding how puma is started, and then just doing it yourself.
[07:49:20] sekmo: thank you very much :-)
[07:55:24] fumck: has joined #RubyOnRails
[07:58:56] workmad3: has joined #RubyOnRails
[08:07:31] ur5us: has joined #RubyOnRails
[08:08:57] mikecmpbll: has joined #RubyOnRails
[08:20:39] quazimodo: has joined #RubyOnRails
[08:26:28] adre: has joined #RubyOnRails
[08:35:54] blackmesa: has joined #RubyOnRails
[08:40:55] bruno-: has joined #RubyOnRails
[08:40:57] arBmind: has joined #RubyOnRails
[08:52:24] ferr: has joined #RubyOnRails
[09:01:16] solars: has joined #RubyOnRails
[09:02:20] nertzy: has joined #RubyOnRails
[09:02:40] solars: hi, quick question: if I return false in a before_save, I get ActiveRecord::RecordNotSaved - is there any way to do this silently? I need to send an email instead for debugging passenger
[09:03:07] lxsameer: has joined #RubyOnRails
[09:03:59] sekmo: has joined #RubyOnRails
[09:04:28] Ergo: has joined #RubyOnRails
[09:15:49] adre: solars: can you catch the exception and execute your alternate path?
[09:18:05] jphase: has joined #RubyOnRails
[09:21:56] Tempesta: has joined #RubyOnRails
[09:23:49] mikecmpbll: has joined #RubyOnRails
[09:26:34] jphase: has joined #RubyOnRails
[09:28:37] jphase_: has joined #RubyOnRails
[09:30:17] alfiemax: has joined #RubyOnRails
[09:32:06] marr: has joined #RubyOnRails
[09:49:12] jottr: has joined #RubyOnRails
[09:50:17] FernandoBasso: has joined #RubyOnRails
[09:50:37] jphase: has joined #RubyOnRails
[09:52:08] jphase_: has joined #RubyOnRails
[09:53:39] jphase__: has joined #RubyOnRails
[09:56:37] jphase: has joined #RubyOnRails
[09:58:21] Kilo`byte: question regarding actioncable: how can i broadcast a message to all subscribers of a certain channel? ActionCable.server.broadcast('channel', foo: 'bar') does not seem to work (no target clients)
[09:59:12] srinidhi: has joined #RubyOnRails
[09:59:40] Kilo`byte: also anyone mind telling me they read this message, i think my bnc is acting up
[10:03:04] marr: has joined #RubyOnRails
[10:04:57] sekmo: has joined #RubyOnRails
[10:08:24] kazim59: Kilo`byte: I did.
[10:13:28] matthewd: Kilo`byte: That's what broadcast does. Maybe you aren't subscribing to what you think you are?
[10:14:03] Kilo`byte: i am fairly sure, but i can recheck
[10:17:12] Kilo`byte: oh yay i did in fact screw that up
[10:23:00] bruno-: has joined #RubyOnRails
[10:57:28] arBmind: has joined #RubyOnRails
[11:19:15] jphase: has joined #RubyOnRails
[11:21:08] roshanavand: has joined #RubyOnRails
[11:28:13] tcopeland: has joined #RubyOnRails
[11:31:38] quazimodo: has joined #RubyOnRails
[11:33:16] srinidhi: has joined #RubyOnRails
[11:43:29] dminuoso: Mmm. How do I enhance a rake task with another that lies in a namespace?
[11:44:15] dminuoso: Rake::Task['db:schema:load'].enhance ['db:schema:special_load'] ought to do the trick right?
[11:45:33] dminuoso: Okay, good to know that rake tasks need to use the .rake extension.
[11:48:38] bruno-: has joined #RubyOnRails
[11:53:36] bruno-: has joined #RubyOnRails
[11:56:27] AnotherOne: has joined #RubyOnRails
[11:57:09] blackmesa: has joined #RubyOnRails
[11:58:39] bruno-: has joined #RubyOnRails
[12:00:47] quazimodo: has joined #RubyOnRails
[12:11:17] bruno-: has joined #RubyOnRails
[12:16:16] bruno-: has joined #RubyOnRails
[12:21:15] bruno-: has joined #RubyOnRails
[12:26:12] bruno-: has joined #RubyOnRails
[12:28:50] blackmesa: has joined #RubyOnRails
[12:31:11] bruno-: has joined #RubyOnRails
[12:36:11] bruno-: has joined #RubyOnRails
[12:39:16] keegnotrub: has joined #RubyOnRails
[12:41:14] bruno-: has joined #RubyOnRails
[12:46:15] bruno-: has joined #RubyOnRails
[12:49:21] anotherone2: has joined #RubyOnRails
[12:50:35] jphase: has joined #RubyOnRails
[12:57:48] keegnotrub: has joined #RubyOnRails
[12:59:57] conta: has joined #RubyOnRails
[13:18:23] ams__: has joined #RubyOnRails
[13:23:39] NL3limin4t0r: has joined #RubyOnRails
[13:24:36] LambdaSource: has joined #RubyOnRails
[13:34:15] srinidhi: has joined #RubyOnRails
[13:48:27] Guest16040: has joined #RubyOnRails
[14:08:58] cpruitt: has joined #RubyOnRails
[14:11:54] dionysus69: has joined #RubyOnRails
[14:13:02] knight33: has joined #RubyOnRails
[14:16:40] chouhoulis: has joined #RubyOnRails
[14:18:40] Technodrome: has joined #RubyOnRails
[14:26:57] fmcgeough: has joined #RubyOnRails
[14:29:51] Technodrome: has joined #RubyOnRails
[14:35:08] sheepman: has joined #RubyOnRails
[14:35:26] chouhoulis: has joined #RubyOnRails
[14:36:12] sheepman: hi all, I normally just go with mysql for production sites however in this case the site is so small with hardly any data stored I'm tempted to stay with sqlite... is there any reason for me not to?
[14:37:33] workmad3: sheepman: sqlite completely lacks concurrency... you'll have errors pop up the moment more than one request happens to collide in timing
[14:38:11] sheepman: ah ok thats quite a good reason to swap!
[14:38:16] workmad3: (I had a similar thought process with one site several years ago... the errors pop up more often than you'd think)
[14:38:16] sheepman: thanks workmad3
[14:38:40] workmad3: on a side-note... have you considered postgresql? ;)
[14:38:54] sheepman: not really no
[14:39:03] sheepman: my comfort zone is well.... comfy :)
[14:39:03] workmad3: (I feel obligated to at least ask any time someone says they use mysql...)
[14:39:09] kapil___: has joined #RubyOnRails
[14:40:26] Sylario: MySQL is more of an inconfort zone
[14:42:13] workmad3: sheepman: I stopped being comfortable with mysql when a site I was maintaining that was using it started throwing away data silently because of a key overflow (the real problem was the original devs setting the primary key to a 1 byte integer, but the default mysql config shouldn't silently fail when that situation occurs)
[14:42:55] sheepman: wow, yeah that isn't friendly.
[14:43:12] sheepman: maybe i'll give it a whirl
[14:44:05] workmad3: I mean, at least you can configure mysql to be relatively noisy in that sort of situation now... but the defaults are still massively problematic IMO :)
[14:57:33] stevednd: hey all, I'm trying to wrap up some common functionality between a few of our apps, and one of the parts is moving a specific controller to the gem. No matter what I do I cannot get it to load. I've tried requiring it regularly, I've put it in `app/controllers/mygem/...`. I tried creating a railtie and requiring it there too. Either rails will load, but when I go to the controller/action in question it will just give me `undefined method `execute'
[14:57:33] stevednd: for nil:NilClass`, or it will completely blow up saying the constant APP_PATH is already initialized
[14:57:40] stevednd: can anyone provide a proper example of how to include a controller in a gem?
[14:58:47] unreal_: has joined #RubyOnRails
[15:03:03] Sylario: stevednd> you also need a routes.rb in config in the gems, and to invoke the gem in the main app routes.rb
[15:04:15] stevednd: sylario: do you have an example somewhere? Does it need to be an Engine, or just a Railtie?
[15:05:05] Sylario: You must be an engine
[15:10:18] justrying: has joined #RubyOnRails
[15:15:14] fmcgeough: has joined #RubyOnRails
[15:22:03] mcr1: has joined #RubyOnRails
[15:31:39] cagomez: has joined #RubyOnRails
[15:38:49] DrYockel: has joined #RubyOnRails
[15:44:08] srinidhi: has joined #RubyOnRails
[15:55:31] dviola: has joined #RubyOnRails
[15:57:30] cagomez: has joined #RubyOnRails
[15:59:00] bnjmnwl: has left #RubyOnRails: ()
[16:03:34] jottr: has joined #RubyOnRails
[16:03:38] moei: has joined #RubyOnRails
[16:08:52] stevednd: sylario, matthewd: thanks. I got it working. now I just have to deal with the stupid inflector not respecting the acronym I set for some reason
[16:10:33] gusrub: has joined #RubyOnRails
[16:14:38] moei: has joined #RubyOnRails
[16:15:49] knight33: has joined #RubyOnRails
[16:16:56] cpruitt: has joined #RubyOnRails
[16:18:23] creature: has joined #RubyOnRails
[16:24:04] blackmesa: has joined #RubyOnRails
[16:32:49] Giorgio: has joined #RubyOnRails
[16:36:56] bnjmnwl: has joined #RubyOnRails
[16:46:59] mikecmpbll: has joined #RubyOnRails
[16:51:37] orbyt_: has joined #RubyOnRails
[16:51:38] hahuang65: has joined #RubyOnRails
[16:55:32] cagomez: has joined #RubyOnRails
[16:56:30] stevednd: Does anyone know why rails messes up the acronym inflection on `Org::RootAPI::RootAPIController`. I have 'RootAPI' set as an acronym, but rails seems to end up with "Org::RootApi::RootAPIController" which causes the controller not be able to be loaded of course. This is on rails 4
[16:56:48] stevednd: is this a bug, or do I need to add something else to the inflector
[16:59:26] AnotherOne: has joined #RubyOnRails
[17:01:05] conta2: has joined #RubyOnRails
[17:01:39] one_zero: has joined #RubyOnRails
[17:09:09] zer0python: has joined #RubyOnRails
[17:10:45] zer0python: what is the correct way to do a query like so (in rails): SELECT DISTINCT o.id FROM "TABLE" o JOIN "TABLE" d on d.parent_id = o.id JOIN "TABLE" b on b.parent_id = d.id JOIN "TABLE" u on u.parent_id = b.id WHERE u.id in (...);
[17:12:08] zer0python: TABLE is uses the activerecord "Type" thing where one can do: class Table < ActiveRecord; class Type1 < Table; class Type2 < Table; class Type3 < Table;
[17:13:03] zer0python: I have the has_many/belongs_to associations, so I thought doing Type1.joins(:type2).joins(:type3) may work, but that doesn't. :-/
[17:13:49] matthewd: zer0python: Does `:type2 => { :type3 => :type4 }` help?
[17:17:42] zer0python: hmm, you mean something like: Type1.joins(type2: { type3: :type4 }).where(type4: { id: type4_ids }) #??
[17:18:48] matthewd: zer0python: Yes on the joins.. the where part may get more complicated
[17:18:51] horsey99: has joined #RubyOnRails
[17:19:31] zer0python: looks like I may have to do something like .where('type4_TABLE.id in (?)', type4_ids)
[17:19:31] matthewd: stevednd: It's expecting you to define 'API' as the acronym
[17:21:27] conta2: has joined #RubyOnRails
[17:22:26] zer0python: matthewd: thx, I'll continue poking
[17:23:24] matthewd: You'll still be able to use the hash form -- just need to use the right alias as the outer hash key
[17:28:02] kies: has joined #RubyOnRails
[17:33:43] stevednd: matthewd: I changed my inflector to just be 'API', then it failed on the actually controller name as 'RootApiController'. So I added 'RootAPI' in as an acronym as well. Then when it tried to load it it said uninitialized constant. the controller is at `app/controllers/org/rootapi/rootapi_controller.rb`
[17:35:03] srinidhi: has joined #RubyOnRails
[17:48:37] gusrub: has joined #RubyOnRails
[17:54:09] gr33nw00d: has joined #RubyOnRails
[17:55:35] gr33nw00d: Hello friends! In the guides it states "The Active Record way claims that intelligence belongs in your models, not in the database" (http://guides.rubyonrails.org/v5.0/active_record_migrations.html#active-record-and-referential-integrity). However when I run "rails g model Place city:references" the resulting migration adds a db-level foreign key constraint `t.references :city, foreign_key: true`. Does this contradict
[17:55:41] orbyt_: has joined #RubyOnRails
[17:55:47] guacamole: has joined #RubyOnRails
[17:59:46] elomatreb: No, you want those in addition to the model-layer logic since they enforce consistency in your data. It doesn't really contradict that philosophy since it doesn't actually contain any actual logic, it just types that column stronger
[18:00:17] elomatreb: The same reason you want unique constraints on unique columns as well as have a validation for it
[18:02:18] matthewd: gr33nw00d: That was probably written before foreign keys were generated by default, so.. maybe?
[18:02:39] gr33nw00d: Ok thank you.
[18:03:25] elomatreb: Anyway, even if it does technically go against that philosophy, then this is an exception to the rule. Enforcing integrity of your data just can't hurt
[18:13:37] quazimodo: has joined #RubyOnRails
[18:16:30] mcr1: has joined #RubyOnRails
[18:16:59] uks: has joined #RubyOnRails
[18:17:24] [Butch]: has joined #RubyOnRails
[18:18:33] Technodrome: has joined #RubyOnRails
[18:21:22] JDeen: How to debug performance issues related to AR queries in Rails? I got an #index action with a search which joins tables if needed and filters results. When a certain table is joined (based on the query) the request times out. How can I debug such issue?
[18:24:47] matthewd: jdeen: It sounds like you've already worked out what the problem is
[18:26:36] mtkd: has joined #RubyOnRails
[18:34:15] BloodyMer: has joined #RubyOnRails
[18:42:41] cagomez: has joined #RubyOnRails
[18:47:21] banisterfiend: has joined #RubyOnRails
[18:51:08] orbyt_: has joined #RubyOnRails
[18:52:10] arBmind: has joined #RubyOnRails
[19:10:46] cagomez: has joined #RubyOnRails
[19:11:57] Technodrome: has joined #RubyOnRails
[19:14:20] mostlybadfly: has joined #RubyOnRails
[19:25:38] Technodrome: has joined #RubyOnRails
[19:29:21] Guest16040: has joined #RubyOnRails
[19:34:07] bruno-: has joined #RubyOnRails
[19:39:21] jfelchner: has joined #RubyOnRails
[19:48:35] LambdaSource: has joined #RubyOnRails
[19:50:43] fox_mulder_cp: has joined #RubyOnRails
[19:51:20] LambdaSource: has joined #RubyOnRails
[19:52:10] lxsameer: has joined #RubyOnRails
[20:04:13] safetypin: has joined #RubyOnRails
[20:06:05] safetypin: has joined #RubyOnRails
[20:07:26] workmad3: has joined #RubyOnRails
[20:12:08] duderonomy: has joined #RubyOnRails
[20:17:14] orbyt_: has joined #RubyOnRails
[20:19:40] frojnd: Evening gents
[20:22:48] havenwood: frojnd: non-gents too! ladies and a few rapscallions here as well.
[20:22:52] havenwood: frojnd: g'eve'
[20:23:34] havenwood: alias g p; g'eve' #=> "eve"
[20:24:11] [Butch]: has joined #RubyOnRails
[20:25:12] cagomez: has joined #RubyOnRails
[20:26:42] frojnd: havenwood: hello ladies!
[20:31:52] LambdaSource: has joined #RubyOnRails
[20:34:59] hahuang65: has joined #RubyOnRails
[20:36:43] Technodrome: has joined #RubyOnRails
[20:38:17] ziggles: has joined #RubyOnRails
[20:45:12] mtkd: has joined #RubyOnRails
[20:47:02] irishfromua: has joined #RubyOnRails
[20:50:06] milesmatthias: has joined #RubyOnRails
[21:01:40] guacamole: has joined #RubyOnRails
[21:17:36] Technodrome: has joined #RubyOnRails
[21:19:07] King_Rex: has joined #RubyOnRails
[21:32:57] fox_mulder_cp: has joined #RubyOnRails
[21:43:19] cnk: has joined #RubyOnRails
[21:46:20] LambdaSource: has joined #RubyOnRails
[21:56:37] Technodrome: has joined #RubyOnRails
[21:59:59] mochiyoda_: has joined #RubyOnRails
[22:08:04] workmad3: has joined #RubyOnRails
[22:12:48] irishfromua: has joined #RubyOnRails
[22:13:34] timdotrb: has joined #RubyOnRails
[22:15:16] frojnd: Anyone uses httparty?
[22:15:26] frojnd: Was just wondering how can I pass query param
[22:16:08] frojnd: without initialize... so I want to put it inside HTTParty.get() block
[22:16:30] frojnd: don't know how and I dont see anywhere in the docs
[22:18:16] mtkd: has joined #RubyOnRails
[22:22:17] frojnd: Nevermind reading docs carefully helped
[22:22:36] frojnd: you can just put query: @options inside HTTParty block
[22:22:53] Doldge: has joined #RubyOnRails
[22:26:49] orbyt_: has joined #RubyOnRails
[22:30:39] bruno-_: has joined #RubyOnRails
[22:35:07] Technodrome: has joined #RubyOnRails
[22:38:41] marr: has joined #RubyOnRails
[22:58:41] jfelchner: has joined #RubyOnRails
[23:00:56] tcopeland: has joined #RubyOnRails
[23:01:46] fmcgeough: has joined #RubyOnRails
[23:07:36] roshanavand: has joined #RubyOnRails
[23:15:50] orbyt_: has joined #RubyOnRails
[23:30:09] cnk: has joined #RubyOnRails
[23:31:49] jphase: has joined #RubyOnRails
[23:34:19] jphase: has joined #RubyOnRails
[23:35:19] jphase: has joined #RubyOnRails
[23:46:08] andrew9184: has joined #RubyOnRails
[23:47:50] jphase: has joined #RubyOnRails
[23:51:04] ahrs: has joined #RubyOnRails
[23:59:57] bruno-: has joined #RubyOnRails