#RubyOnRails - 05 February 2019
« Back 1 day Forward 1 day »
[00:40:53] yoshie902a: Need help with a string not matching error during a devise registration. I am using a jsonb field. Issue is here.. https://stackoverflow.com/questions/54526338/devise-registration-string-not-matched-with-jsonb-field
[06:19:56] syndikate: IGnorAND, yes, I am trying to understand more innards of the gem. Still looking into it.
[07:40:37] sevenseacat: either way, you're going to be writing a lot of the controller etc. code yourself
[13:09:46] MrCrackPotBuilde: im trying to update an app but im getting an error with ruby 2.6 same as here https://github.com/plataformatec/devise/issues/4703 is there a workaround for ruby 2.6
[13:15:27] tbuehlmann: have you read the thread? when following the trail, you'll get to this: https://github.com/plataformatec/devise/commit/1009096172f2cbc86bcd54d053c89a09be67fb9f
[13:46:28] MrCrackPotBuilde: tbuehlmann ty my devise gem wouldnt update so had to add the git master branch now its gone
[13:49:00] Sylario: I cannot find where *_url methods are defined in rails. I want to know what params it can take
[14:57:59] Sylario: Ok so I tried to add subdomain: 'content' to a *_url, and it works, it was a shot in the dark
[16:22:37] loincloth: Hi all. Rails is loading SQLite3 in development even though I've said to use PG. I can't see what I'm missing. This is my config: https://dpaste.de/WDO2
[16:42:30] loincloth: I don't know exactly what that would mean... just grasping at straws, I guess. I must have missed something along the way, but I'm just staring at that exact config... trying only to load the Rails console... and seeing it interacting with sqlite3 after console loads...
[16:48:42] loincloth: I haven't touched any PG conf files and can't imagine why I would need to do so. It was working and then suddenly stopped recently.
[16:49:07] loincloth: I was switching between some branches and ran into sudden issues with it trying to load SQLite. :\
[16:49:23] loincloth: I know how this sounds... I've tried to identify what changed, but can't sort it out...
[16:51:17] loincloth: Even if it's not a "new" app, it's new to me that I could have the config I have and not have it load the adapter I asked for...
[16:51:54] MrCrackPotBuilde: then if all else fails id check your pg_hba.conf to see if your able to accept connections
[16:55:24] loincloth: went to load shell to issue command to show me hba file and it can't even load shell
[16:55:49] loincloth: so i guess that led me in the right direction after all... just not sure what would have messed with this
[16:57:14] loincloth: It is not a helpful default to assume a different database system than the one I specified, though.
[16:57:36] loincloth: Maybe tell me about the issues with Postgres, Rails, instead of trying to be so "clever".
[17:00:50] MrCrackPotBuilde: you cant view pg_hba.conf from console i believe you have to do something like nano /etc/postgresql/10/main/pg_hba.conf
[17:01:00] loincloth: Or I don't actually know how to invoke `psql`... ffs... having a bad morning :(
[17:01:43] MrCrackPotBuilde: but if you already had it running your should already know how to use psql
[17:01:59] loincloth: Yeah, I thought it was broken because I just said `psql` and it assumed a database named after my user, I guess.
[17:03:14] MrCrackPotBuilde: but you should be using either secrets or credentials depending on your rails version
[17:04:26] MrCrackPotBuilde: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04
[18:20:13] MrCrackPotBuilde: baweaver hes gone already i no idea what his problem was though ran through the error check i perform when i have an error
[18:21:25] MrCrackPotBuilde: no worries i do appologise for the asshat remark thats more the CNY beer talking \
[18:23:22] MrCrackPotBuilde: seems he didn't read my comments very clearly as ive no idea what he meant by different db system as i mentioned only pg
[18:57:24] timwis: Hey folks, I'm new to rails and using OmniAuth for authentication. It doesn't seem to add an authenticate_user! method on its own, which I assume devise does. Is it expected that I'll write this manually? Or should I really be using devise too?
[19:03:53] Terens: when developing a service/something that involves calling other libraries should I catch and raise custom errors?
[19:04:59] Terens: For example when developing an API wrapper that makes some calls using Oauth. Should I catch the specific oauth error and raise mine
[19:09:09] loincloth: If anybody was following along with my problems earlier where SQLite was being loaded in Rails console despite Postgres being specified in configs: it turned out to be related to Spring somehow. `spring stop` got my subsequent console sessions to behave correctly.
[19:09:37] loincloth: I confirmed that my configs and database setup were fine partly via finally trying `rails dbconsole` which correctly went into a psql shell.
[19:09:58] loincloth: This old, possibly related issue led me down the proper debugging path: https://github.com/rails/rails/issues/19256
[20:27:54] timwis: If I'm installing devise but only intend to use OmniAuth authentication, is there a way to skip all the views and database authentication settings and such since they won't be relevant?
[23:13:12] yoshie902a: Looking to join content_tags for custom form builder. Any help is apprecaited. https://stackoverflow.com/questions/54544427/joining-blocks-of-content-tag-form-builder
[23:18:14] yoshie902a: Radar: you know a ton more than me, I know that, but I have a lot of partials and would prefer to keep this included in my form builder. any suggestions?
[23:21:54] Radar: yoshie902a: in the past when I have attempted to do this, I have found putting that code inside a view not only reduces the duplication, but also makes it much, much easier to read.
[23:22:51] yoshie902a: I have a lot of differing input types that I need, are you suggesting, I make partial views for all of them?
[23:23:54] yoshie902a: So if I have a 50 field form, I should render 50 partials? do you think that would slow it down vs the form builder?
[23:25:39] yoshie902a: not sure, but it just feels dirty to make partials for each input type. Maybe it’s a better way though.
[23:26:07] yoshie902a: Nonetheless, for the sake of my sanity, I would like to figure out what I did wrong on my code to learn.
[23:27:09] Radar: the content_tag here doesn't have brackets around its arguments. Ruby is probably having a hard time parsing where the content_tag starts + ends.