« Back to channel list

#RubyOnRails - 22 March 2018

« Back 1 day Forward 1 day »
[00:08:13] alfiemax: has joined #RubyOnRails
[00:13:08] drale2k_: has joined #RubyOnRails
[00:15:30] crankharder: has joined #RubyOnRails
[00:23:41] mtkd: has joined #RubyOnRails
[00:24:17] Puffball: has joined #RubyOnRails
[00:25:01] crankharder: has joined #RubyOnRails
[00:25:10] alfiemax: has joined #RubyOnRails
[00:38:07] alfiemax: has joined #RubyOnRails
[00:40:29] crankharder: has joined #RubyOnRails
[00:43:19] ghormoon: has joined #RubyOnRails
[00:54:40] alfiemax: has joined #RubyOnRails
[01:06:02] cagomez: has joined #RubyOnRails
[01:07:40] alfiemax: has joined #RubyOnRails
[01:08:26] drale2k_: has joined #RubyOnRails
[01:18:59] gravity_pope: has joined #RubyOnRails
[01:20:18] alfiemax: has joined #RubyOnRails
[01:21:48] workmad3: has joined #RubyOnRails
[01:28:03] jottr: has joined #RubyOnRails
[01:33:30] alfiemax: has joined #RubyOnRails
[01:40:23] cschneid: has joined #RubyOnRails
[01:41:27] orbyt_: has joined #RubyOnRails
[01:41:58] jottr: has joined #RubyOnRails
[02:04:29] kapil___: has joined #RubyOnRails
[02:05:42] duderonomy: has joined #RubyOnRails
[02:16:43] crankharder: has joined #RubyOnRails
[02:19:08] egray: has joined #RubyOnRails
[02:24:00] crankhar1er: has joined #RubyOnRails
[02:26:05] crankhar1er: has joined #RubyOnRails
[02:26:57] alfiemax: has joined #RubyOnRails
[02:28:39] andrewray: has joined #RubyOnRails
[02:34:58] darkhanb: has joined #RubyOnRails
[02:38:27] jottr: has joined #RubyOnRails
[02:44:54] jottr: has joined #RubyOnRails
[02:52:02] syndikate: has joined #RubyOnRails
[02:57:19] jottr: has joined #RubyOnRails
[03:10:59] tjbp: has joined #RubyOnRails
[03:11:55] jottr: has joined #RubyOnRails
[03:14:20] kies: has joined #RubyOnRails
[03:14:42] Saukk: has joined #RubyOnRails
[03:22:04] workmad3: has joined #RubyOnRails
[03:26:21] jottr: has joined #RubyOnRails
[03:33:43] crankhar1er: has joined #RubyOnRails
[03:34:26] jottr: has joined #RubyOnRails
[03:45:09] jottr: has joined #RubyOnRails
[03:55:08] ryan_ford: has joined #RubyOnRails
[03:58:37] jottr: has joined #RubyOnRails
[04:08:12] jottr: has joined #RubyOnRails
[04:21:26] jottr: has joined #RubyOnRails
[04:22:24] mroutis: has joined #RubyOnRails
[04:25:00] SanguineAnomaly: has joined #RubyOnRails
[04:25:15] trautwein: has joined #RubyOnRails
[04:29:07] jottr: has joined #RubyOnRails
[04:43:33] jottr: has joined #RubyOnRails
[04:57:43] jottr: has joined #RubyOnRails
[05:02:35] mroutis_: has joined #RubyOnRails
[05:05:13] jottr: has joined #RubyOnRails
[05:11:53] jcarl43: has joined #RubyOnRails
[05:13:55] jottr: has joined #RubyOnRails
[05:19:04] Ryzokuken: has joined #RubyOnRails
[05:22:16] workmad3: has joined #RubyOnRails
[05:23:02] sevenseacat: has joined #RubyOnRails
[05:24:02] jottr: has joined #RubyOnRails
[05:31:04] jottr: has joined #RubyOnRails
[05:42:25] jottr: has joined #RubyOnRails
[05:42:48] mroutis: has joined #RubyOnRails
[05:44:45] conta: has joined #RubyOnRails
[05:49:35] armyriad: has joined #RubyOnRails
[05:51:07] rrichardsr3: has joined #RubyOnRails
[05:51:29] jottr: has joined #RubyOnRails
[05:53:12] rrichardsr3: has joined #RubyOnRails
[05:57:41] srinidhi: has joined #RubyOnRails
[05:57:51] rrichardsr3: has joined #RubyOnRails
[05:58:03] jottr: has joined #RubyOnRails
[06:09:15] syndikate: Is there a wildcard character for ransack?
[06:09:34] jottr: has joined #RubyOnRails
[06:17:34] jottr: has joined #RubyOnRails
[06:26:40] ur5us: has joined #RubyOnRails
[06:32:36] jottr: has joined #RubyOnRails
[06:34:07] gambl0re: has joined #RubyOnRails
[06:34:45] gambl0re: has joined #RubyOnRails
[06:35:09] sidx64: has joined #RubyOnRails
[06:44:40] jottr: has joined #RubyOnRails
[06:46:01] ur5us: has joined #RubyOnRails
[06:55:09] dminuoso: So! This is what a casual day with webpack looks like: https://gist.github.com/dminuoso/4def6dfb47dbd1b4a5ff2543e70305ff
[06:55:45] jottr: has joined #RubyOnRails
[06:58:37] rrichardsr3: has joined #RubyOnRails
[07:01:39] jottr: has joined #RubyOnRails
[07:11:26] syndikate: dminuoso, I have been struggling to create a vanilla app as well
[07:11:30] syndikate: It just wouldn't start
[07:12:14] za1b1tsu: has joined #RubyOnRails
[07:12:19] dminuoso: It's still better than sprockets though.
[07:12:25] dminuoso: But I dont know how much that really tells about sprockets.
[07:13:06] sidx64_: has joined #RubyOnRails
[07:13:33] syndikate: Yeah, agreed. This is very much required for the current javascript ecosystem.
[07:14:06] syndikate: Thing was the default settings had some issues couple of weeks ago. I was not able to boot up a new app. I did not get time to check again, not sure if it got fixed
[07:16:14] sidx64: has joined #RubyOnRails
[07:17:07] jottr: has joined #RubyOnRails
[07:19:45] dionysus69: has joined #RubyOnRails
[07:22:28] workmad3: has joined #RubyOnRails
[07:26:58] EXCHGR: has joined #RubyOnRails
[07:27:01] tcopeland: has joined #RubyOnRails
[07:27:58] tjbp: has joined #RubyOnRails
[07:28:28] jottr: has joined #RubyOnRails
[07:28:41] S007: has joined #RubyOnRails
[07:31:41] morfin60: has joined #RubyOnRails
[07:32:25] morfin60: can i somehow build WHERE locale=:locale AND (title != "" AND description != "" AND product_type != "") in Rails?
[07:33:31] morfin60: only using string?
[07:33:38] timdotrb: has joined #RubyOnRails
[07:35:55] dminuoso: "only using string" ?
[07:36:24] jottr: has joined #RubyOnRails
[07:42:47] mtkd: has joined #RubyOnRails
[07:43:34] timdotrb: Evening, all. How does one change the name of a model in an error message? This is what I have currently, but it’s not changing anything (the model name nor the attribute): https://gist.github.com/willc0de4food/b193d33936407e342be0b7232d447e0e
[07:44:41] jottr: has joined #RubyOnRails
[07:45:28] dminuoso: timdotrb: What do you mean by "name of a model in an error message" ?
[07:46:08] dminuoso: timdotrb: I usually plug the gem `i18n-debug` in, and see which translations are looked up.
[07:46:09] timdotrb: dminuoso: updated the gist with a sample error message
[07:46:27] dminuoso: timdotrb: Ah. Check the `i18n-debug` gem.
[07:48:17] dminuoso: timdotrb: be sure to share your findings, Im curious as well :)
[07:49:02] morfin60: joins(:translations).where.not(conditions).where("locale = :locale", locale: translation)
[07:49:13] morfin60: this is what i got in my scope
[07:49:19] timdotrb: dminuoso: Updated gist with i18n-debug output. It looks like I may need to nest the en.yml differently?
[07:49:38] dminuoso: timdotrb: Are these all the lookups?
[07:49:45] morfin60: conditions is hash like {title: "", description: "", interior_type: ""}
[07:49:53] timdotrb: dminuoso: Yea, before it attempts to upload the file
[07:50:09] dminuoso: timdotrb: curious why there's no lookup for the attribute "csv"
[07:50:17] timdotrb: dminuoso: I can paste the full output
[07:50:21] dminuoso: timdotrb: Please do
[07:50:40] morfin60: SELECT "interiors".* FROM "interiors" INNER JOIN "interior_translations" ON "interior_translations"."interior_id" = "interiors"."id" WHERE ("interior_translations"."interior_type" != "") AND ("interior_translations"."title" != "") AND ("interior_translations"."description" != "") AND (locale = 'ru') LIMIT 11
[07:50:49] timdotrb: dminuoso: updated
[07:51:00] morfin60: this is what i've got
[07:51:42] dminuoso: timdotrb: In this case `csv` is not invalid though, is it?
[07:51:52] timdotrb: dminuoso: correct, it is invalid
[07:51:58] timdotrb: dminuoso: I’m giving it a PDF
[07:52:02] dminuoso: timdotrb: Can you reread and restate that pls?
[07:52:30] timdotrb: dminuoso: in this case, I’m attempting to upload a PDF when a CSV is required. The field on the model is also called csv
[07:52:33] dminuoso: timdotrb: It look as if its only csv_content_type that is invalid, not csv.
[07:53:12] dminuoso: timdotrb: at any rate, what you are asking for does not seem possible
[07:53:20] dminuoso: timdotrb: I recommend giving the attribute `csv` a global sensible name.
[07:53:30] dminuoso: If there are spots that need a different translation, use an explicit i18n lookup for a different key.
[07:54:29] timdotrb: dminuoso: that’s not a bad idea. At the time I created it, csv made sense to me, but now in practice (seeing errors), it does not. Btw, updated gist with email_list model
[07:56:56] AntiSpamMeta2: has joined #RubyOnRails
[07:59:58] timdotrb: dminuoso: although that doesn’t solve my base problem of changing the name of the model in the error message (it says “email_list”, I want it to say “SOI list”). It’s weird; it finds the text SOI List, but does not display it. I’ve updated my gist with the new output and new en.yml
[08:03:07] trautwein: has joined #RubyOnRails
[08:04:59] gremax: has joined #RubyOnRails
[08:05:30] fl4sh_: has joined #RubyOnRails
[08:05:59] dminuoso: timdotrb: Can you gist the code that generates the error message for completeness?
[08:06:30] timdotrb: dminuoso: found it
[08:06:38] timdotrb: <h2><%= pluralize(@email_list.errors.count, "error") %> prohibited this email_list from being saved:</h2>
[08:06:44] dminuoso: timdotrb: ;)
[08:06:52] timdotrb: Heh, thanks :)
[08:10:09] jottr: has joined #RubyOnRails
[08:11:47] mroutis: has joined #RubyOnRails
[08:21:16] schneider: has joined #RubyOnRails
[08:24:33] jottr: has joined #RubyOnRails
[08:30:02] srinidhi: has joined #RubyOnRails
[08:30:24] sidx64: has joined #RubyOnRails
[08:32:34] jottr: has joined #RubyOnRails
[08:44:31] crankhar1er: has joined #RubyOnRails
[08:45:56] jottr: has joined #RubyOnRails
[08:48:06] reber: has joined #RubyOnRails
[08:58:17] jottr: has joined #RubyOnRails
[08:59:40] mikecmpbll: has joined #RubyOnRails
[09:05:24] Cork: how do one validate the presence of a boolean attribute (default value is nil) validate_presence doesn't allow false
[09:08:22] kapil___: has joined #RubyOnRails
[09:10:18] jottr: has joined #RubyOnRails
[09:10:55] marr: has joined #RubyOnRails
[09:20:26] jottr: has joined #RubyOnRails
[09:20:39] mikecmpb_: has joined #RubyOnRails
[09:22:38] workmad3: has joined #RubyOnRails
[09:25:40] schneider: has joined #RubyOnRails
[09:27:14] riotjones: has joined #RubyOnRails
[09:30:03] rikkipitt: has joined #RubyOnRails
[09:31:46] jottr: has joined #RubyOnRails
[09:39:23] schneider: has joined #RubyOnRails
[09:39:46] jottr: has joined #RubyOnRails
[09:40:59] Mosselman: has joined #RubyOnRails
[09:41:27] drale2k_: has joined #RubyOnRails
[09:44:41] shenghi: has joined #RubyOnRails
[09:48:37] crankhar1er: has joined #RubyOnRails
[09:50:19] timdotrb: Sigh. Here’s a new issue.. I’m telling paperclip to create an image that’s 150x150# and it’s creating one with a variable width and 150 height
[09:50:41] timdotrb: is # not the sign I should be using? I want the image to be 150 wide, and to crop the height to 150
[09:51:13] jottr: has joined #RubyOnRails
[09:52:44] mikecmpbll: has joined #RubyOnRails
[09:53:16] schneider: has joined #RubyOnRails
[09:59:29] schneider: has joined #RubyOnRails
[10:01:52] jottr: has joined #RubyOnRails
[10:06:38] dionysus69: has joined #RubyOnRails
[10:08:03] sidx64: has joined #RubyOnRails
[10:08:19] jottr: has joined #RubyOnRails
[10:10:09] lxsameer: has joined #RubyOnRails
[10:14:28] workmad3: has joined #RubyOnRails
[10:14:35] pavelz: has joined #RubyOnRails
[10:15:25] pavelz: hi i have a q: what is a helper -> users_path(id) vs user_path(id) latter is show, which is former ?
[10:17:45] drale2k_: has joined #RubyOnRails
[10:23:29] pavelz: oh right format. bleh
[10:29:54] Fernando-Basso: has joined #RubyOnRails
[10:31:42] dminuoso: pavelz: Not coherent. Question vs answer bazinga.
[10:45:16] schneider: has joined #RubyOnRails
[10:45:37] drale2k_: has joined #RubyOnRails
[11:04:48] schneider: has joined #RubyOnRails
[11:12:37] drale2k_: has joined #RubyOnRails
[11:12:39] sidx64: has joined #RubyOnRails
[11:17:28] schneider: has joined #RubyOnRails
[11:30:40] drale2k_: has joined #RubyOnRails
[11:34:55] Cavallari: has joined #RubyOnRails
[11:39:01] Mosselman: has joined #RubyOnRails
[11:39:16] rikkipitt: has joined #RubyOnRails
[11:42:02] sidx64: has joined #RubyOnRails
[11:44:39] sidx64: has joined #RubyOnRails
[11:46:51] dviola: has joined #RubyOnRails
[11:49:09] S007: has joined #RubyOnRails
[11:56:05] Mosselman: has joined #RubyOnRails
[11:57:41] DrYockel: has joined #RubyOnRails
[12:04:05] drale2k_: has joined #RubyOnRails
[12:08:53] Mosselman: has joined #RubyOnRails
[12:12:40] rikkipitt: has joined #RubyOnRails
[12:20:24] Mosselman: has joined #RubyOnRails
[12:35:34] chouhoulis: has joined #RubyOnRails
[12:37:32] rikkipitt: has joined #RubyOnRails
[12:40:06] hmaronon: has joined #RubyOnRails
[12:41:46] CGibsonmm: has joined #RubyOnRails
[12:44:28] CGibsonmm: I have a question about factory_bot, I have a 1:1 association for my user and user_profile model, and on user sign up it also call create on the user_profile, how can i reflect that in my factory generation, i keep ending up with a empty user_profile
[12:57:08] chouhoulis: has joined #RubyOnRails
[13:09:00] conta: has joined #RubyOnRails
[13:12:52] crankhar1er: has joined #RubyOnRails
[13:21:14] defsdoor: has joined #RubyOnRails
[13:31:58] pavelz: has joined #RubyOnRails
[13:47:55] kn-928: has joined #RubyOnRails
[14:00:09] cschneid: has joined #RubyOnRails
[14:08:50] drale2k_: has joined #RubyOnRails
[14:14:22] rikkipitt: has joined #RubyOnRails
[14:16:17] Mosselman: has joined #RubyOnRails
[14:18:27] cschneid: has joined #RubyOnRails
[14:24:01] rikkipitt: has joined #RubyOnRails
[14:26:00] Mosselman: has joined #RubyOnRails
[14:30:24] DTZUZO: has joined #RubyOnRails
[14:39:11] Torrone: has joined #RubyOnRails
[14:42:22] roshanavand: has joined #RubyOnRails
[14:46:54] Torrone: hello, I have some parts of my application that I load via GET with javascript, I'd like to make them unaccessible by themselves. I was thinking of making use of 'X-CSRF-Token' header but it doesn't seem to work. Thoughts?
[14:48:18] dminuoso: Torrone: What do you mean by "unaccessible" by themselves?
[14:48:22] dminuoso: What are you trying to protect against?
[14:48:29] Torrone: dminuoso, hello
[14:48:55] Torrone: I don't want anybody to access them by typing their address in the browser window
[14:49:05] dminuoso: Torrone: Why?
[14:49:26] Torrone: because they should only work within the context of the application
[14:49:37] Torrone: i.e. if requested with javascript
[14:49:45] dminuoso: Torrone: If people figure out the address, it means they are skilled enough to open the dev tools. If they are smart enough to do that, they can write the machinery to automate it anyway.
[14:49:55] dminuoso: Torrone: Though CSRF is a good starter.
[14:50:18] Torrone: yeah but pp request.headers['X-CSRF-Token'] => nil
[14:50:29] Torrone: I am including it in my request
[14:50:36] dminuoso: Torrone: can you gist your `rails middleware`
[14:51:40] Torrone: request.headers['HTTP_X_CSRF_TOKEN'] is working
[14:52:02] Torrone: I'd like to use the built-in methods tho, like :verify_authenticity_token
[14:52:15] Torrone: or protect_from forgery
[14:53:35] shpoont: has joined #RubyOnRails
[14:54:35] fryguy: what you are trying to accomplish is useless
[14:55:10] Torrone: fryguy, thank you for pointing it out
[14:56:19] Torrone: dminuoso, I'm settling for just checking the existence of a request.headers['HTTP_X_CSRF_TOKEN']
[14:56:26] Torrone: thank you for your help
[15:02:20] Torrone: has left #RubyOnRails: ("Leaving")
[15:02:53] gravity_pope: has joined #RubyOnRails
[15:04:21] roshanavand: has joined #RubyOnRails
[15:05:05] Inside: has joined #RubyOnRails
[15:05:35] Inside: So... when using react-rails - is there any way to generate a form server side and stick it into the component somehow :|
[15:06:52] context: whats the point of using react if you are just going to generate raw html on the server side
[15:07:22] Inside: Well - it's part of a larger component.
[15:07:52] context: and... sure why not... just pull the form from the server and put it into the form dom
[15:08:57] context: https://stackoverflow.com/questions/27934238/rendering-raw-html-with-reactjs
[15:09:33] dminuoso: Inside: Use components properly.
[15:09:45] dminuoso: Dont generate things server side.
[15:11:23] dminuoso: There's so many things wrong with dangerouslySetInnerHTML...
[15:14:11] sevenseacat: the name alone makes you pause
[15:14:15] context: Inside: maybe start with a different component.
[15:14:20] context: sevenseacat: right
[15:14:37] Inside: dan generously set inner html? thanks, dan!
[15:14:56] sevenseacat: thats not how camel case works
[15:16:41] sidx64: has joined #RubyOnRails
[15:16:54] Mosselman: lol, out of the component thinking
[15:17:14] Mosselman: Just render HTML to begin with and get rid of React ;)
[15:17:53] Dimik: has joined #RubyOnRails
[15:20:41] sidx64: has joined #RubyOnRails
[15:22:15] Inside: so this is my use case: i have a form, a web socket connection to a locally hosted windows service, and a status log thing
[15:23:43] Inside: so .. someone visits the page, it makes a connection to the local service to pull in printer information, then someone fills in some data & hits submit, the rails server generates some raw ZPL printer commands, and then the web page pushes the ZPL commands to the printer over the websocket to the service which uses FFI to access the winapi to print labels
[15:24:10] Inside: really effing retarded, but try making a web application print over a Text/Generic printer ;)
[15:33:46] mikecmpbll: has joined #RubyOnRails
[15:33:51] conta1: has joined #RubyOnRails
[15:34:23] orbyt_: has joined #RubyOnRails
[15:35:44] rikkipitt: has joined #RubyOnRails
[15:40:45] Fernando-Basso: has joined #RubyOnRails
[15:41:47] dminuoso: Inside: I dont see how that explains your need
[15:42:09] dminuoso: Inside: If you dont see how to do this with React alone, then don't use React
[15:42:57] cagomez: has joined #RubyOnRails
[15:44:14] troys: has joined #RubyOnRails
[15:44:26] Inside: Well - I was trying to use react as a state machine I guess :P
[15:44:32] Inside: probably not what it should be used for.
[15:44:54] Inside: I've only done a few react components so far and it was a very "whoamg this is so cool" experience
[15:45:10] dminuoso: Inside: React is a FP inspired framework
[15:45:21] dminuoso: Inside: Imagine you didn't have State at all - that's when you begin to understand what React is for
[15:45:38] dminuoso: (And I have written entire applications that dont have any local react state whatsoever)
[15:45:48] dminuoso: Inside: functional programming
[15:47:34] dminuoso: The more you try to use state in React, the shittier your application gets.
[15:48:31] jcarl43: has joined #RubyOnRails
[15:54:30] schneider: has joined #RubyOnRails
[15:55:07] pavelz: has joined #RubyOnRails
[16:01:54] schneider: has joined #RubyOnRails
[16:03:26] Inside: I'm a little fuzzy on what FP even is :|
[16:04:18] [Butch]: has joined #RubyOnRails
[16:05:10] Inside: I've used something called 'MPI' which is a lisp-like language, but that was not a fun language to use..
[16:09:38] Mosselman: has joined #RubyOnRails
[16:10:57] alfiemax: has joined #RubyOnRails
[16:16:02] one_zero: has joined #RubyOnRails
[16:22:49] uks: has joined #RubyOnRails
[16:24:39] mauro1254: has joined #RubyOnRails
[16:25:25] _aeris_: has joined #RubyOnRails
[16:26:26] tcopeland: has joined #RubyOnRails
[16:28:43] [Butch]: has joined #RubyOnRails
[16:30:10] jlebrech: has joined #RubyOnRails
[16:30:51] war_pigs: has joined #RubyOnRails
[16:31:27] timdotrb: has joined #RubyOnRails
[16:32:19] jlebrech: i'm on Rails 5.0.0 and when I do ActionController::Parameters.permit_all_parameters = true I will still complain about an unpermitted parameter but still allow access to it.
[16:35:23] timdotrb_: has joined #RubyOnRails
[16:43:21] darkhanb: has joined #RubyOnRails
[16:52:35] mauro1254: Hi folks, I have a question concerning database migrations. I'm on mysql. Why ins't there any options related to the collation for tables created through Rails 5.1 in schema.rb?
[17:00:07] dionysus69: has joined #RubyOnRails
[17:02:06] Exagone313: has joined #RubyOnRails
[17:02:47] rgiscard: has joined #RubyOnRails
[17:04:13] war_pigs: has joined #RubyOnRails
[17:08:43] Exagone313: has joined #RubyOnRails
[17:11:29] Ryzokuken: has joined #RubyOnRails
[17:15:35] Exagone313: has joined #RubyOnRails
[17:18:12] DoubleMalt: has joined #RubyOnRails
[17:24:05] timdotrb: has joined #RubyOnRails
[17:24:44] tcopeland: has joined #RubyOnRails
[17:26:49] drale2k_: has joined #RubyOnRails
[17:34:08] riotjoe: has joined #RubyOnRails
[17:37:28] war_pigs: has joined #RubyOnRails
[17:42:54] riotjones: has joined #RubyOnRails
[17:45:40] GodFather: has joined #RubyOnRails
[17:56:17] cagomez: has joined #RubyOnRails
[17:56:29] war_pigs: has joined #RubyOnRails
[18:00:26] desperek: has joined #RubyOnRails
[18:01:12] cagomez_: has joined #RubyOnRails
[18:07:41] MrCrackPotBuilde: has joined #RubyOnRails
[18:08:46] MrCrackPotBuilde: if i was to build my own production server could i do it with justt apache2 puma rvm ruby rubyonrails and node.js ???
[18:09:35] MrCrackPotBuilde: configure the root file system if the app as the place to load eg default apache is /var/www/html
[18:10:11] MrCrackPotBuilde: so im guessing i need to route puma through apache but get it to auto run on boot ??
[18:15:29] Sylario: MrCrackPotBuilde: not really no
[18:15:53] MrCrackPotBuilde: im a little lost
[18:15:59] Sylario: first Puma is a complete web server
[18:16:05] Sylario: you do not need Apache
[18:16:06] MrCrackPotBuilde: i know it can be done with apache but what is the best way
[18:16:17] Sylario: There is no best way
[18:16:27] MrCrackPotBuilde: well ok then i have apache
[18:16:34] fryguy: you'll want some sort of real webserver in front of puma to handle real internet traffic
[18:16:38] MrCrackPotBuilde: im really too lazy to mod the pi again
[18:16:50] Sylario: Personally I use Apache + Passenger, because i knew Apache before using rails
[18:17:07] MrCrackPotBuilde: same that was why i installed it
[18:17:14] MrCrackPotBuilde: takes minutes to configure
[18:17:24] MrCrackPotBuilde: but ive never built a production server for rails before
[18:17:31] Sylario: Yeah but Nginx is incredibly popular in the rails community
[18:18:01] Sylario: Also, a lot of people use heroku (AWS) as a cloud service
[18:18:19] MrCrackPotBuilde: but recently ivve been getting higher and higher charges
[18:18:30] MrCrackPotBuilde: and it just doesnt make sense any more
[18:18:40] Sylario: too expensive ?
[18:18:58] MrCrackPotBuilde: yer my aws account i use often
[18:20:34] Inside: sylario: what's your use case?
[18:20:48] Inside: you said you don't want to mod the pi... is this just something that's going to have one user? (you?)
[18:21:17] MrCrackPotBuilde: i need to reduce costs
[18:21:29] MrCrackPotBuilde: so development needs to come back to local
[18:21:49] MrCrackPotBuilde: internet bill is high
[18:21:55] Inside: How many users do you have?
[18:21:57] Sylario: Anyway regarding the initial question, RVM (and RBenv) allow you to manage the ruby install(multiple versions, and easier updates), Puma does not need Apache, Apache need passenger, and whatever web server you choose you configure the app and it's path using the configuration format of your server of choice.
[18:22:04] DrYockel: has joined #RubyOnRails
[18:23:16] MrCrackPotBuilde: Ive gone with apache passenger as everything else is already set up haha
[18:23:19] Inside: At work my stuff is hosted on a centos machine with 4gb of ram and 2 cores.. using nginx/passenger
[18:23:49] Inside: Not very many requests though :P maybe 1-2k a day
[18:24:10] Omnilord: And don't forget you can get SSL for free with Let's Encrypt. Not sure how to configure that with Puma, but it slides right in with Apache or Nginx.
[18:24:32] MrCrackPotBuilde: Omniloard already ahead
[18:24:51] MrCrackPotBuilde: and have it configured so i can push my repo with git
[18:25:38] MrCrackPotBuilde: the last part really is the part that reads ruby on rails
[18:25:44] MrCrackPotBuilde: or more specifically ruby
[18:35:10] Cavallari: has joined #RubyOnRails
[18:44:01] jomitsch: has joined #RubyOnRails
[19:01:21] jomitsch: hey all! My team and I are having a pretty frustrating server hang issue in our development environment. We are discussing it on our community forum here https://community.theforeman.org/t/dev-server-hangs-on-code-change/8184/11?u=john_mitsch - I think I narrowed it down to an issue with ActionDispatch::Reloader, but would like to confirm I am making a correct assumption here? Details on how I came up
[19:01:23] jomitsch: with this are here https://paste.fedoraproject.org/paste/EBixCIbRwRimCgbESLkxnA and we are using 5.1.4
[19:06:41] zacts: has joined #RubyOnRails
[19:20:51] cagomez: has joined #RubyOnRails
[19:22:54] cagomez: has joined #RubyOnRails
[19:25:45] war_pigs: has joined #RubyOnRails
[19:30:51] cagomez: has joined #RubyOnRails
[19:47:48] gravity_pope: has joined #RubyOnRails
[19:51:23] Inside: jomitsch: are you using spring?
[19:51:50] sidx64: has joined #RubyOnRails
[19:53:17] jomitsch: Inside: yes, but apparently another dev tried disabling it and still saw the server hang issue
[19:57:01] rgiscard: has joined #RubyOnRails
[19:58:14] jomitsch: just confirmed that myself as well
[19:58:22] jomitsch: still seeing the issue with spring stopped
[19:59:48] timdotrb: has joined #RubyOnRails
[20:01:57] akofink: has joined #RubyOnRails
[20:02:35] gravity_pope: has joined #RubyOnRails
[20:05:05] shpoont: has joined #RubyOnRails
[20:10:40] gravity_pope: has joined #RubyOnRails
[20:12:24] sidx64: has joined #RubyOnRails
[20:12:57] shpoont: has joined #RubyOnRails
[20:14:03] NoGodDamnIdea: has joined #RubyOnRails
[20:24:16] cagomez: has joined #RubyOnRails
[20:26:38] sidx64_: has joined #RubyOnRails
[20:31:40] Fernando-Basso: has joined #RubyOnRails
[20:33:32] rgiscard: has joined #RubyOnRails
[20:39:59] jottr: has joined #RubyOnRails
[20:47:12] orbyt_: has joined #RubyOnRails
[20:48:41] ur5us: has joined #RubyOnRails
[20:50:55] gravity_pope: has joined #RubyOnRails
[20:51:20] jomitsch: any ideas on how to debug this further?
[20:51:29] jomitsch: or if I'm looking in the right direction?
[20:58:07] tekk: has joined #RubyOnRails
[21:00:03] mikecmpbll: has joined #RubyOnRails
[21:08:35] spohnz: has joined #RubyOnRails
[21:11:56] jesson: has joined #RubyOnRails
[21:13:32] jesson: anyone have suggestions for the best way to relearn rails? I haven't touched it in more than a year and a half but my new interview is all rails.
[21:14:05] jesson: I've already tried reading docs i want to create a project but dont know what to make
[21:19:26] akofink: jesson: you could contribute to an existing open source Rails project! i.e. (Rails 5.1) https://github.com/theforeman/foreman
[21:19:48] harrycs: has joined #RubyOnRails
[21:19:48] jesson: i was looking for an open source project
[21:19:56] jesson: most of them seemed dead
[21:20:08] akofink: nice :) this one is definitely not dead
[21:20:21] harrycs: I think I'm spacing on something obvious. Do I need to manually sanitize all user input in Rails 5? I have a user-inputted `note` column - I can just pass a param from the controller directly to the model, right?
[21:22:00] jesson: you should never use raw input, always check for htmlspecialchars in case of injection
[21:22:05] akofink: harrycs: you can't call `.to_h` on ActionController::Parameters unless their permitted
[21:22:22] akofink: they're* doh
[21:23:05] jesson: oh many i'm so behind my time now lmao
[21:23:46] akofink: if you really want to be dangerous (don't do this in production!!) call params.permit!
[21:24:10] jesson: what does permit! do
[21:24:16] harrycs: hahaha, that does seem dangerous
[21:24:17] akofink: it permits all the params
[21:24:24] jesson: thats abd
[21:24:38] akofink: that's how it worked before strong_params came about :)
[21:24:53] harrycs: I mean, if I permit a param intentionally, do I need to sanitize it? say, for example, I want a user to be able to submit a tweet or something
[21:25:04] harrycs: do I need to specifically sanitize the tweet text, or does rails automagically do it?
[21:25:09] jesson: lol last time i used rails i was it was runing 3.2.7 i believe
[21:25:15] jesson: and ruby was 1.9.0
[21:25:26] akofink: harrycs: no, you must write a validator in your model
[21:25:41] harrycs: akofink: okay, cool! thanks
[21:26:00] jesson: grrr i have a stupid interview in 30 minutes
[21:26:09] jesson: but i dont really want this job
[21:26:09] havenwood: <%= sanitize @things %>
[21:26:40] havenwood: harrycs: Rails 4.2 introduced a new sanitizer. Make sure to use recent sources.
[21:27:49] jesson: is 5.1.5 stable
[21:28:50] havenwood: jesson: Yes. That's the latest stable version.
[21:29:41] jesson: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
[21:29:48] jesson: is this latest stable ruby?
[21:29:51] havenwood: jesson: Nope.
[21:29:56] jesson: worth upgrading?
[21:30:26] jesson: and could you remind me how to import my gemsets when upgrading:
[21:30:30] jesson: is there a flag
[21:30:50] havenwood: jesson: I'd suggest going to 2.4.3 at least immediately. 2.5.0 is the latest stable version (which maaay segfault a teeny tiny bit)
[21:31:21] havenwood: jesson: How have you installed Ruby?
[21:31:24] jesson: The exercise uses Ruby on Rails 5.1 and was built with Ruby 2.4 (any minor version of 2.4 will work—please have this installed ahead of time). The provided tests are in minitest and use standard YAML-formatted Rails fixtures.
[21:31:29] havenwood: jesson: rvm get head && rvm upgrade 2.4.1 2.4.3
[21:31:49] jesson: sweet thanks
[21:32:09] jesson: yeah i'm prety excited for this itnerview
[21:32:17] jesson: i'm so sick of java & php
[21:32:28] havenwood: jesson: Good luck!
[21:32:28] jesson: & it's with github :o
[21:32:40] jesson: so excited and terrified
[21:32:42] havenwood: I just visited their offices a few weeks ago. Really nice!
[21:33:09] jesson: & where is it?
[21:33:28] havenwood: I was just visiting a friend that works there for fun.
[21:33:44] havenwood: It's in San Fransisco down by the water near the financial district.
[21:34:00] jesson: oooh awesome
[21:34:08] jesson: i lieved in sf for a year abck in 2013
[21:34:10] havenwood: Lots of wood. Hidden rooms. Rooftop view. Good stuff!
[21:34:23] jesson: i'm not going back tho
[21:34:30] jesson: they said i could work remote
[21:34:37] havenwood: They have cool glowing fabric walls on one level.
[21:34:44] havenwood: jesson: Yeah, they do remote well.
[21:34:56] jesson: i will think about moving now hahah
[21:35:12] jesson: my rent here in beverly hills is more expensive than sf
[21:35:35] harrycs: havenwood: thanks for the tip!
[21:35:43] jesson: crappy part of beverly hills tho
[21:35:55] tcopeland: has joined #RubyOnRails
[21:35:58] jesson: but 2k for a 800sqft studio
[21:35:59] havenwood: jesson: I moved from Silver Lake to SF so I feel ya.
[21:36:01] jesson: ridiculour
[21:36:05] jesson: *ridiculous
[21:37:39] jesson: hmmm weird
[21:37:45] jesson: it says i dont have a public gpg key
[21:38:21] jesson: lol gonna just see if i can force it
[21:39:24] kn-928: has joined #RubyOnRails
[21:40:21] spohnz: If I save a static list in my model. I.E STATUS = ["Resolved","Blocked","In Review"] to show with each record in my index. How do I show it as a drop down?
[21:40:56] spohnz: or better question.. Is that how I would save a static list?
[21:42:28] havenwood: spohnz: A constant is a nice way to have a static list. It's a common practice to freeze constants, just add a `.freeze` to the end of the Array.
[21:42:38] havenwood: (The freezing is optional.)
[21:43:40] havenwood: spohnz: The FormOptionsHelper docs should show how to do a dropdown collection select.
[21:45:34] spohnz: havenwood: Thank you
[21:45:56] havenwood: spohnz: You're welcome
[21:50:54] gravity_pope: has joined #RubyOnRails
[21:52:17] jesson: what are autodotfiles?
[21:52:34] jesson: RVM PATH line not found for Bash or Zsh, rerun this command with '--auto-dotfiles' flag to fix it.
[21:52:48] jesson: just including their shell script to update the path?
[21:55:26] havenwood: jesson: It add the `source RVM_SCRIPT_HERE` line to your dotfile so RVM loads when you open your terminal.
[21:55:38] havenwood: jesson: You can do it yourself if you prefer.
[21:55:45] jesson: that should already be there
[21:55:57] havenwood: check that it is and that the dotfile is getting sourced
[21:56:14] havenwood: if it appears the dotfile is in order, confirm you're using a login shell
[21:57:21] havenwood: You can just put it in your dotfile yourself, bash for example: echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
[21:58:01] jesson: https://imgur.com/DOKFgWj
[22:06:07] dgsan: has joined #RubyOnRails
[22:07:04] dgsan: Anybody have insight into choosing strong_password vs. password_strength, or is there something else widely used now?
[22:38:53] Inside: jomitsch-afk: soo I have issues with spring as well
[22:40:36] Inside: jomitsch-afk: I develop on windows, but use a shared drive with my virtualbox instance. SPring doesn't like shared folders so I have to do config.file_watcher = ActiveSuppoer:FileUpdateChecker
[22:40:54] Inside: The default is EventedFileUpdateChecker
[22:41:05] Inside: so if you're developing inside docker, virtualbox, etc, it won't pick up changes
[22:48:00] conceivably: has joined #RubyOnRails
[22:48:49] conceivably: Hello. Why does the shallow: true option not apply to :index and :new when nesting routes? What is the correct way to achieve the same result then?
[22:50:33] conceivably: This seems so odd as it pretty much defeats the purpose of using 'resources' in conjunction with 'shallow: true' since you then always have to manually specify above mentioned routes.
[22:55:54] wethu: has joined #RubyOnRails
[22:57:22] shpoont: has joined #RubyOnRails
[23:06:50] spohnz: me again, I am having a bad time with this static list. I didn't use the .freeze as it looked too difficult. so my list is in the model with STATUS as the variable. I keep getting errors when trying to call it in the _form
[23:07:27] spohnz: im using the .select method
[23:10:44] rgiscard: has joined #RubyOnRails
[23:12:47] Radar: GOOD MORNING
[23:12:57] Radar: Rumours of my death have been greatly exaggerated.
[23:13:11] cschneid: has joined #RubyOnRails
[23:14:32] dgsan: Or you're undead now.
[23:18:51] Radar: No comment.
[23:20:40] Inside: Radar~san
[23:21:17] Radar: Inside: yes my child
[23:21:26] Inside: Teach me the ways of rails
[23:22:09] Radar: You already know them. You must open your eyes.
[23:23:26] Inside: the API was in my heart all along?
[23:23:52] Radar: Something like that.
[23:45:05] halbbalda: has joined #RubyOnRails
[23:57:25] jesson: woop woop killed my interview