« Back to channel list

#RubyOnRails - 18 February 2019

« Back 1 day Forward 1 day »
[00:23:46] my1es: has joined #RubyOnRails
[00:34:46] valadares: has joined #RubyOnRails
[00:38:39] Technodrome: has joined #RubyOnRails
[01:01:10] Psy-Q: has joined #RubyOnRails
[01:22:09] gambl0r3: has joined #RubyOnRails
[01:49:42] sevenseacat: has joined #RubyOnRails
[02:07:51] mangold: has joined #RubyOnRails
[02:37:14] Croata: has joined #RubyOnRails
[03:07:34] orbyt_: has joined #RubyOnRails
[03:17:44] hnanon: has joined #RubyOnRails
[03:18:27] hnanon: If I have an inclusion validation, for example, is a presence validation redundant?
[03:21:50] Saukk: has joined #RubyOnRails
[03:29:03] barhum2013: has joined #RubyOnRails
[03:39:51] barhum2013: has joined #RubyOnRails
[04:05:16] blackmesa: has joined #RubyOnRails
[04:09:09] braincrash: has joined #RubyOnRails
[04:13:06] hahuang6-: has joined #RubyOnRails
[04:16:18] barhum2013: has joined #RubyOnRails
[04:16:44] NeXTSUN: has joined #RubyOnRails
[04:22:51] orbyt_: has joined #RubyOnRails
[04:28:17] barhum2013: has joined #RubyOnRails
[04:38:20] srinidhi: has joined #RubyOnRails
[04:39:22] barhum2013: has joined #RubyOnRails
[04:47:03] WRONgG: has joined #RubyOnRails
[04:54:59] fcser_: has joined #RubyOnRails
[05:11:57] Technodrome: has joined #RubyOnRails
[05:22:25] iAmDecim: has joined #RubyOnRails
[05:47:20] barhum2013: has joined #RubyOnRails
[05:50:51] uks: has joined #RubyOnRails
[06:05:32] gambl0r3: has joined #RubyOnRails
[06:15:32] conta: has joined #RubyOnRails
[06:17:50] barhum2013: has joined #RubyOnRails
[06:26:46] barhum2013: has joined #RubyOnRails
[06:28:52] barhum2013: has joined #RubyOnRails
[06:31:11] dionysus69: has joined #RubyOnRails
[06:40:15] v01d4lph4: has joined #RubyOnRails
[06:46:12] barhum2013: has joined #RubyOnRails
[07:17:34] booboy: has joined #RubyOnRails
[07:20:26] cschneid: has joined #RubyOnRails
[07:41:21] Puffball: has joined #RubyOnRails
[07:43:10] v01d4lph4: has joined #RubyOnRails
[07:56:59] Linuus: has joined #RubyOnRails
[08:03:13] prestorium: has joined #RubyOnRails
[08:13:55] v01d4lph4: has joined #RubyOnRails
[08:18:26] v01d4lph4: has joined #RubyOnRails
[08:22:02] mikecmpbll: has joined #RubyOnRails
[08:25:09] gambl0r3: has joined #RubyOnRails
[08:30:29] k4lim: has joined #RubyOnRails
[08:32:35] GeorgesLeYeti: has joined #RubyOnRails
[08:33:55] GeorgesLeYeti: I have an important issue with my rails application. I'm using puma and in my puma_access.log all the parameters are visible and not filtered, even the password is writing in clear.
[08:34:03] GeorgesLeYeti: How can I fix that ?
[08:35:04] GeorgesLeYeti: I already add the Rails.application.config.filter_parameters += [:password] in my initializers
[08:35:19] GeorgesLeYeti: This works only for the log of my rails app
[08:38:02] conta: has joined #RubyOnRails
[08:38:54] DTZUZO_: has joined #RubyOnRails
[08:39:13] tbuehlmann: how do you make puma log to puma_access.log?
[08:40:03] GeorgesLeYeti: set :puma_access_log, "#{release_path}/log/puma.access.log"
[08:40:14] GeorgesLeYeti: In my deploy.rb
[08:44:41] tbuehlmann: what config does this set?
[08:45:50] GeorgesLeYeti: I'm using capistrano and capistrano-puma
[08:45:57] GeorgesLeYeti: https://github.com/seuros/capistrano-puma
[08:46:21] GeorgesLeYeti: This is the default configuration
[08:47:29] v01d4lph4: has joined #RubyOnRails
[08:48:03] v01d4lph4: has joined #RubyOnRails
[08:49:06] randohinn: has joined #RubyOnRails
[08:51:07] randohinn: Say I have something like this in my routes file: https://paste.debian.net/1068659/ Is it possible to have a middleware, that will run on only the subdomains?
[08:51:46] mikecmpbll: has joined #RubyOnRails
[08:53:26] srinidhi: has joined #RubyOnRails
[08:54:08] randohinn: Or is rails middleware ran for the entire application?
[08:56:34] tbuehlmann: GeorgesLeYeti: what setting does this set on puma?
[08:57:36] lxsameer: has joined #RubyOnRails
[08:58:05] randohinn: Nevermid, I have another place I can do what I need
[09:04:57] prestorium: has joined #RubyOnRails
[09:05:50] davidh38: has joined #RubyOnRails
[09:07:23] GeorgesLeYeti: tbuehlmann, Ok sorry my bad
[09:07:28] GeorgesLeYeti: I found my problem
[09:07:42] GeorgesLeYeti: I'm just stupid
[09:07:52] GeorgesLeYeti: I printed the params
[09:08:50] tbuehlmann: sounds like monday
[09:12:57] ariedler: has joined #RubyOnRails
[09:16:58] mangold: has joined #RubyOnRails
[09:34:55] deathwishdave: has joined #RubyOnRails
[09:42:19] blackmesa: has joined #RubyOnRails
[09:46:16] barhum2013: has joined #RubyOnRails
[10:02:41] srinidhi: has joined #RubyOnRails
[10:05:00] gambl0r3: has joined #RubyOnRails
[10:11:03] ams__: has joined #RubyOnRails
[10:23:48] gambl0r3: has joined #RubyOnRails
[10:28:07] drale2k_: has joined #RubyOnRails
[10:48:26] davidh38: has joined #RubyOnRails
[10:48:51] mikecmpb_: has joined #RubyOnRails
[11:27:19] srinidhi: has joined #RubyOnRails
[11:29:09] conta: has joined #RubyOnRails
[11:38:40] crankharder: has joined #RubyOnRails
[11:40:29] kapil____: has joined #RubyOnRails
[11:45:16] lankanmon: has joined #RubyOnRails
[11:46:39] srinidhi: has joined #RubyOnRails
[11:55:26] ariedler: has joined #RubyOnRails
[11:57:32] ariedler: has joined #RubyOnRails
[12:08:17] drale2k_: has joined #RubyOnRails
[12:21:13] cschneid: has joined #RubyOnRails
[12:22:08] srinidhi: has joined #RubyOnRails
[12:39:22] Dbugger: has joined #RubyOnRails
[12:51:22] NeXTSUN: has joined #RubyOnRails
[12:52:40] gambl0r3: has joined #RubyOnRails
[12:59:24] davidh38: has joined #RubyOnRails
[12:59:47] davidh38: has joined #RubyOnRails
[13:17:14] deathwishdave: has joined #RubyOnRails
[13:18:03] deathwishdave: has joined #RubyOnRails
[13:26:53] blackmesa: has joined #RubyOnRails
[13:29:06] blackmesa1: has joined #RubyOnRails
[13:31:29] sphalerite: has joined #RubyOnRails
[13:41:52] nemesit|znc: has joined #RubyOnRails
[13:46:13] deathwishdave: has joined #RubyOnRails
[14:08:54] davidh38: has joined #RubyOnRails
[14:13:32] davidh38: has joined #RubyOnRails
[14:20:51] skryking: has joined #RubyOnRails
[14:22:02] gregf_: has joined #RubyOnRails
[14:31:46] conta: has joined #RubyOnRails
[14:40:10] davidh38: has joined #RubyOnRails
[14:51:50] cschneid: has joined #RubyOnRails
[14:59:47] GeorgesLeYeti: I don't know if i'm doing it wrong or not.
[15:00:49] GeorgesLeYeti: But I have 1 Product which has has_many ProductStep and has_many ProductLanguage.
[15:01:19] GeorgesLeYeti: My ProductLanguage also have has_many ProductStep
[15:03:03] GeorgesLeYeti: But I have in my product_language a column name default_attribute. If my default_attribute is set to true then my product_language has has_many product_steps through product but if it set to false then it only has has_many product_steps
[15:03:20] GeorgesLeYeti: Is it ok to do something like that
[15:03:49] GeorgesLeYeti: And if it's ok. How can I make such conditional has_many
[15:05:09] ariedler: has joined #RubyOnRails
[15:12:54] prestorium: Hi. I'm writing a simple API that must receive a file upload. This file will be between 400 MB and 2 GB. How can I test that?
[15:13:38] prestorium: I don't want to commit a 400 MB file to my repository to act as a test file. But I also don't want to hardcode /path/to/big/file.gz on my tests.
[15:14:38] prestorium: Do I need rspec to test a 400 MB POST?
[15:15:29] prestorium: Is there something like FactoryBot for files? Like: create_file('10M', 'application/x-gzip') ?
[15:23:03] davidh38: has joined #RubyOnRails
[15:28:55] bvdw: has joined #RubyOnRails
[15:31:14] ariedler: has joined #RubyOnRails
[15:34:29] bvdw: has joined #RubyOnRails
[15:46:37] conta1: has joined #RubyOnRails
[15:54:08] conta2: has joined #RubyOnRails
[15:54:10] Inside: has joined #RubyOnRails
[16:00:31] ss942: has joined #RubyOnRails
[16:01:57] ariedler_: has joined #RubyOnRails
[16:04:02] ariedler: has joined #RubyOnRails
[16:04:49] ariedler: has joined #RubyOnRails
[16:07:16] ss942: What should I know if I want to create redmine plugin that adds pagination to Documents?
[16:07:16] ss942: Can I write totally my own view and override route of main app by route inside my plugin somehow?
[16:07:16] ss942: I have a little experience with RoR , I just wrote some features for an redmine open source plugin like 6 months ago, and it was last time I seen Ruby.
[16:10:13] prestorium: ss942 did you check http://www.redmine.org/projects/redmine/wiki/Hooks_List#View-hooks ?
[16:11:31] drale2k_: has joined #RubyOnRails
[16:13:21] ss942: prestorium: I forgot too much to think about this. Thank you a lot
[16:14:25] ss942: oh there are no hooks for documents...
[16:18:26] blackmesa1: has joined #RubyOnRails
[16:34:00] Inside: Has anyone here ever implemented their own Devise authentication strategies?
[16:34:31] Inside: I'm trying to have a base "User" model which can have multiple "Identities" - where identities are either their active directory login or a token
[16:34:46] Inside: I'm a little fuzzy on where to start here >_>
[16:48:03] maryo: has joined #RubyOnRails
[16:56:11] blackmesa1: has joined #RubyOnRails
[17:08:06] orbyt_: has joined #RubyOnRails
[17:17:56] srinidhi: has joined #RubyOnRails
[17:31:27] Saukk: has joined #RubyOnRails
[17:35:12] lxsameer: has joined #RubyOnRails
[17:42:48] v01d4lph4: has joined #RubyOnRails
[17:44:23] Inside: specifically the issue that I'm having is that I've defined the strategy, but I can't seem to get it to load
[17:45:52] maryo: has joined #RubyOnRails
[17:53:46] agent_white: has joined #RubyOnRails
[17:56:33] dionysus70: has joined #RubyOnRails
[17:57:16] Devalo: has joined #RubyOnRails
[17:59:06] Devalo: Good evening. I have a question. I've been away from rails for a bit. Just returned, and trying to set up a new project. I get an error I've never seen before: Active Record adapter. Missing a gem it depends on? sqlite3 is not part of the bundle. I've removed sqlite from the gemfile, cause I want to use postgresql instead.
[18:00:03] maryo: has joined #RubyOnRails
[18:04:52] phaul: has joined #RubyOnRails
[18:06:02] Inside: for some reason sqlite3 1.4.0 doesn't work
[18:06:04] Inside: you need to specific 1.3.7
[18:06:20] Inside: you need to edit your database.yml file
[18:06:27] Inside: and then specify the adapter for each environment
[18:10:17] Devalo: yeah I'm trying to change the adapter in database.yml
[18:11:05] Inside: what environment are you running?
[18:11:41] Inside: new rails installs ship with spring&listen which screw up reloading
[18:12:14] Devalo: Dev. It's been a while since I've coded on this computer too, so one thing leads to another. Apparently I need fix some postgresql configs first...
[18:13:04] Inside: I mean windows or linux
[18:14:47] Inside: FYI: if you're making code changes and they're not evident when you refresh/restart... 1) spring stop 2) remove spring & listen gems
[18:14:55] Inside: I've had so many hair pulling moments with those
[18:15:34] Devalo: Oh man. Thanks for the heads up :-)
[18:23:57] beholders_eye: has joined #RubyOnRails
[18:24:00] Technodrome: has joined #RubyOnRails
[18:30:45] Devalo: So Spree is finally being developed again?
[18:31:45] Inside: never heard of it
[18:33:09] Devalo: big ecommerce gem. It was abandoned couple of years ago when I used rails. I see some fresh commits lol
[18:41:35] benlieb: has joined #RubyOnRails
[18:56:51] blackmesa1: has joined #RubyOnRails
[18:58:34] segy: has joined #RubyOnRails
[19:13:53] blackmesa1: has joined #RubyOnRails
[19:16:44] beholders_eye: has joined #RubyOnRails
[19:25:06] WRONgG: has joined #RubyOnRails
[19:27:25] WRONgG: has joined #RubyOnRails
[19:29:29] beholders_eye: has joined #RubyOnRails
[19:29:54] scrptktty: has joined #RubyOnRails
[19:41:16] blackmesa1: has joined #RubyOnRails
[19:42:14] herbst: has joined #RubyOnRails
[19:49:06] tdy: has joined #RubyOnRails
[19:50:38] conta1: has joined #RubyOnRails
[19:50:49] orbyt_: has joined #RubyOnRails
[20:05:48] jobewan: has joined #RubyOnRails
[20:19:37] orbyt_: has joined #RubyOnRails
[20:33:11] iAmDecim: has joined #RubyOnRails
[20:38:01] benlieb: has joined #RubyOnRails
[20:39:10] WRONgG: has joined #RubyOnRails
[20:58:10] benlieb: has joined #RubyOnRails
[20:59:10] cagomez: has joined #RubyOnRails
[21:18:29] DoctorMonocular: has joined #RubyOnRails
[21:19:52] DoctorMonocular: hey, so I have a range of TimeWithZones, and I try to compare 2 ranges that are identical like range_1 == range_2 -- this returns false. I check range_1.first == range_2.first #=> true, and range_1.last == range_2.last #=> true
[21:20:13] DoctorMonocular: I don't get how the first and last of a range could be equal but the ranges are unequal
[21:20:23] davidh38: has joined #RubyOnRails
[21:20:47] DoctorMonocular: the usual thing with times is that the usec is different, but in this case it's not true, they are all manually set to zero
[21:20:57] DoctorMonocular: there is absolutely no difference I can detect
[21:21:07] DoctorMonocular: and .inspect returns identical valurs
[21:22:31] DoctorMonocular: even this happens: range_1 == range_1.dup => false
[21:22:50] DoctorMonocular: I guess it's because the Range :== just does object identity?
[21:25:35] DoctorMonocular: according to the ruby docs, it doesn't just do object identity, it actually compares values
[21:25:51] tdy: has joined #RubyOnRails
[21:25:57] benlieb: has joined #RubyOnRails
[21:27:10] DoctorMonocular: but also when I try just having a TimeWithZone instance I can do: t == t.dup #=> true
[21:27:15] DoctorMonocular: so I'm stumped here
[21:27:39] defsdoor: has joined #RubyOnRails
[21:29:06] B2IT: has joined #RubyOnRails
[21:31:15] creature: has joined #RubyOnRails
[21:31:34] defsdoor: has joined #RubyOnRails
[21:31:41] AGMS: has joined #RubyOnRails
[21:32:56] my1es: has joined #RubyOnRails
[21:46:48] orbyt_: has joined #RubyOnRails
[21:49:31] szulak_: has joined #RubyOnRails
[21:52:56] Inside: DoctorMonocular: careful with times
[21:53:02] Inside: are you trying to compare database time vs. the time in your model?
[21:53:22] DoctorMonocular: no, I am manually making a timewithzone and manually setting usec to 0 on it
[21:57:41] cagomez: has joined #RubyOnRails
[22:02:14] Radar: GOOD MORNING
[22:08:54] blackmesa1: has joined #RubyOnRails
[22:15:02] blackmesa1: has joined #RubyOnRails
[22:21:51] orbyt_: has joined #RubyOnRails
[22:25:05] blackmesa: has joined #RubyOnRails
[22:29:51] davidh38: has joined #RubyOnRails
[22:36:01] kandayoo: has joined #RubyOnRails
[22:37:48] kandayoo: Hi! Is there any way to disable CSRF cookies? A lot of users are getting errors because they open many tabs across the website then login -- Invalidating the previous session secret.
[22:52:34] DoctorMonocular: has joined #RubyOnRails
[22:52:36] DoctorMonocular: GOOD MORNING TO YOU RADAR
[22:52:58] blackmesa1: has joined #RubyOnRails
[23:03:36] WRONgG: has joined #RubyOnRails
[23:08:32] Technodrome: has joined #RubyOnRails
[23:15:21] davidh38: has joined #RubyOnRails
[23:15:41] dviola: has joined #RubyOnRails
[23:27:00] Anubix: has joined #RubyOnRails
[23:30:37] Anubix: Hello, I plan to build app to proccess 100k API json data, which database and technologies to use to be most effective?
[23:31:52] Anubix: and are there any gems to improve JSON parsing speed?
[23:32:37] WRONgG: Well if you're in JSON already, I'd use Mongo as a DB
[23:33:17] WRONgG: and heres something to look at https://github.com/ohler55/oj
[23:34:06] gambl0r3: has joined #RubyOnRails
[23:35:21] Anubix: After I process all API datas, will work with them no longer in JSON format, just classic CRUD operations. Mongo is still fine for that? And thanks for oj, i am looking on it.
[23:35:59] DoctorMonocular: Postgres is fine
[23:36:08] mangold: has joined #RubyOnRails
[23:38:14] Anubix: yes bit it will have 1xx xxx rows in one table only
[23:38:30] Anubix: i am not sure if it will not kill performance :)
[23:39:55] ariedler: has joined #RubyOnRails
[23:40:20] ariedler: has joined #RubyOnRails
[23:41:10] Anubix: and any technology to process external json in batches available?
[23:41:25] Anubix: for example 20 per minute
[23:41:25] havenwood: Anubix: What does "process 100k json data" mean? 100k per what time period? How big? Have a bench?
[23:42:27] havenwood: Anubix: Here's a very specific benchmark with various JSON libs: https://github.com/kostya/benchmarks#json
[23:42:37] havenwood: Anubix: Can you say more about what you're doing?
[23:43:15] Anubix: havenwood: Yes its not secret. I will proccess data from this api: https://api.pathofexile.com/public-stash-tabs
[23:43:43] Anubix: havenwood: each next-change-id jump u into another json
[23:44:20] Anubix: havenwood: Very rough estimate is there is about 100k these 8mb jsons
[23:45:21] DoctorMonocular: 100 000 rows is nothing, the database won't be your bottleneck here
[23:45:24] Anubix: So at the start i have to process everything and load it to database. Then follow new jsons that are adding probably one per minute. So after big load data on begin, then its fine on performance.
[23:46:21] havenwood: Anubix: The JSON parsing should be extremely fast compared to the IO, right?
[23:47:19] havenwood: Anubix: Are you thinking to use ActiveJob to fetch and process the JSON in parallel?
[23:47:55] DoctorMonocular: you're going to need a big hard drive to hold 800gigs in the database alone though, and you're gonig to have to make sure that api you're hitting is fine with having those 800gigs downloaded from it
[23:48:24] iAmDecim: has joined #RubyOnRails
[23:48:42] DoctorMonocular: unless it's 8mb total? In which case there's no problem, that's not a lot of data to process
[23:49:48] Anubix: havenwood: what is IO? Yes on begin I will have to do it batches, 60 per minute shoudl be fine, it should be done after one day.
[23:49:51] havenwood: sounds like 800 gigabytes
[23:50:06] havenwood: Anubix: I mean the HTTP request to fetch the JSON over the wire.
[23:50:08] Anubix: But after i parse JSON and save it to database, I can throught it
[23:50:18] Anubix: throw it*
[23:50:45] Anubix: so 800GB of traffic, but not disk space
[23:50:48] havenwood: Anubix: Postgres has HStore or these days JSONB. I think you'd need to tell us more about how you intend to query it for us to give good suggestions.
[23:51:15] Anubix: And API is very stable and fine, I think it has no limitations.
[23:51:19] havenwood: Anubix: What from the JSON are you storing and why.
[23:51:45] Anubix: havenwood: most of the data, about 70-80% of each json
[23:52:10] havenwood: Anubix: How will you then use those stored values?
[23:52:23] DoctorMonocular: 800gb of traffic, followed by you storing most of it in a database row--that is going to take disk space
[23:52:56] Anubix: classic CRUD operations
[23:53:38] Anubix: havenwood: it's a game, so there are in-game items mostly, so I will search them for example by name of item.
[23:55:01] Anubix: and second important thing, old data i can throw away in future, because they were sold/removed, so db will be much more smaller.
[23:58:51] Anubix: There are some stats for website which do the very similar thing - https://poe.ninja/stats and they proccesed 57.54 TB, but its for few years
[23:59:56] DoctorMonocular: yeah ith this amount of data you can use standard tech like postgres and jobs