« Back to channel list

#RubyOnRails - 21 May 2018

« Back 1 day Forward 1 day »
[00:09:20] jnollette: has joined #RubyOnRails
[00:31:17] Zarathu: has joined #RubyOnRails
[00:31:26] Zarathu: has left #RubyOnRails: ()
[00:40:16] alfiemax: has joined #RubyOnRails
[01:58:14] alfiemax: has joined #RubyOnRails
[01:59:44] cagomez: has joined #RubyOnRails
[01:59:45] woohoou: has joined #RubyOnRails
[02:05:18] cschneid: has joined #RubyOnRails
[02:38:36] alfiemax: has joined #RubyOnRails
[02:41:14] sevenseacat: has joined #RubyOnRails
[02:46:24] Saukk: has joined #RubyOnRails
[02:51:05] tdy: has joined #RubyOnRails
[03:27:24] duderonomy: has joined #RubyOnRails
[03:59:59] sevenseacat: has joined #RubyOnRails
[04:10:59] harryv: has joined #RubyOnRails
[04:28:35] MrCrackPotBuilde: has joined #RubyOnRails
[04:29:10] MrCrackPotBuilde: has joined #RubyOnRails
[04:46:21] conta: has joined #RubyOnRails
[04:53:01] alfiemax: has joined #RubyOnRails
[04:56:26] alfiemax_: has joined #RubyOnRails
[05:00:57] armyriad: has joined #RubyOnRails
[05:01:39] vimal2012: has joined #RubyOnRails
[05:15:22] srinidhi: has joined #RubyOnRails
[05:28:55] ur5us: has joined #RubyOnRails
[05:37:53] srinidhi: has joined #RubyOnRails
[05:50:26] duderonomy: has joined #RubyOnRails
[05:53:03] sidx64: has joined #RubyOnRails
[06:00:26] sidx64: has joined #RubyOnRails
[06:06:58] roshanavand: has joined #RubyOnRails
[06:09:48] tuskkk___: has joined #RubyOnRails
[06:13:05] conta: has joined #RubyOnRails
[06:28:45] reber: has joined #RubyOnRails
[06:33:16] sidx64: has joined #RubyOnRails
[06:45:24] mtkd: has joined #RubyOnRails
[06:45:33] sidx64: has joined #RubyOnRails
[06:58:36] sidx64: has joined #RubyOnRails
[06:59:46] srinidhi: has joined #RubyOnRails
[07:10:38] nOwz: has joined #RubyOnRails
[07:12:40] sidx64_: has joined #RubyOnRails
[07:17:10] sidx64: has joined #RubyOnRails
[07:18:43] apeiros: has joined #RubyOnRails
[07:20:21] sidx64: has joined #RubyOnRails
[07:35:53] sidx64: has joined #RubyOnRails
[07:38:33] dionysus69: has joined #RubyOnRails
[07:39:57] kapil___: has joined #RubyOnRails
[07:50:38] apeiros: has joined #RubyOnRails
[07:52:26] MrCrackPotBuilde: has joined #RubyOnRails
[08:08:38] dionysus69: has joined #RubyOnRails
[08:11:39] apeiros: has joined #RubyOnRails
[08:17:46] dionysus69: has joined #RubyOnRails
[08:35:27] KeyJoo: has joined #RubyOnRails
[08:38:21] apeiros: has joined #RubyOnRails
[08:41:13] apeiros: has joined #RubyOnRails
[08:58:05] roshanavand: has joined #RubyOnRails
[09:01:36] marr: has joined #RubyOnRails
[09:10:11] Fernando-Basso: has joined #RubyOnRails
[09:11:56] lxsameer: has joined #RubyOnRails
[09:20:16] ur5us: has joined #RubyOnRails
[09:36:52] sidx64: has joined #RubyOnRails
[09:52:00] thone: has joined #RubyOnRails
[09:59:26] conta: has joined #RubyOnRails
[10:10:44] mikecmpbll: has joined #RubyOnRails
[10:14:46] kapil___: has joined #RubyOnRails
[10:17:55] alfiemax: has joined #RubyOnRails
[10:20:57] alfiemax: has joined #RubyOnRails
[10:28:58] tbuehlmann: https://github.com/tbuehlmann/active_record-returning_attributes *cries in agony*
[10:32:21] conta: has joined #RubyOnRails
[10:32:49] Radar: shoulda used rom
[10:33:38] ma5ter: has joined #RubyOnRails
[10:37:37] sidx64: has joined #RubyOnRails
[10:39:18] conta: has joined #RubyOnRails
[10:44:38] kapil___: Hey how to disable rails development log? It's getting so big
[10:46:14] RougeR: has joined #RubyOnRails
[10:49:06] RougeR: has anyone got an example rspec create test i could look at
[10:49:20] RougeR: im stuck on how you are meant to test the count and input params
[10:49:22] RougeR: https://gist.github.com/CodePint/c903b01f7bb2f19dbb873efa05cc0944
[10:58:58] conta: has joined #RubyOnRails
[11:09:48] conta: has joined #RubyOnRails
[11:11:06] tbuehlmann: RougeR: no example, but you probably want `expect { post(:create, params: {gym: gym_create}) }.to change(Gym, :count).by(1)`
[11:13:57] RougeR: tbuehlmann: i think ive got that actually now so im close
[11:14:03] RougeR: its just not passing
[11:14:04] RougeR: https://gist.github.com/CodePint/f09f601a68c672e2d48e40552fdf43ca
[11:14:12] RougeR: sorry im a noob trying to learn this on my own
[11:14:19] tbuehlmann: what's the error?
[11:14:30] RougeR: no error, it just doesnt increment by one
[11:14:36] RougeR: should = 1, does = 0
[11:14:37] blackcross: has joined #RubyOnRails
[11:15:02] tbuehlmann: maybe a failing validation?
[11:16:36] RougeR: im doubtful, as im using the same data in a seeds.rb
[11:16:44] RougeR: ill have a play in the console
[11:17:54] Puffball: has joined #RubyOnRails
[11:18:41] sidx64: has joined #RubyOnRails
[11:18:41] tbuehlmann: have you checked the logs?
[11:19:03] fox_mulder_cp: oh. i'm glad. I create rails activecable based web chat with reactjs front. How we can test active cable via rspec?
[11:21:12] RougeR: xpected #count to have changed by 1, but was changed by 0
[11:21:12] RougeR: # ./spec/controllers/gyms_controller_spec.rb:35:in `block (3 levels) in <top (required)>'
[11:21:36] RougeR: i can try throwing in a binding.pry and running the method then see what it throws up
[11:22:47] mtkd: has joined #RubyOnRails
[11:23:09] tbuehlmann: yup, good idea. also have a look at log/test.log, looking out for a redirect or something
[11:23:41] Cavallari: has joined #RubyOnRails
[11:23:53] RougeR: tbuehlmann: im going to post the output
[11:23:55] RougeR: its not saving
[11:24:00] RougeR: but i dont understand why
[11:24:04] RougeR: its a valid object
[11:25:29] RougeR: https://gist.github.com/CodePint/3bfb0525a56b9758f043cc3df4fe0f0d
[11:27:34] tbuehlmann: have you placed a pry debugger in the controller action and tried a bit?
[11:28:05] RougeR: https://gist.github.com/CodePint/ac5f9d0081694fefdf021b4caed949c0
[11:28:12] RougeR: tbuehlmann: yep
[11:28:17] RougeR: thats what im doing
[11:28:38] tbuehlmann: inside the actual controller action?
[11:29:51] RougeR: no, sorry i was doing it in the spec
[11:30:02] RougeR: i know that this works in production
[11:30:54] tbuehlmann: place binding.pry in the actual controller action and run the example
[11:31:16] tbuehlmann: then, step by step, do what the action does and see what happens
[11:31:31] DrYockel: has joined #RubyOnRails
[11:35:31] RougeR: gym_create = {{ gym_name: "The Castle Gym", about: "Classic multi story climbing gym in central london", address: "Finsbury Park - London", email: "castleclimbing@gmail.com" } }
[11:35:31] RougeR: SyntaxError: unexpected '}', expecting =>
[11:35:31] RougeR: "castleclimbing@gmail.com" } }
[11:35:43] RougeR: my syntax for that is really confusing me
[11:36:00] RougeR: if i dont put {{ }} in the test it throws an error
[11:36:03] tbuehlmann: that's probably not in the controller, what are you doing right now?
[11:36:28] RougeR: i put binding.pry in on the first line of the create method in the controller
[11:36:34] RougeR: then submitted an empty form to hit it
[11:38:06] tbuehlmann: just leave binding.pry there and run your spec
[11:38:13] tbuehlmann: don't do anything with the browser for now
[11:40:43] RougeR: it cant access the local variable
[11:41:01] RougeR: gym_create
[11:41:17] RougeR: when i run post :create, param:{gym: gym_create}
[11:41:18] tbuehlmann: it doesn't exist in the controller, you just have the params
[11:41:31] RougeR: alright okay
[11:41:35] RougeR: yeah that makes sense
[11:41:36] tbuehlmann: in the controller you're using the gym_params method
[11:42:38] RougeR: undefined method post?
[11:42:52] RougeR: i assume im running the wrong command and its meant to be different in the controller
[11:43:16] tbuehlmann: you don't need to run anything from your spec, you are in the controller
[11:43:42] tbuehlmann: just do every step from the action manually and check for if/else cases
[11:44:14] RougeR: spotted it...
[11:44:26] RougeR: ive got an if statement on current_user
[11:46:15] RougeR: i replaced if current_user.gym_owner with if true (cba to rewrite)
[11:46:26] RougeR: POST #create
[11:46:27] RougeR: returns a success response
[11:46:29] RougeR: test passes
[11:46:47] RougeR: i completly forgot that i cant seem to get current_user working in my tests
[11:47:09] RougeR: thankyou for walking me through that, i wouldnt have thought to put binding.pry in the controller
[11:48:20] tbuehlmann: great, you're welcome
[11:49:34] RougeR: yeah, one more problem down :)
[11:51:39] cschneid: has joined #RubyOnRails
[11:56:11] RougeR: one last quick question,
[11:56:24] RougeR: is this the correct way to get current_user working for controller tests
[11:56:24] RougeR: https://github.com/plataformatec/devise/wiki/How-To:-Test-with-Capybara
[11:56:28] conta: has joined #RubyOnRails
[11:56:38] RougeR: i know it says capybara but it seems to be what i wantr
[11:59:50] Saukk: has joined #RubyOnRails
[12:02:01] Technodrome: has joined #RubyOnRails
[12:02:58] sidx64: has joined #RubyOnRails
[12:04:09] lxsameer: has joined #RubyOnRails
[12:05:43] duderonomy: has joined #RubyOnRails
[12:07:03] dmarr: has joined #RubyOnRails
[12:07:43] gs: has joined #RubyOnRails
[12:12:41] sidx64: has joined #RubyOnRails
[12:17:19] tbuehlmann: you probably want this: https://github.com/plataformatec/devise/wiki/How-To:-Test-controllers-with-Rails-3-and-4-%28and-RSpec%29
[12:22:33] mikecmpbll: has joined #RubyOnRails
[12:46:48] borodin: has joined #RubyOnRails
[12:56:01] conta: has joined #RubyOnRails
[13:04:38] sidx64: has joined #RubyOnRails
[13:06:27] sidx64: has joined #RubyOnRails
[13:08:47] Prutheus: has joined #RubyOnRails
[13:09:20] Prutheus: Hello. I want to use the gem 'easy_captcha' in my rails app. But after setting it up, I get following error when navigating to any site defined in my routes: `undefined method `after_filter' for ApplicationController:Class Did you mean? after_action`
[13:09:30] Prutheus: How can I fix that stupid error?
[13:10:18] tbuehlmann: after_filter was a method available in earlier versions of rails. that gem needs to move to using before_action instead of before_filter
[13:11:41] Prutheus: hm but I dont want/cant edit the whole gem ... any idea how I quickfix that? or do you want to update the gem? :) ^^
[13:13:57] tbuehlmann: a quickfix is forking and changing the gem
[13:16:52] Prutheus: could you do that for me please? :D ^^
[13:25:24] tbuehlmann: consider that project dead: last commit in 2015, targetting rails 3
[13:26:03] lupine: remember kids: always do due diligence on your dependences
[13:26:05] lupine: dependencies*
[13:27:22] mtkd: has joined #RubyOnRails
[13:36:15] schneider: has joined #RubyOnRails
[13:38:34] duderonomy: has joined #RubyOnRails
[13:59:23] Technodrome: has joined #RubyOnRails
[14:07:33] RougeR: tbuehlmann: should i be able to call current_user from within users_controller_spec
[14:09:12] tbuehlmann: no, that's a controller method
[14:23:36] apeiros: has joined #RubyOnRails
[14:27:13] schneider: has joined #RubyOnRails
[14:30:09] chouhoulis: has joined #RubyOnRails
[14:35:16] sidx64: has joined #RubyOnRails
[14:39:15] quazimodo: has joined #RubyOnRails
[14:54:22] troys: has joined #RubyOnRails
[15:04:24] chouhoulis: has joined #RubyOnRails
[15:08:53] DrYockel: has joined #RubyOnRails
[15:15:53] apeiros: has joined #RubyOnRails
[15:19:38] dblessing: has joined #RubyOnRails
[15:19:41] conr: has joined #RubyOnRails
[15:20:54] conr: How can I clone and run a 2 year old rails project using an older version of Ruby and Rails but I have 2.5.1 on my MacOS? rbenv local?
[15:21:17] catbusters: has joined #RubyOnRails
[15:23:46] apeiros: has joined #RubyOnRails
[15:25:44] duderonomy: has joined #RubyOnRails
[15:32:27] mtkd: has joined #RubyOnRails
[15:35:58] conta: has joined #RubyOnRails
[15:36:33] apeiros: has joined #RubyOnRails
[15:41:21] cagomez: has joined #RubyOnRails
[15:53:36] apeiros: has joined #RubyOnRails
[15:54:47] mtkd: has joined #RubyOnRails
[15:55:43] duderonomy: has joined #RubyOnRails
[15:56:35] armyriad: has joined #RubyOnRails
[15:58:01] apeiros: has joined #RubyOnRails
[16:01:51] dionysus69: has joined #RubyOnRails
[16:15:15] apeiros_: has joined #RubyOnRails
[16:18:54] darkhanb: has joined #RubyOnRails
[16:33:56] DoubleMalt: has joined #RubyOnRails
[16:35:51] safetypin: has joined #RubyOnRails
[16:41:36] conta: has joined #RubyOnRails
[16:51:23] mikecmpbll: has joined #RubyOnRails
[16:53:42] sandstrom: has joined #RubyOnRails
[17:07:17] Cache_Money: has joined #RubyOnRails
[17:08:50] alfiemax: has joined #RubyOnRails
[17:27:33] sidx64: has joined #RubyOnRails
[17:43:13] srinidhi: has joined #RubyOnRails
[17:44:48] fragamus: has joined #RubyOnRails
[17:46:55] mices: has joined #RubyOnRails
[17:47:46] mices: how can i make my dev environment more like production so i don't keep getting caught by surprise with things not working in production that were working in development
[17:48:04] mices: and i don't have to keep going back to my server
[17:55:59] slash_nick: has joined #RubyOnRails
[17:57:01] andywww: has joined #RubyOnRails
[17:57:34] nOwz: mices: by using docker ?
[17:58:03] nOwz: I know that nanobox is now free for "one man dev"
[17:58:07] s2013: has joined #RubyOnRails
[17:58:13] nOwz: You could try it though, it looks great!
[17:58:53] nOwz: but you can also setup a staging, which is only accessible for you, to tries before sending in production server
[17:59:49] andywww: Hi, in my test data i have Trip has_many Rides has_many waypoints with 22 waypoints spread across 4 rides in 1 trip. I’m using jsonapi-resources with the associations detailed in the resources as mentioned
[17:59:59] mtkd: has joined #RubyOnRails
[18:00:25] andywww: for some reason, despite acknowledging the ride_id, the query is not filtering the waypoints by that ride ID and is returning all waypoints for all rides
[18:00:26] andywww: https://gist.github.com/wanabewired/32bec30d79ff316f8c61dfe9fda56d84
[18:00:37] andywww: am i doing something obviously wrong?
[18:07:52] dblessing: has joined #RubyOnRails
[18:08:10] duderonomy: has joined #RubyOnRails
[18:16:08] duderonomy: has joined #RubyOnRails
[18:19:18] duderono_: has joined #RubyOnRails
[18:20:21] Saukk: has joined #RubyOnRails
[18:23:47] chouhoulis: has joined #RubyOnRails
[18:27:32] sandstrom: has joined #RubyOnRails
[18:37:23] duderonomy: has joined #RubyOnRails
[18:40:28] darkhanb: has joined #RubyOnRails
[18:44:02] Prutheus: has joined #RubyOnRails
[18:45:48] Prutheus: Hello. i am using scss stylesheet files. after editing, my page does not recompile them, so no update ... any ideas?
[18:46:08] dviola: has joined #RubyOnRails
[18:46:58] abhinavmehta: has joined #RubyOnRails
[19:03:19] duderonomy: has joined #RubyOnRails
[19:05:07] catbusters: has joined #RubyOnRails
[19:06:21] fox_mulder_cp: prutheus (s)css must be compiled on server
[19:06:40] fox_mulder_cp: after it you can update page in browser to reload new js/css bundles
[19:08:12] jottr: has joined #RubyOnRails
[19:09:55] duderono_: has joined #RubyOnRails
[19:14:18] _aeris_: has joined #RubyOnRails
[19:19:23] duderonomy: has joined #RubyOnRails
[19:20:18] cagomez: has joined #RubyOnRails
[19:37:10] cagomez: has joined #RubyOnRails
[19:42:56] fragamus: has joined #RubyOnRails
[19:45:36] duderonomy: has joined #RubyOnRails
[19:51:24] nickjj: has joined #RubyOnRails
[19:59:49] fsmauri21: has joined #RubyOnRails
[20:00:00] alfiemax: has joined #RubyOnRails
[20:09:26] schneider: has joined #RubyOnRails
[20:18:07] cagomez: has joined #RubyOnRails
[20:21:28] sagax: has joined #RubyOnRails
[20:35:41] alfiemax: has joined #RubyOnRails
[20:50:20] fragamus: has joined #RubyOnRails
[20:53:47] sidx64: has joined #RubyOnRails
[20:55:36] orbyt_: has joined #RubyOnRails
[21:10:47] s2013: has joined #RubyOnRails
[21:15:45] alfiemax: has joined #RubyOnRails
[21:34:43] alfiemax: has joined #RubyOnRails
[21:43:16] safetypin: has joined #RubyOnRails
[21:47:44] alfiemax: has joined #RubyOnRails
[21:51:13] conr: has left #RubyOnRails: ()
[21:51:49] Fernando-Basso: has joined #RubyOnRails
[21:55:03] cagomez: has joined #RubyOnRails
[21:55:38] Technodrome: has joined #RubyOnRails
[21:58:11] irdis: has joined #RubyOnRails
[22:05:09] alfiemax: has joined #RubyOnRails
[22:08:44] cagomez: has joined #RubyOnRails
[22:13:58] ur5us: has joined #RubyOnRails
[22:23:03] alfiemax: has joined #RubyOnRails
[22:34:26] mikecmpbll: has joined #RubyOnRails
[22:36:50] orbyt_: has joined #RubyOnRails
[22:40:00] alfiemax: has joined #RubyOnRails
[22:53:02] ArTiSTiX: has joined #RubyOnRails
[22:57:19] alfiemax: has joined #RubyOnRails
[22:57:54] umpc: has joined #RubyOnRails
[23:10:26] \13k: has joined #RubyOnRails
[23:13:30] Skull0Inc: has joined #RubyOnRails
[23:14:37] alfiemax: has joined #RubyOnRails
[23:25:44] Skull0Inc: Hey all, never really ran into this one before but : in trying to load an external <script> tag (TripAdvisor). It loads initially on first page load - however when I go to another link on same site and return to where the script is - it doesn't load. I think because its being cached. has anyone come across this know a way around to force load script even though cached?
[23:28:50] harrycs: has joined #RubyOnRails
[23:31:07] chocoelho: has joined #RubyOnRails
[23:45:40] Ericx2x: has joined #RubyOnRails
[23:49:58] alfiemax: has joined #RubyOnRails