« Back to channel list

#RubyOnRails - 24 October 2018

« Back 1 day Forward 1 day »
[00:00:35] zorp: has joined #RubyOnRails
[00:04:32] kurko__: has joined #RubyOnRails
[00:12:53] Xiti: has joined #RubyOnRails
[00:13:21] sevenseacat: has joined #RubyOnRails
[00:15:34] TvL2386: has joined #RubyOnRails
[00:31:38] MoritaShinobu: has joined #RubyOnRails
[01:09:44] MrPunkin: has joined #RubyOnRails
[01:26:38] gambl0re: has joined #RubyOnRails
[02:10:55] Dimik: has joined #RubyOnRails
[02:24:17] akosednar: has joined #RubyOnRails
[02:28:56] agent_white: has joined #RubyOnRails
[02:46:41] tdy: has joined #RubyOnRails
[02:48:27] Puffball: has joined #RubyOnRails
[03:09:38] braincrash: has joined #RubyOnRails
[03:17:00] zacts: has joined #RubyOnRails
[03:20:02] mangold: has joined #RubyOnRails
[03:40:38] dnewkerk: has joined #RubyOnRails
[03:58:58] fcser_: has joined #RubyOnRails
[04:10:57] kapil____: has joined #RubyOnRails
[04:19:24] danguita: has joined #RubyOnRails
[04:21:12] mangold: has joined #RubyOnRails
[04:42:46] dogweather: has joined #RubyOnRails
[04:42:53] tdy: has joined #RubyOnRails
[04:46:07] za1b1tsu: has joined #RubyOnRails
[05:01:48] Vashy: has left #RubyOnRails: ("Leaving")
[05:17:24] SteenJobs: has joined #RubyOnRails
[05:41:48] bga57: has joined #RubyOnRails
[05:44:01] hd1: has joined #RubyOnRails
[05:44:40] hd1: anyone have a rspec configured with jenkins??
[05:45:35] hd1: ACTION informs #rubyonrals that rspec shows all tests passing in console, but jenkins fails on all of them
[05:47:08] reber: has joined #RubyOnRails
[05:50:20] sevenseacat: what errors are you getting from jenkins?
[05:55:04] hd1: putting output on gist, standby
[05:55:37] hd1: https://gist.github.com/hasandiwan/3bfc28a99fc134dad8ef113ffca7eb24
[05:56:37] sevenseacat: whats in those output files?
[05:56:53] srinidhi: has joined #RubyOnRails
[06:00:11] hd1: results.xml?
[06:01:29] sevenseacat: that or results.html
[06:01:50] hd1: it's not finding the get method in a request spec
[06:02:08] hd1: which is bizarre
[06:02:15] sevenseacat: gist the full error?
[06:04:01] hd1: group development, test in my gemfile may be messing things up?
[06:05:08] sevenseacat: no idea. whats in it, and whats in that spec that's raising the error?
[06:06:23] hd1: still a no go
[06:07:36] sevenseacat: eh? that doesn't answer either question
[06:08:13] hd1: I tried to comment it out and go again, same error in jenkins, console still has none
[06:08:51] sevenseacat: commenting out random things won't fix anything
[06:17:11] hd1: why isn't it finding the HTTP methods, almost like it doesn't have httparty
[06:17:25] sevenseacat: can you answer the questions now?
[06:17:34] sevenseacat: httparty is totally unrelated to tests
[06:18:46] mangold: has joined #RubyOnRails
[06:21:55] hd1: full error's on the gistt
[06:22:08] voolik: has joined #RubyOnRails
[06:22:58] sevenseacat: so again, what's in the development, test group in your gemfile and what's in the spec that's raising the error?
[06:23:49] sevenseacat: you asked if they were messing things up, and its really hard to answer that without seeing them
[06:26:45] hd1: both have been put there
[06:29:16] sevenseacat: gem list looks fine. you don't need to include rspec as its a dependency of rspec-rails, but still
[06:34:44] Sirecote: has joined #RubyOnRails
[06:39:29] sevenseacat: missing a `require 'rails_helper'` or something of the ilk? the line numbers don'tmatch up
[06:45:47] dionysus69: has joined #RubyOnRails
[06:58:39] hd1: yes, that's not the entire spec, sevenseacat
[06:58:49] hd1: just the error-causing test
[07:00:16] dionysus69_: has joined #RubyOnRails
[07:08:35] sandstrom: has joined #RubyOnRails
[07:11:41] voolik: has joined #RubyOnRails
[07:20:34] hd1: has left #RubyOnRails: ()
[07:28:22] hadifarnoud: has joined #RubyOnRails
[07:31:40] tuor: has joined #RubyOnRails
[07:38:59] DoubleMalt: has joined #RubyOnRails
[07:56:36] mangold: has joined #RubyOnRails
[07:59:38] za1b1tsu: has joined #RubyOnRails
[08:12:44] mikecmpbll: has joined #RubyOnRails
[08:39:29] dogweather: has joined #RubyOnRails
[08:43:20] dogweather: has joined #RubyOnRails
[09:43:42] danguita: has joined #RubyOnRails
[09:44:13] nexraf1_: has joined #RubyOnRails
[09:47:19] nexraf1_: has joined #RubyOnRails
[09:50:57] hadifarnoud: has joined #RubyOnRails
[09:50:58] nexraf1_: has joined #RubyOnRails
[09:53:53] nexraf1_: has joined #RubyOnRails
[09:58:37] nexraf1_: has joined #RubyOnRails
[09:59:48] srinidhi: has joined #RubyOnRails
[10:01:28] hadifarnoud: has joined #RubyOnRails
[10:10:42] drale2k_: i am using form_with with default settings which uses "data-remote=true" but when i submit the form it does a normal submit instead of an xhr request and the page reloads
[10:11:35] drale2k_: looking at the generated HTML, it definitely say data-remote="true" on the form
[10:11:51] drale2k_: am i missing somehing ?
[10:16:04] hadifarnoud: has joined #RubyOnRails
[10:20:24] srinidhi: has joined #RubyOnRails
[10:24:00] voolik: the data-remote itself isn't understood by browsers, you need respective javascript to handle that
[10:24:39] voolik: anything that starts with data- is application level stuff, browsers don't use them.
[10:25:05] drale2k_: rails ujs should be taking care of that
[10:25:30] drale2k_: but i think i found the issue at least. It works when i add a submit button but when i submit the form with JS then it does a normal submit
[10:25:41] drale2k_: i think i have to use Rails.fire
[10:27:00] drale2k_: yes, this solved it!
[10:27:40] drale2k_: so instead of calling this.form.submit() with vanilla js, you have to use Rails.fire(this.form, 'submit')
[10:29:08] drale2k_: https://github.com/rails/rails/issues/29546
[10:33:35] apparition: has joined #RubyOnRails
[10:59:35] kurko_: has joined #RubyOnRails
[11:01:06] mikecmpbll: has joined #RubyOnRails
[11:17:53] lankanmon: has joined #RubyOnRails
[11:34:44] ldnunes: has joined #RubyOnRails
[11:40:56] roshanavand: has joined #RubyOnRails
[11:41:23] Saukk: has joined #RubyOnRails
[11:47:17] drale2k_: has joined #RubyOnRails
[12:00:03] whysthatso: has joined #RubyOnRails
[12:01:33] roshanavand: has joined #RubyOnRails
[12:02:12] wojnar: has joined #RubyOnRails
[12:12:34] jottr: has joined #RubyOnRails
[12:13:54] Ergo: has joined #RubyOnRails
[12:21:22] whysthatso: has joined #RubyOnRails
[12:41:58] zorp: has joined #RubyOnRails
[12:50:09] IanMalcolm: has joined #RubyOnRails
[12:50:58] za1b1tsu: has joined #RubyOnRails
[13:09:12] Croata: has joined #RubyOnRails
[13:13:32] dionysus69_: has joined #RubyOnRails
[13:16:10] Psy-Q: can i not have a resource nested in singular with only: 'show', but also in plural on the rootlevel so i get post/put/patch there?
[13:17:52] Psy-Q: like such: https://gitlab.zhdk.ch/snippets/8
[13:19:28] Psy-Q: it wants to give me the routes in singular style: POST /hosting_configurations(.:format)
[13:22:58] Psy-Q: ah no, maybe it's correct and i fucked up
[13:25:33] lexileo: has joined #RubyOnRails
[13:28:54] Psy-Q: i fucked up, carry on
[13:42:35] cxl: has joined #RubyOnRails
[13:46:30] nexraf1: has joined #RubyOnRails
[13:49:03] nexraf1: has joined #RubyOnRails
[13:49:54] IanMalcolm: has joined #RubyOnRails
[13:54:00] srinidhi: has joined #RubyOnRails
[14:04:51] illsorted: has joined #RubyOnRails
[14:05:36] nzst: has joined #RubyOnRails
[14:13:52] nzst: Good morning, any good resources on chinese localization someone is willing to share, please?
[14:14:41] dionysus69: has joined #RubyOnRails
[14:17:26] nexraf1_: has joined #RubyOnRails
[14:28:38] IanMalcolm: has joined #RubyOnRails
[14:32:37] samort7: has joined #RubyOnRails
[14:33:31] samort7: I'm trying to learn bootstrap with rails. If I have a row and I want to give that row a border - what do I need to do? I tried adding .row { border: 1px solid red } to my .scss file but it has no effect.
[14:35:13] SteenJobs: has joined #RubyOnRails
[14:40:34] nzst: does the .row class exist in the markup on the frontend? you can inspect the element using chrome, i think you can right click and copy the selector for the element you want, as well.
[14:41:11] nzst: also, it's possible .row isn't specific enough and different css gets applied
[14:42:08] samort7: ok,m I guess I had it in the wrong place. Can you tell me what the difference is between these two files? I have an application.scss file and a static_pages.scss file (from a view/controlelr I created)
[14:42:29] samort7: the CSS changes only work if I put them in the application.css file. What is the static_pages.scss file used for then?
[14:42:37] samort7: *application.scss
[14:45:14] nzst: you probably have to import or include the static_pages.scss in your application.scss
[14:45:38] nzst: @import 'static_pages.scss';
[14:45:49] nzst: sorry, @import 'static_pages';
[14:50:56] samort7: nzst: oooh that makes sense
[14:53:09] samort7: nzst: It worked! Thanks!
[14:53:37] nzst: samort7: sure thing, you're welcome
[14:56:46] samort7: Is it normal to have to use a lot of !important tags to overwrite default bootstrap CSS stylings?
[15:00:14] chouhoulis: has joined #RubyOnRails
[15:01:26] orbyt_: has joined #RubyOnRails
[15:23:53] beowuff: has joined #RubyOnRails
[15:24:32] eddof13: has joined #RubyOnRails
[15:32:10] nzst: Yes, if you find you're overwriting default bootstrap styles a lot, maybe don't use bootstrap
[15:45:39] orbyt_: has joined #RubyOnRails
[15:49:27] blackmesa: has joined #RubyOnRails
[15:52:04] dbugger_: has joined #RubyOnRails
[15:54:46] Skull0Inc: has joined #RubyOnRails
[16:15:10] conta1: has joined #RubyOnRails
[16:15:44] SteenJobs: has joined #RubyOnRails
[16:39:50] orbyt_: has joined #RubyOnRails
[16:45:30] eckhardt_: has joined #RubyOnRails
[16:46:03] kurko_: has joined #RubyOnRails
[16:46:56] mikecmpb_: has joined #RubyOnRails
[16:46:58] darkhanb: has joined #RubyOnRails
[17:02:46] blackmesa: has joined #RubyOnRails
[17:22:02] desperek: has joined #RubyOnRails
[17:43:01] chouhoulis: has joined #RubyOnRails
[17:43:14] beholders_eye: has joined #RubyOnRails
[17:47:16] maryo: has joined #RubyOnRails
[17:48:04] jari: has joined #RubyOnRails
[17:48:09] chouhoulis: has joined #RubyOnRails
[17:48:55] jari: suppose i have an activerecord model
[17:49:30] jari: is it possible to call this model via a ruby script that outputs it to stdout in json format?
[17:50:43] tdy: has joined #RubyOnRails
[17:50:56] jari: like i call "ruby output.rb" and it outputs the model in json format
[17:51:16] Xiti: has joined #RubyOnRails
[18:03:59] Skull0Inc: has joined #RubyOnRails
[18:08:55] pocketkk: has joined #RubyOnRails
[18:11:29] SteenJobs: has joined #RubyOnRails
[18:16:10] jottr: has joined #RubyOnRails
[18:16:47] samort7: nzst: I was just overwriting things like default colors mostly.
[18:17:44] nzst: _ari: I see some leads with the google search "use activerecord in a ruby script"
[18:25:10] nzst: samort7: I'm sure it's ok if you're just learning, something to keep in mind though. I'd google around "boostrap override css" to get some best practice ideas. ALso, there's a ##bootstrap channel on irc.freenode.net
[18:25:46] samort7: oh neat, thanks!
[18:25:48] nzst: samort7: for example, from the docs, here are some thoughts on how to theme bootstrap
[18:25:49] nzst: https://getbootstrap.com/docs/4.1/getting-started/theming/
[18:30:15] kurko_: has joined #RubyOnRails
[18:31:54] SteenJobs: has joined #RubyOnRails
[18:39:10] OrangeManBad: has joined #RubyOnRails
[18:39:32] zorp_: has joined #RubyOnRails
[18:39:56] Skull0Inc: Hey all - Am now looking back into a production project I haven't touched for a while, but in development mode I'm not getting any console request output. Any ideas what I need to change to get requiest output in console for debugging?
[18:40:09] gambl0r3: has joined #RubyOnRails
[18:41:03] FCser: has joined #RubyOnRails
[18:41:35] LenPayne_: has joined #RubyOnRails
[18:43:48] crankhar1er: has joined #RubyOnRails
[18:46:07] nzst: Skull0inc: maybe your log level needs changed https://guides.rubyonrails.org/debugging_rails_applications.html#log-levels
[18:48:47] lankanmon_: has joined #RubyOnRails
[18:49:05] beingjohnm_: has joined #RubyOnRails
[18:49:17] Alchemic: has joined #RubyOnRails
[18:50:30] funnel: has joined #RubyOnRails
[18:51:27] Skull0Inc: nzst , in my case both logger levels are at 0.
[18:57:30] lexileo: has joined #RubyOnRails
[19:13:51] sandstrom: has joined #RubyOnRails
[19:17:34] Skull0Inc: Ahh found it! Managed to do stdout_redirect ... in config/puma.rb
[19:19:34] Skull0Inc: Thanks for response anyway nzst.
[19:19:47] nzst: sure, glad you figured it out
[19:21:07] mikecmpbll: has joined #RubyOnRails
[19:29:01] Inside: has joined #RubyOnRails
[19:32:36] ellcs: has joined #RubyOnRails
[19:32:43] blackmesa: has joined #RubyOnRails
[19:33:42] Xiti: has joined #RubyOnRails
[19:49:10] orbyt_: has joined #RubyOnRails
[19:49:27] sandstrom: has joined #RubyOnRails
[19:52:20] whysthatso: has joined #RubyOnRails
[19:59:42] Xiti: has joined #RubyOnRails
[20:17:20] iLogic: has joined #RubyOnRails
[20:23:56] jottr: has joined #RubyOnRails
[20:25:23] SteenJobs: has joined #RubyOnRails
[20:44:23] eddof13: has joined #RubyOnRails
[20:44:54] nzst: has left #RubyOnRails: ("Using Circe, the loveliest of all IRC clients")
[20:46:20] orbyt_: has joined #RubyOnRails
[20:46:57] nexraf1_: has joined #RubyOnRails
[20:50:00] s2013: has joined #RubyOnRails
[20:59:01] mochiyoda: has joined #RubyOnRails
[21:02:05] chouhoulis: has joined #RubyOnRails
[21:07:32] chouhoulis: has joined #RubyOnRails
[21:18:31] chouhoulis: has joined #RubyOnRails
[21:22:47] trif: has joined #RubyOnRails
[21:29:19] orbyt_: I'm writing a test that performs a call requiring authorization (JWT) and then after the response makes an unauthorized call.
[21:29:49] orbyt_: I'm seeing some very odd behavior in that some parts of the first request seem to be cached in a way
[21:30:30] orbyt_: The authentication flow for the controllers essentially just decodes the token and finds the appropriate user, setting it as @current_user
[21:30:49] orbyt_: What seems to happen is that @current_user is still populated on the second request, even though no JWT is given
[21:31:26] orbyt_: This code seems to work for real requests, but the tests are not
[21:34:18] orbyt_: We have a `before` block (using RSpec) that before each request adds a JWT to `request.env["HTTP_AUTHORIZATION"]`, so my first attempt was to add an unless clause here and use test metadata, e.g. `unless test.metadata[:unauthorize]`. Giving my test case the :unauthorize flag would then cause it to also be applied to it's immediate `before` clause, which needs to be authorized
[21:35:30] orbyt_: I then tried doing both requests in the same test case, and manually setting `reques.env["HTTP_AUTHORIZATION"]` to nil, and while the controller shows the header as nonexistant, the @current_user is still populated from the previous request as mentioned earlier
[21:35:47] orbyt_: If anyone knows what might be going on i'd love to hear it
[21:39:16] blackmesa: has joined #RubyOnRails
[21:45:14] OrangeManBad: has joined #RubyOnRails
[21:53:16] havenwood: has joined #RubyOnRails
[22:06:22] tdy: has joined #RubyOnRails
[22:07:26] eddof13: has joined #RubyOnRails
[22:12:46] Dimik: has joined #RubyOnRails
[22:37:39] HeyoRockbreaker: has joined #RubyOnRails
[22:37:53] HeyoRockbreaker: Hey all, quick conceptual question regarding testing suites when someone has a moment
[22:43:28] HeyoRockbreaker: Actually scrap that
[22:51:22] Puffball: has joined #RubyOnRails
[22:51:59] HeyoRockbreaker: I know this is vague, but if anyone has an idea as to why system tests are yielding a blank screen for me with nothing else, it would be much appreciated. I've Googled around and have found nothing on the subject with regards to setting anything up. I'm running an Ubuntu VM. I'll post a gist of the timeout error I receive in a second.
[22:52:52] HeyoRockbreaker: gist: https://gist.github.com/HeyoRockbreaker/6a7c5ca7c00e20166af86d66531598d3
[23:00:55] ellcs: has joined #RubyOnRails
[23:02:27] orbyt_: has joined #RubyOnRails
[23:12:06] orbyt_: How can I access a variable in my controller from an RSpec test?
[23:13:02] orbyt_: ApplicationController exposes a redis function that uses MockRedis during tests, and i'd like to get a reference to this to inject data into the mock redis instance during test
[23:30:17] mangold: has joined #RubyOnRails
[23:57:37] SteenJobs: has joined #RubyOnRails