« Back to channel list

#RubyOnRails - 05 May 2017

« Back 1 day Forward 1 day »
[00:00:09] mjora7: has joined #RubyOnRails
[00:17:19] tetraktys: has joined #RubyOnRails
[00:21:15] quirkycoders: has joined #RubyOnRails
[00:21:41] Technodrome: has joined #RubyOnRails
[00:24:34] gusrub: has joined #RubyOnRails
[00:32:25] aajjbb: has joined #RubyOnRails
[00:32:27] Jayson_Virissimo: has joined #RubyOnRails
[00:39:06] brent__: has joined #RubyOnRails
[00:47:42] bronson: has joined #RubyOnRails
[00:50:05] bronson: has joined #RubyOnRails
[00:53:23] gusrub: has joined #RubyOnRails
[00:55:16] User458764: has joined #RubyOnRails
[01:41:09] brent__: has joined #RubyOnRails
[01:44:52] Pumukel: has joined #RubyOnRails
[01:51:52] Technodrome: has joined #RubyOnRails
[01:52:43] banisterfiend: has joined #RubyOnRails
[01:53:12] patarr: has joined #RubyOnRails
[02:08:39] y2mq37: has joined #RubyOnRails
[02:10:12] iliketurtles: has joined #RubyOnRails
[02:10:45] jjaii9: has joined #RubyOnRails
[02:11:37] Jameser: has joined #RubyOnRails
[02:11:55] jjaii9: is it possible to "insert" into window.history and URL (with pushState/replaceState) so that when clicking the back button (i.e popstate event) they'll go to that URL instead of the previous URL in the history? thanks
[02:14:06] banisterfiend: anyone here famliar with oauth 1.0 ?
[02:18:43] bronson: has joined #RubyOnRails
[02:23:14] Aytan72: has joined #RubyOnRails
[02:31:25] romeoh: has joined #RubyOnRails
[02:32:36] irishfromua: has joined #RubyOnRails
[02:36:59] juiko: has joined #RubyOnRails
[02:40:35] irishfromua: has joined #RubyOnRails
[02:41:27] MasterAsia: I can't get capybara to work with Ubuntu
[02:41:33] MasterAsia: Which driver do you folks recommend?
[03:00:17] sandstrom: has joined #RubyOnRails
[03:14:27] xall: has joined #RubyOnRails
[03:20:03] bronson: has joined #RubyOnRails
[03:21:17] drcapulet: has joined #RubyOnRails
[03:32:26] patarr: has joined #RubyOnRails
[03:32:42] quirkycoders: has joined #RubyOnRails
[03:33:38] Pumukel: has joined #RubyOnRails
[03:39:07] bronson: has joined #RubyOnRails
[03:56:35] banisterfiend: anyone here awake?
[04:04:30] dionysus69: has joined #RubyOnRails
[04:11:53] beingjohnm: I am having a brain fart. This form "<%= bootstrap_form_for @activity, :url => {:action => "associate_with_user"} do |f| %>" when submitted is producing Parameters: {"utf8"=>"✓", "authenticity_token"=>"7G2WRZQ31i3j784KbkVC3zDsOM80ORWhxjoA5cn4S23uTUjZXhQrhlLDenU2AHCSnXa/spav04y3KseCptpbFw==", "activity"=>{"user_id"=>"495b6916-40b3-4b06-a1cf-67514d18e32d"}, "commit"=>"Save changes", "id"=>"associate_with_user"}
[04:12:25] beingjohnm: why is the id that is being passed the name of the custom action?
[04:12:42] aajjbb: has joined #RubyOnRails
[04:13:22] patarr: has joined #RubyOnRails
[04:21:37] Jayson_Virissimo: has joined #RubyOnRails
[04:24:38] Aytan72: has joined #RubyOnRails
[04:32:56] conta: has joined #RubyOnRails
[04:33:19] baweaver: banisterfiend: We're all woke here
[04:33:35] banisterfiend: baweaver oh awesome :) Do you have experience with oauth 1.0 by any chance?
[04:33:39] baweaver: How're things?
[04:33:46] baweaver: off the top of my head, no
[04:34:02] baweaver: We might be able to find something anyways.
[04:34:02] banisterfiend: I have a stupid question, here: http://stackoverflow.com/questions/43796571/how-to-exclude-commit-field-from-rails-post-payload
[04:35:26] baweaver: Drat, so no backend intercepts then.
[04:35:43] baweaver: There _may_ be a way in JS to make sure the body sent from it doesn't contain that
[04:35:55] y2mq37: has joined #RubyOnRails
[04:36:39] banisterfiend: Yeah, i got no idea
[04:36:51] baweaver: poking around a bit, but not sure
[04:36:51] banisterfiend: i'm not that great at HTML/front-end/javascript stuff, so there might be something i don't know about
[04:37:10] banisterfiend: But i had assumed posting to oauth 1.0 endpoints was a fairly common thing but i can't find any info on it
[04:37:29] baweaver: http://stackoverflow.com/questions/5384712/capture-a-form-submit-in-javascript
[04:37:49] baweaver: attachEvent might be able to nerf that data
[04:38:08] baweaver: Hacky, yes. Better ideas currently? Not really
[04:38:47] baweaver: you can also bind to the submit action and do your code and kill Rails actions there
[04:40:56] banisterfiend: baweaver ah got an answer
[04:41:05] banisterfiend: baweaver apparently i just have to get rid of the 'name' attribute of the submit tag
[04:41:11] banisterfiend: then it won't have an associated field/value in the payload
[04:41:26] baweaver: that sounds less hack :D
[04:41:28] banisterfiend: I really should learn HTML sometime :D
[04:41:38] banisterfiend: baweaver thanks for your help!
[04:41:45] baweaver: It's an occupational hazard
[04:41:48] baweaver: cheers mate
[04:41:57] baweaver: we're over in offtopic if you want to drop in some time
[04:49:07] Technodrome: has joined #RubyOnRails
[04:51:04] beingjohnm: I gave up. Just added a hidden field to the form and modified the update action in the cotnroller. I think the issue was with creating the form with the custom action in model A but the form was for model B. Routing issue. Too tired to think about it any more. Bed time.
[05:21:40] Pumukel: has joined #RubyOnRails
[05:28:16] y2mq37: has joined #RubyOnRails
[05:29:11] dionysus69: has joined #RubyOnRails
[05:51:34] tetraktys: has joined #RubyOnRails
[05:56:16] y2mq37: has joined #RubyOnRails
[06:03:03] Pumukel: has joined #RubyOnRails
[06:10:26] xall: has joined #RubyOnRails
[06:15:36] k13nox: has joined #RubyOnRails
[06:20:12] srinidhi: has joined #RubyOnRails
[06:26:32] quirkycoders: has joined #RubyOnRails
[06:28:28] duderonomy: has joined #RubyOnRails
[06:33:58] xall_: has joined #RubyOnRails
[06:35:32] AzaToth: has joined #RubyOnRails
[06:36:44] patarr: has joined #RubyOnRails
[06:39:28] wethu: has joined #RubyOnRails
[06:45:29] frojnd: has joined #RubyOnRails
[06:45:32] frojnd: Hello there
[06:47:57] frojnd: I have a question that I don't even know how to ask :) Let say I get current product url path like this: product_url(@product["id"]) which returns something like this: http://localhost:3000/products/2" now how can I get that same url but for scoped product so it would return what I have in scope like this: "http://localhost:3000/supervisor_users/products/2" ? Is this already done or I have to write a
[06:48:03] frojnd: helper method?
[06:49:22] SteenJobs: has joined #RubyOnRails
[06:50:06] foxmask: has joined #RubyOnRails
[06:52:01] Technodrome: has joined #RubyOnRails
[06:54:16] quirkycoders: has joined #RubyOnRails
[06:54:47] frojnd: nevermind I'll write my own
[06:55:33] bronson: has joined #RubyOnRails
[06:57:44] soahccc: frojnd: if you have proper routes helpers should already be available
[07:10:18] xall_: has joined #RubyOnRails
[07:12:28] sandstrom: has joined #RubyOnRails
[07:12:47] mjora7: has joined #RubyOnRails
[07:13:56] frojnd: soahccc: do you know how would I get "http://localhost:3000" or basically anything that's before root_path "/" ?
[07:15:19] soahccc: frojnd: _url instead of _path gives you a full URL but why do you want that? It's rarely needed (mails) and if you want to be correct: redirects
[07:17:15] Jameser: has joined #RubyOnRails
[07:19:27] frojnd: yeah I'll just use helpers in my basecontroller
[07:25:29] Jameser: has joined #RubyOnRails
[07:27:29] kristofferR: has joined #RubyOnRails
[07:29:58] quirkycoders: has joined #RubyOnRails
[07:30:24] mikecmpbll: has joined #RubyOnRails
[07:32:50] Pumukel: has joined #RubyOnRails
[07:34:08] jeyraof^mbpr: has joined #RubyOnRails
[07:35:33] Pumukel: has joined #RubyOnRails
[07:36:55] blackmesa: has joined #RubyOnRails
[07:40:39] defsdoor: has joined #RubyOnRails
[07:44:06] blackmesa: has joined #RubyOnRails
[07:46:21] frojnd: I wanna write this: format.js { render :show, request: request } in a way so I set absolute render path like this: format.js { render "products/show", request: request } the proble is that it's not working. Any ideas how to use renders?
[07:51:48] Jameser: has joined #RubyOnRails
[07:56:03] bronson: has joined #RubyOnRails
[07:58:00] mikecmpbll: has joined #RubyOnRails
[08:00:31] srinidhi: has joined #RubyOnRails
[08:06:24] quirkycoders: has joined #RubyOnRails
[08:09:39] Jameser: has joined #RubyOnRails
[08:16:02] mauro1254: has joined #RubyOnRails
[08:16:06] k13nox: has joined #RubyOnRails
[08:22:25] Jameser: has joined #RubyOnRails
[08:25:58] Aytan72: has joined #RubyOnRails
[08:40:25] marr: has joined #RubyOnRails
[08:43:50] User458764: has joined #RubyOnRails
[08:44:17] tetraktys: has joined #RubyOnRails
[08:44:53] cgfbee: has joined #RubyOnRails
[08:47:01] Pumukel: has joined #RubyOnRails
[08:53:17] lxsameer: has joined #RubyOnRails
[09:17:07] patarr: has joined #RubyOnRails
[09:18:23] MrCrackPotBuilde: has joined #RubyOnRails
[09:24:25] Jameser: has joined #RubyOnRails
[09:32:51] scrooloose: has joined #RubyOnRails
[09:43:44] User458764: has joined #RubyOnRails
[09:44:42] tetraktys: has joined #RubyOnRails
[09:49:59] antib: has joined #RubyOnRails
[09:53:04] rgr: has joined #RubyOnRails
[09:54:49] Jameser: has joined #RubyOnRails
[09:56:54] bronson: has joined #RubyOnRails
[10:01:02] ravster: has joined #RubyOnRails
[10:14:35] ferr: has joined #RubyOnRails
[10:16:15] blackmesa: has joined #RubyOnRails
[10:18:09] arup_r: has joined #RubyOnRails
[10:22:37] wethu: has joined #RubyOnRails
[10:26:12] ionte: has joined #RubyOnRails
[10:29:10] quirkycoders: has joined #RubyOnRails
[10:30:07] arup_r: has joined #RubyOnRails
[10:32:13] manzo: has joined #RubyOnRails
[10:32:41] jlebrech: has joined #RubyOnRails
[10:33:32] jlebrech: I want to put my angularjs frontend code into rails 5.1 and use webpacker. how will webpacker handle angularjs templates?
[10:39:50] blackmesa: has joined #RubyOnRails
[10:46:30] arup_r: has joined #RubyOnRails
[10:48:31] helpa-bot: has joined #RubyOnRails
[10:50:02] nickjj_: has joined #RubyOnRails
[10:51:34] helpa: has joined #RubyOnRails
[10:54:12] mahloun: has joined #RubyOnRails
[11:04:52] quirkycoders: has joined #RubyOnRails
[11:10:56] jlebrech: i might just put my js in public/
[11:17:40] patarr: has joined #RubyOnRails
[11:18:25] tetraktys: has joined #RubyOnRails
[11:18:27] loechel: has joined #RubyOnRails
[11:54:36] universa1: jlebrech: doesn't it have an angular ooption for webpacker? not sure if it was in the list
[11:55:04] xco: has joined #RubyOnRails
[11:55:08] jlebrech: universa1: yeah, angular but not angularjs. so i don't know if i'll work with the old angular 1.x
[11:56:04] jlebrech: universa1: i'll need webpacker to concat, uglify and create my templatecache. but i'm not how to proceed
[11:57:38] blackmesa: has joined #RubyOnRails
[11:58:04] bronson: has joined #RubyOnRails
[11:58:46] jlebrech: can gulp we run with webpacker? i could reduce my gulpfile to what's missing in webpacker?
[12:00:17] xco: hi. can an extra eye help me on this one? i’m getting `undefined method `>' for nil:NilClass` on this line https://gist.github.com/siaw23/cb76d8102cb0459e3002b86e4a59e27c#file-extra_eye-html-erb-L19 funny thing is it’s only happening in dev not production…
[12:03:38] User458764: has joined #RubyOnRails
[12:04:21] tetraktys: has joined #RubyOnRails
[12:08:24] universa1: xco: error trace?!
[12:09:43] xco: just this `app/views/admin/similar_object_stats/index.html.erb:19:in `_app_views_admin_similar_object_stats_index_html_erb__1955456209645894389_70224371198320'
[12:10:04] universa1: copy the full error trace and add it to the gist please.
[12:10:57] xco: universa1: https://gist.github.com/siaw23/cb76d8102cb0459e3002b86e4a59e27c#file-trace-txt here ;)
[12:11:15] universa1: but if you have a nil error, you have 4 differnt @ variables, print them out before to see which one is actually nil?!
[12:11:38] universa1: https://gist.github.com/siaw23/cb76d8102cb0459e3002b86e4a59e27c#file-trace-txt-L2
[12:11:49] universa1: now which one looks like to be nil ;)
[12:12:42] Pumukel: has joined #RubyOnRails
[12:14:35] aajjbb: has joined #RubyOnRails
[12:14:44] universa1: so you want something like @last_reset.present? : time_ago_in_words(@last_reset) : t(".never")
[12:15:01] universa1: replace the first colon with a question mark ;)
[12:15:15] universa1: so bool ? true_path : false_path ;)
[12:16:19] xco: universa1: awesome tip
[12:17:11] xco: found which one is nil
[12:19:09] xco: has left #RubyOnRails: ()
[12:22:53] blackmesa: has joined #RubyOnRails
[12:28:12] Aytan72: has joined #RubyOnRails
[12:46:18] scrooloose: has joined #RubyOnRails
[12:47:27] romeoh: has joined #RubyOnRails
[12:50:42] jsrn: has joined #RubyOnRails
[12:53:29] helpa-bot: has joined #RubyOnRails
[12:55:29] helpa-bot: has joined #RubyOnRails
[12:57:31] helpa-bot: has joined #RubyOnRails
[12:59:32] helpa-bot: has joined #RubyOnRails
[13:01:33] helpa-bot: has joined #RubyOnRails
[13:03:35] helpa: has joined #RubyOnRails
[13:04:40] Jameser: has joined #RubyOnRails
[13:05:11] uks: has joined #RubyOnRails
[13:05:36] Pumukel: has joined #RubyOnRails
[13:09:52] aajjbb: has joined #RubyOnRails
[13:10:08] Aytan72: has joined #RubyOnRails
[13:14:31] sandstrom: has joined #RubyOnRails
[13:14:31] mattwc: has joined #RubyOnRails
[13:15:37] gaucheph: has joined #RubyOnRails
[13:16:22] jlebrech: include a directory :) require.context('../app/scripts', true, /\.js$/);
[13:16:48] Doldge: has joined #RubyOnRails
[13:17:34] Technodrome: has joined #RubyOnRails
[13:23:48] LBRapid: has joined #RubyOnRails
[13:27:01] sandstrom: has joined #RubyOnRails
[13:27:28] mattwc: has joined #RubyOnRails
[13:29:17] ResidentBiscuit: has joined #RubyOnRails
[13:30:19] jphase_: has joined #RubyOnRails
[13:31:13] DLSteve: has joined #RubyOnRails
[13:37:07] quirkycoders: has joined #RubyOnRails
[13:38:12] quirkycoders: has joined #RubyOnRails
[13:44:06] jlebrech: universa1: i've managed to webpack my scripts :) i'm thinking maybe templates should go in rails/views to use erb in some instances
[13:49:15] fernandomm: has joined #RubyOnRails
[13:51:07] bergelmir: has joined #RubyOnRails
[13:51:12] bergelmir: Hey guys, i need milliseconds in a database column. `updated_at` and `created_at` have milliseconds, but my own columns (defined like `updated_at` and `created_at`, db/schema.rb) doesn't. Column definition: `t.datetime :created_at, null: false` and `t.datetime :received_at, null: false`
[13:54:16] JDeen: Any one tried to setup carrierwave to use local storage for rspec/development and aws for production?
[13:59:07] bronson: has joined #RubyOnRails
[14:03:27] Technodrome: has joined #RubyOnRails
[14:04:42] User458764: has joined #RubyOnRails
[14:07:00] patarr: has joined #RubyOnRails
[14:07:22] GeorgesLeYeti: has joined #RubyOnRails
[14:07:37] GeorgesLeYeti: I'm having an issue with sidekiq
[14:07:48] mustmodify: has joined #RubyOnRails
[14:08:00] GeorgesLeYeti: I don't understant why but it doesn't thread my workers
[14:08:22] fryguy: how do you know
[14:10:03] SteenJobs: has joined #RubyOnRails
[14:11:19] quirkycoders: has joined #RubyOnRails
[14:13:02] chouhoulis: has joined #RubyOnRails
[14:14:15] GeorgesLeYeti: I restart a new rails app
[14:14:19] GeorgesLeYeti: https://gist.github.com/anonymous/18329455cd4516843bc9eff27d37118e
[14:14:59] fryguy: ok, and then what happens
[14:20:07] GeorgesLeYeti: If i run SoftWorker.perform_async and right after HardWorker.perform_async it runs first 2017-05-05T14:18:13.542Z 22224 TID-m88o8 SoftWorker JID-bee8b16c517cec91fe1b27f2 INFO: start and then 2017-05-05T14:18:17.651Z 22224 TID-m88ys HardWorker JID-93aa0ac4694e3cd7160b4c9c INFO: start
[14:20:20] choke: has joined #RubyOnRails
[14:20:50] GeorgesLeYeti: But the issue is that it starts the process for hard when soft is done
[14:21:02] quirkycoders: has joined #RubyOnRails
[14:24:14] bergelmir: i really don't get it... why won't rails save the datetime/time milliseconds to the database :-(
[14:26:57] mustmodify: If you're looking for a js framework/toolset/whatever for your next project, I've been using React for a project and highly recommend it. I was productive almost immediately and the learning curve was pretty light. It's surprisingly great. Of course, I already know some of the prerequisites, so YMMV.
[14:28:38] GeorgesLeYeti: Ok I think it's due to something new in sidekiq
[14:28:48] GeorgesLeYeti: I set the gem to 4.0.0 and now it works
[14:32:44] mustmodify: has left #RubyOnRails: ()
[14:36:15] Pumukel: has joined #RubyOnRails
[14:39:35] rgr_: has joined #RubyOnRails
[14:42:00] |RicharD|: has joined #RubyOnRails
[14:43:14] |RicharD|: Guys why when I update the user email with .update_atrribute the validators on email of devise are skipped ?
[14:43:30] |RicharD|: (while when I create a new user, they works)
[14:45:05] ResidentBiscuit: has joined #RubyOnRails
[14:47:26] quirkycoders: has joined #RubyOnRails
[14:47:48] yaw: has joined #RubyOnRails
[14:48:16] quirkycoders: has joined #RubyOnRails
[14:49:42] yaw: matthewd: according to the comment, Instrumentation should be the last module included, and ParamsWrapper should come before it https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/api.rb#L131
[14:50:14] yaw: is the current line up appropriate? otherwise I could send a PR
[14:54:58] jlebrech: kinda having trouble setting up ngtemplate-loader in webpacker
[14:58:30] |RicharD|: I've fixed, the problem is that with devise you shouldn't use update_attribute
[14:58:41] |RicharD|: but update_with_password
[14:58:44] |RicharD|: that is a devise method
[15:00:08] SteenJobs: has joined #RubyOnRails
[15:03:27] scrooloose: has joined #RubyOnRails
[15:04:02] scrooloose: has joined #RubyOnRails
[15:05:48] scrooloose: has joined #RubyOnRails
[15:06:33] SteenJobs: has joined #RubyOnRails
[15:09:42] scrooloose: has joined #RubyOnRails
[15:12:13] bronson: has joined #RubyOnRails
[15:15:34] itarato: has joined #RubyOnRails
[15:28:53] andywww: has joined #RubyOnRails
[15:32:32] gaucheph: has joined #RubyOnRails
[15:37:56] tercenya: has joined #RubyOnRails
[15:39:28] quirkycoders: has joined #RubyOnRails
[15:43:27] [Butch]: has joined #RubyOnRails
[15:45:30] chrisarcand: has joined #RubyOnRails
[15:46:59] HoierM: has joined #RubyOnRails
[15:47:52] HoierM: has joined #RubyOnRails
[15:48:37] GodFather: has joined #RubyOnRails
[15:48:41] HoierM: has joined #RubyOnRails
[15:49:40] HoierM: has joined #RubyOnRails
[15:50:22] quirkycoders: has joined #RubyOnRails
[15:50:56] HoierM: has joined #RubyOnRails
[15:51:53] HoierM: has joined #RubyOnRails
[15:52:44] HoierM: has joined #RubyOnRails
[15:53:46] HoierM: has joined #RubyOnRails
[15:54:10] gusrub: has joined #RubyOnRails
[15:54:17] jphase: has joined #RubyOnRails
[15:54:49] HoierM: has joined #RubyOnRails
[15:55:37] polishdub: has joined #RubyOnRails
[15:56:05] HoierM: has joined #RubyOnRails
[15:56:56] HoierM: has joined #RubyOnRails
[15:57:24] Technodrome: has joined #RubyOnRails
[15:57:57] HoierM: has joined #RubyOnRails
[15:58:52] HoierM: has joined #RubyOnRails
[15:59:05] gaucheph: has joined #RubyOnRails
[15:59:52] HoierM: has joined #RubyOnRails
[16:00:05] sandstrom: has joined #RubyOnRails
[16:01:14] HoierM: has joined #RubyOnRails
[16:02:30] HoierM: has joined #RubyOnRails
[16:03:33] HoierM: has joined #RubyOnRails
[16:04:37] HoierM: has joined #RubyOnRails
[16:05:53] HoierM: has joined #RubyOnRails
[16:06:53] HoierM: has joined #RubyOnRails
[16:08:41] HoierM: has joined #RubyOnRails
[16:09:13] gusrub: has joined #RubyOnRails
[16:10:08] HoierM: has joined #RubyOnRails
[16:16:58] romeoh: has joined #RubyOnRails
[16:24:07] juggler: has joined #RubyOnRails
[16:25:09] SteenJobs: has joined #RubyOnRails
[16:28:53] gusrub: has joined #RubyOnRails
[16:31:14] arBmind: has joined #RubyOnRails
[16:34:08] jphase_: has joined #RubyOnRails
[16:43:30] blackmesa: has joined #RubyOnRails
[16:55:13] sandstrom: has joined #RubyOnRails
[17:06:30] pLaTo0n: has joined #RubyOnRails
[17:14:46] mostlybadfly: has joined #RubyOnRails
[17:17:55] romeoh: has joined #RubyOnRails
[17:21:05] romeoh: has joined #RubyOnRails
[17:21:27] gusrub: has joined #RubyOnRails
[17:24:10] User458764: has joined #RubyOnRails
[17:27:09] kies^: has joined #RubyOnRails
[17:35:01] conta5: has joined #RubyOnRails
[17:39:17] xall_: has joined #RubyOnRails
[17:40:40] bronson: has joined #RubyOnRails
[17:42:01] gusrub: has joined #RubyOnRails
[17:44:14] quirkycoders: has joined #RubyOnRails
[17:49:26] mikecmpbll: has joined #RubyOnRails
[17:49:39] brendan-: has joined #RubyOnRails
[17:55:02] waseem_: has joined #RubyOnRails
[17:56:08] gusrub: has joined #RubyOnRails
[17:56:36] mikecmpbll: has joined #RubyOnRails
[18:01:08] Pumukel: has joined #RubyOnRails
[18:01:56] waseem_: has joined #RubyOnRails
[18:02:15] quirkycoders: has joined #RubyOnRails
[18:03:30] Dbugger: has joined #RubyOnRails
[18:03:32] Dbugger: Hello everyone
[18:03:36] gusrub: has joined #RubyOnRails
[18:04:12] Dbugger: Weird bug: I have a controller that ends with a "render json: { status: "success" }". This seems to work on development, but on production i get a 500 error. What did I miss here???
[18:10:57] waseem_: has joined #RubyOnRails
[18:11:17] segy: has joined #RubyOnRails
[18:11:24] waseem_: dbugger: What is the error and its backtrace?
[18:15:11] ahrs: has joined #RubyOnRails
[18:16:28] waseem_: has joined #RubyOnRails
[18:17:05] jsrn_: has joined #RubyOnRails
[18:18:31] User458764: has joined #RubyOnRails
[18:19:01] Dbugger: waseem_, well, the problem is that there is no log anywhere...
[18:19:09] Dbugger: log/production.log tells me nothing
[18:20:05] waseem_: dbugger: Is the server running on localhost? How did you start your server?
[18:20:22] segy: has joined #RubyOnRails
[18:20:30] Dbugger: locally I use "rails s". On production im using nginx passenger. May I should look there...
[18:20:59] bronson: has joined #RubyOnRails
[18:21:37] waseem_: dbugger: Yeah look under your system logs. /var/logs/nginx probably.
[18:25:39] Dbugger: Insteresting, seems to be a mailer, even though.... I am not using it...
[18:26:21] Dbugger: Oh! Apparently I needed to restart nginx... weird...
[18:26:34] Dbugger: In any case, thanks for the idea of looking into nginx logs, and not rails!
[18:28:32] Technodrome: has joined #RubyOnRails
[18:33:10] mjora7: has joined #RubyOnRails
[18:36:05] andrew9184: has joined #RubyOnRails
[18:38:49] cek: How do I skip only selected validations on #save ?
[18:39:14] cek: for ex., skip specific belongs_to rel , but keep others
[18:41:03] cek: other than hacks like this https://richonrails.com/articles/skipping-validations-in-ruby-on-rails
[18:42:07] Pumukel: has joined #RubyOnRails
[18:43:37] jsrn_: has joined #RubyOnRails
[18:44:03] makerops: has joined #RubyOnRails
[18:44:22] makerops: is there anyway to remove the Accept-Encoding header from rest-client"
[18:44:33] makerops: the server Im sending it to, doesn't seem to like it
[18:46:35] Technodrome: has joined #RubyOnRails
[18:50:09] amperry: has joined #RubyOnRails
[18:54:04] mjora7: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[18:55:18] planigan: has joined #RubyOnRails
[18:56:11] lxsameer: has joined #RubyOnRails
[18:57:28] waseem_: has joined #RubyOnRails
[18:59:34] ravster: has joined #RubyOnRails
[19:00:24] User458764: has joined #RubyOnRails
[19:05:29] Aherin: has joined #RubyOnRails
[19:09:30] romeoh: has left #RubyOnRails: ()
[19:11:54] mlt-: So do I have to pass hidden parent id for children while using nested attributes??? http://stackoverflow.com/q/34842242/673826 It seems odd
[19:12:50] mlt-: Everywhere I read, hidden field is not used, but my params are missing parent id among nested attributes :(
[19:12:55] mlt-: Am I doing something wrong?
[19:14:05] cek: has left #RubyOnRails: ()
[19:17:53] nachoman: has joined #RubyOnRails
[19:18:13] nachoman: Hi all, I'm experiencing some difficulties with sprockets on rails 4.2.8
[19:18:27] nachoman: And ember loader, actually
[19:18:33] nachoman: Anyone has some experience on that?
[19:18:42] Dbugger: has joined #RubyOnRails
[19:18:45] Dbugger: Hello everyone
[19:19:06] Dbugger: I have a problem... My mailer is not sending any mail. How could I debug what is the reason for that?
[19:19:06] nachoman: How are you?
[19:19:21] Dbugger: Hi nacho___ Im good, just a little stressed, thanks
[19:19:24] nachoman: Well, do your templates work fine at least?
[19:19:34] nachoman: Fine, thanks ;)
[19:19:52] Dbugger: nacho___, Well if I look at the console, everything seems to print out perfectly. I see the templates on the terminal
[19:19:52] nachoman: If your templates render fine, that's already good
[19:20:13] nachoman: and then, what are you supposed to be using to send this mail?
[19:20:17] nachoman: A provider?
[19:20:30] nachoman: Is the configuration for the provider ok?
[19:20:37] nachoman: And your credentials correct?
[19:20:45] Dbugger: The terminal actually says "Sent mail to yourmail@gmail.com (1065.9ms)"
[19:21:00] Dbugger: Well, I set the following:
[19:21:22] Dbugger: https://hastebin.com/xehesaboje.rb
[19:21:30] Dbugger: Which im wondering... maybe it is there the problem?
[19:22:47] nachoman: config.action_mailer.perform_deliveries = true
[19:22:47] nachoman: config.action_mailer.raise_delivery_errors = false
[19:22:48] nachoman: What about these configs? ç
[19:22:57] Dbugger: Let me add them
[19:24:11] Dbugger: No problem seems to appear nowhere
[19:25:34] Dbugger: nacho___, this is what the log says when I try it: https://hastebin.com/esuyiqovuq.php
[19:27:21] blackmesa: has joined #RubyOnRails
[19:29:53] nachoman: This part seems to be ok
[19:30:11] nachoman: I wonder whether the problem is on authentication with the gmail server
[19:30:23] nachoman: Any log on that?
[19:32:33] Dbugger: Well, I tried with my personal Google account now
[19:32:47] Dbugger: and I got that because Iuse 2 step auth, i need to create an app password
[19:32:52] Dbugger: so I created it, pasted it...
[19:33:05] mlt-: Sometimes I use Wireshark if logs don't help :-)
[19:33:07] Dbugger: But on the "Last Used" field still says nothing
[19:33:23] Dbugger: nacho___, Where could I look?
[19:34:05] nachoman: Maybe set the raise_delivery_errors to true and you'll get an exception
[19:34:18] nachoman: From there, you might get some more information
[19:35:46] Dbugger: But I see nothing on the log, on errors
[19:36:16] Dbugger: maybe i need to restart the server...?
[19:36:46] Dbugger: Buah! Now works!
[19:36:56] Dbugger: After all the hassle, all I had to do was restart the server!!! o_O
[19:37:53] mlt-: dbugger: don't you have like guard or something?
[19:38:00] mlt-: to automate restarts
[19:38:23] Dbugger: well, wait, that was now using my personal email...
[19:38:30] Dbugger: now lets see if I use the one I should be using...
[19:39:01] Dbugger: If that fails, it is just that they did not give me the proper configuration details
[19:39:15] mlt-: so what was the deal? as nacho___ suggested "perform_deliveries = true" ?
[19:40:09] jsrn_: has left #RubyOnRails: ("Leaving")
[19:40:14] Dbugger: The customer has given me the wrong SMTP parameters
[19:40:22] Dbugger: because with my personal email works
[19:40:25] Dbugger: im gonna kill him
[19:40:28] Dbugger: right after he pays me
[19:40:36] nachoman: Cheers to that
[19:40:42] Dbugger: good grief...
[19:40:57] nachoman: By the way, any experience with ember and sprockets?
[19:41:05] Dbugger: thanks guys for the help!
[19:41:08] Dbugger: You guys are a godsend
[19:41:12] nachoman: I'm troubleshooting an issue here now and am a bit lost
[19:41:20] nachoman: no probs, dbugger
[19:41:22] Dbugger: sorry, 0 knowledge on that..
[19:41:29] Dbugger: Im out, for today. Bed calls
[19:41:33] Dbugger: See you all!
[19:42:14] mlt-: ACTION just learned about ember
[19:42:27] mlt-: Is it like knockout?
[19:43:14] patarr1: has joined #RubyOnRails
[19:43:45] mlt-: nacho___: anyway, so what is the issue?
[19:44:06] nachoman: Well, when precompiling the assets I get that sprockets cannot find ember/loader
[19:44:21] nachoman: Sprockets::FileNotFound: couldn't find file 'ember/loader' with type 'application/ecmascript-6+module'
[19:44:21] nachoman: Checked in these paths:
[19:44:37] nachoman: And I actually wonder why and what to do
[19:46:21] nachoman: This is on rails 4.2.8, in case it helps
[19:46:29] nachoman: And I can provide more info if needed
[19:51:31] Jayson_Virissimo: has joined #RubyOnRails
[19:54:59] hobodave: has joined #RubyOnRails
[19:56:43] mlt-: nacho___: as I said, I haven't used it... But from googling, I landed on https://github.com/emberjs/ember-gem/blob/master/lib/ember/templates/app/README.md that mentions "loader.js - Built out JS module loader"
[19:56:51] mlt-: I'm not sure what is supposed to build it
[19:57:10] mlt-: and it is like 2013
[19:57:48] nachoman: Well, actually the ember up is already running
[19:57:54] nachoman: What happens is the following
[19:58:04] nachoman: I run bundle exec rake assets:precompile RAILS_ENV=production
[19:58:10] nachoman: To get the assets precompiled
[19:58:26] nachoman: And after compiling some of them, I get this
[19:58:33] nachoman: Sprockets::FileNotFound: couldn't find file 'ember/loader' with type 'application/ecmascript-6+module'
[19:58:38] nachoman: And sprockets stops
[19:59:00] nachoman: I have actually found many issues with sprockets not finding files but nothing regarding this ember/loader
[19:59:06] nachoman: And I'm a bit lost now
[20:00:38] mlt-: Have you tried commenting out that line that requires ember/loader.... out of curiosity what would it break?
[20:01:04] nachoman: the thing is I searched for this ember/loader and I find nothing anywhere in the project
[20:02:14] mlt-: It is in https://github.com/emberjs/ember-rails/blob/3f154fc39cd704cd7bae0475cb6fd603fda3ed6f/app/assets/javascripts/ember-rails/application.module.es6
[20:02:24] mlt-: I suppose
[20:02:39] mlt-: I see there is also loader.js project from ember-cli
[20:02:45] mlt-: I have no idea what is it all about
[20:03:40] hobodave_: has joined #RubyOnRails
[20:04:06] mlt-: Do you have ember-cli-assets gem ?
[20:04:14] mlt-: https://github.com/emberjs/ember-rails/commit/6a5386b541458074492116f3644641a399fc8fd2
[20:07:35] nachoman: Nope, I don't
[20:07:47] nachoman: Let me check what happens if I add it
[20:07:47] mlt-: Time to try? :-)
[20:08:08] mlt-: Don't ask me why it is not being pulled as a dependency
[20:08:45] itarato: has joined #RubyOnRails
[20:09:24] nachoman: Though I think is a dependency of ember-rails
[20:09:29] nachoman: and that one I do have
[20:09:53] nachoman: Yup, it failed same way and I just checked the Gemfile.lock and it was already there
[20:10:18] nachoman: it's really weird this problem
[20:10:40] mlt-: huh... is there that loader.js in a proper place in that gem?
[20:10:42] nachoman: I just upgraded to rails 4.2.8 from 4.1.8 and it was all fine at 4.1.8
[20:10:49] nachoman: I'm checking that now
[20:11:03] mlt-: maybe some folders were renamed... but yeah... dependencies should've tracked it properly
[20:11:45] dionysus69: has joined #RubyOnRails
[20:12:04] nachoman: Actually, yes, there's this file there, the loader.rb
[20:12:22] nachoman: let's see if I find some js in there
[20:14:00] mlt-: no js... and I wonder why that 2013 sample projects says 'built out'
[20:14:11] nachoman: yup, it's really strange
[20:14:24] nachoman: It states that contains that loader.js file but I don't find it either
[20:14:28] mlt-: Is some rake task supposed to generate it?
[20:14:42] nachoman: I'll search on the gems whether there's such this file anywhere
[20:14:47] mlt-: in your local vendor folder or something?
[20:14:50] nachoman: but with that name I might get 100 targets
[20:14:58] nachoman: Yes, in the current gems on my box
[20:15:10] mlt-: I just search on GH :-)
[20:16:39] nachoman: Well, actually, there is
[20:16:42] nachoman: And it's there
[20:16:53] kies^: has joined #RubyOnRails
[20:17:02] nachoman: .rbenv/versions/2.3.1/lib/ruby/gems//2.3.0/gems/ember-emblem-template-0.4.0/lib/emblem
[20:17:14] mlt-: emblem!!!
[20:18:28] nachoman: .rbenv/versions/2.3.1/lib/ruby/gems//2.3.0/gems/ember-cli-assets-0.0.35/vendor/assets/ember
[20:18:31] nachoman: Copied the wron
[20:19:40] mlt-: so somehow this is not included in precompilation...
[20:20:01] nachoman: yup, I'm now checking in the log whether this is not available on the sprockets path or something like that
[20:20:10] mlt-: Out of curiosity have you tried copying it into local ./vendor/ ?
[20:20:51] nachoman: No, I didn't
[20:21:11] nachoman: I just found out that what sprockets checks as paths for this file
[20:21:20] nachoman: Doesn't contain this path
[20:21:42] nachoman: How could I add it there?, and why is it not already added?
[20:22:41] quirkycoders: has joined #RubyOnRails
[20:23:23] nachoman: I just added it to vendor/assets/javascripts and see what happens
[20:23:54] yaw: has joined #RubyOnRails
[20:25:56] nachoman: Well, it failed in the same way
[20:27:48] nachoman: Strange, anyway
[20:28:06] nachoman: I wonder whether I should fill up an issue in github for sprockets
[20:28:28] nachoman: Though I've seen there's some with similar content and the latest hasn't been commented after 10 days or so
[20:30:20] mlt-: just try adding them explicitly in ./config/initializers/assets.rb
[20:30:40] mlt-: Rails.application.config.assets.precompile += %w( ember/loader.js ) or something
[20:34:48] nachoman: I'm trying, though my expectations are quite low now
[20:35:04] nachoman: Well, it failed anyway
[20:35:16] dminuoso: ACTION puts his money on rbenv being the problem
[20:35:21] dminuoso: Good thing I have no money.
[20:36:10] quirkycoders: has joined #RubyOnRails
[20:36:43] nachoman: Well, I replicate it on the server
[20:36:49] nachoman: and the server is a debian
[20:36:52] bronson: has joined #RubyOnRails
[20:36:55] nachoman: I'm using rvm there
[20:37:02] nachoman: and same effect
[20:37:05] dminuoso: rvm is even worse!
[20:37:24] dminuoso: Im using neither and my sprockets is fine. Correlation clearly implies causality.
[20:37:39] dminuoso: ACTION stops the trolling and heads off
[20:38:07] Technodrome: has joined #RubyOnRails
[20:38:07] nachoman: dminuoso, any other point on this?, anything would be helpful
[20:38:50] dminuoso: nacho___, dont have enough of the log to even know what your problem is.
[20:38:54] dminuoso: Just connected a minute ago.
[20:39:16] nachoman: Ok, I'll paste it to you
[20:40:00] nachoman: https://hastebin.com/betaqoqaxi.sql
[20:40:34] duderonomy: has joined #RubyOnRails
[20:40:59] nachoman: And with traces
[20:41:00] nachoman: https://hastebin.com/owaseguyug.hs
[20:41:11] blackmesa: has joined #RubyOnRails
[20:42:13] mlt-: I think it can be paraphrased as how to precompile assets from other gems
[20:44:58] nachoman: To me, it looks like these requires in /Users/nacho/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/ember-rails-0.21.0/app/assets/javascripts/ember-rails/application.module.es6
[20:45:01] nachoman: At the beginning
[20:45:07] nachoman: Are not being resolved
[20:45:28] nachoman: They are actually pointing to ember-cli-assets and ember-rails gems
[20:46:05] nachoman: I wonder if it's just a syntax problem that sprockets has been updated to
[20:48:45] mlt-: Unrelated ruby Q. How to do an element to a subhash if its corresponding key in parent hash end_with something?
[20:48:53] mlt-: How to add
[20:50:25] mlt-: There got to be a common oneliner
[20:51:20] nachoman: What does corresponding key really mean?
[20:52:20] nachoman: because if it ends with something that means that they're not both the same
[20:52:49] mlt-: (:key_i_want => (:add_me => 1, :other => 2), :key_i_dont_want => (:blah => 3))
[20:53:22] mlt-: so I want to go over every key in parent that end_with '_i_want'
[20:53:50] mlt-: Context: http://stackoverflow.com/a/34789036/673826 I want to add an :id for nested attributes
[20:54:10] mlt-: I have multiple possible nested attributes that I don't want to hard code
[20:54:40] mlt-: and I don't want hidden id to pass from html form as security concern'
[20:55:06] nachoman: Well, guys, a pleasure, I'm leaving it for today
[20:55:33] nachoman: because I'm quite lost with this
[20:55:41] nachoman: Thanks for your help and support
[20:55:50] nachoman: See you next time
[20:58:03] quirkycoders: has joined #RubyOnRails
[21:03:12] Technodrome: has joined #RubyOnRails
[21:58:10] mahloun: has joined #RubyOnRails
[22:02:48] LightStalker: has joined #RubyOnRails
[22:09:34] Pumukel: has joined #RubyOnRails
[22:11:14] sandstrom: has joined #RubyOnRails
[22:20:17] Technodrome: has joined #RubyOnRails
[22:32:16] quirkycoders: has joined #RubyOnRails
[22:39:05] Pumukel: has joined #RubyOnRails
[22:39:53] Pumukel: has joined #RubyOnRails
[22:40:41] Pumukel: has joined #RubyOnRails
[22:41:29] Pumukel: has joined #RubyOnRails
[22:42:00] cagomez: has joined #RubyOnRails
[22:42:17] Pumukel: has joined #RubyOnRails
[22:43:39] cagomez: Is there a way to get ActiveRecord WHERE clause to search for `(orders_count IN (1,2,3))` rather than `clients.orders_count IN (1,3,5))`? from this answer http://stackoverflow.com/questions/10181864/ruby-activerecord-in-clause
[22:45:56] Jayson_Virissimo: What's the use-case, there might be a better way.
[22:46:31] Jayson_Virissimo: cagomez: you just want more ambiguity in your query?
[22:48:27] cagomez: Jayson_Virissimo: this is dumb but ... `SELECT "videos".* FROM "videos" WHERE (title NOT IN ('foo', 'bar'))` passes spec and `SELECT "videos".* FROM "videos" WHERE ("videos"."title" NOT IN ('foo', 'bar'))` doesn't
[22:49:59] cagomez: for the former, `where("title NOT IN...") is used. and I'm trying to avoid that by using `where.not(title: "foo")`
[22:57:03] Jayson_Virissimo: You already tried find_by_sql?
[22:57:24] Jayson_Virissimo: Although, honestly, that sounds like it might just be a bad spec.
[22:59:16] Jayson_Virissimo: So, your example is slightly different.
[22:59:56] cagomez: hmm well I'm a junior dev and was told to try using ActiveRecord methods rather than writing SQL
[22:59:56] Jayson_Virissimo: `where.not(title: "foo")` will use `!=`, but `where.not(title: ["foo", "bar"])` will use `NOT IN`.
[23:00:28] Jayson_Virissimo: Yeah, writing pure SQL shouldn't be your first choice.
[23:00:37] Jayson_Virissimo: More difficult to maintain.
[23:01:21] Jayson_Virissimo: When the spec fails, is it actually because it has incorrect output, or is it just in a different order or something?
[23:02:42] cagomez: the spec fails because my activerecord methods aren't finding the rows I need and return an empty array. whereas the old code with straight SQL delivers the rows. this is really weird
[23:03:14] cagomez: I've used .to_sql on both the old code and mine , inputted it into rails db, and they give the same results
[23:05:19] Jayson_Virissimo: Yeah, I doubt anyone would be able to help without seeing the specs and the scope/sql. Maybe create a gist or something?
[23:12:14] gaucheph: has joined #RubyOnRails
[23:23:33] DLSteve: has joined #RubyOnRails
[23:24:49] patarr: has joined #RubyOnRails
[23:35:38] waseem_: has joined #RubyOnRails
[23:38:07] bronson: has joined #RubyOnRails