« Back to channel list

#RubyOnRails - 13 March 2019

« Back 1 day Forward 1 day »
[00:02:10] quazimodo: has joined #RubyOnRails
[00:04:09] orbyt_: has joined #RubyOnRails
[00:07:47] Technodrome: has joined #RubyOnRails
[00:29:41] SteenJobs: has joined #RubyOnRails
[00:44:36] mangold: has joined #RubyOnRails
[00:47:00] MrCrackPotBuilde: has joined #RubyOnRails
[00:52:20] hnanon: has joined #RubyOnRails
[00:57:53] faitswulff: has joined #RubyOnRails
[01:10:48] greengriminal: has joined #RubyOnRails
[01:11:11] greengriminal: Hey all quick question is this the right syntax for only enabling uniqueness constraints on create: `validates :user_id, uniqueness: true, on: :create`
[01:12:02] greengriminal: My previous syntax was: `validates_uniqueness_of :user_id` and was finding that if I loaded an existing AR record and called `#save` it would fail this validation check.
[01:14:57] MrCrackPot: has joined #RubyOnRails
[01:16:07] greengriminal: answered my own question it will work.
[01:35:46] s00pcan: has joined #RubyOnRails
[01:43:51] quazimodo: has joined #RubyOnRails
[01:46:38] tdy: has joined #RubyOnRails
[01:47:53] sevenseacat: has joined #RubyOnRails
[01:51:00] NeXTSUN: has joined #RubyOnRails
[02:00:24] tdy1: has joined #RubyOnRails
[02:02:17] orbyt_: has joined #RubyOnRails
[02:15:19] Tempesta: has joined #RubyOnRails
[02:22:06] cnsvc: has joined #RubyOnRails
[02:47:47] hnanon: has joined #RubyOnRails
[02:51:11] uranoss: has joined #RubyOnRails
[03:08:22] Saukk: has joined #RubyOnRails
[03:54:36] faitswulff: has joined #RubyOnRails
[04:07:42] MrCrackPotBuilde: has joined #RubyOnRails
[04:11:49] braincrash: has joined #RubyOnRails
[04:25:19] duderonomy: has joined #RubyOnRails
[04:26:26] quazimodo: has joined #RubyOnRails
[04:28:03] mangold: has joined #RubyOnRails
[04:30:38] dviola: has joined #RubyOnRails
[04:53:27] faitswulff: has joined #RubyOnRails
[05:31:13] syndikate: has joined #RubyOnRails
[06:18:17] conta: has joined #RubyOnRails
[06:25:46] reber: has joined #RubyOnRails
[06:25:56] za1b1tsu: has joined #RubyOnRails
[06:27:13] mangold: has joined #RubyOnRails
[06:49:46] Cork: is there a way to tell activeRecrod to create a belongs_to record before trying to save the current one?
[06:58:49] srinidhi: has joined #RubyOnRails
[07:03:27] tbuehlmann: Cork: have an example of what you mean?
[07:05:33] Cork: tbuehlmann: https://paste.debian.net/1072950/
[07:05:48] Cork: this crashes with ActiveRecord::NotNullViolation (Mysql2::Error: Field 'network_id' doesn't have a default value: ...
[07:06:25] Cork: i suspect it means it tries to save the PrivateNetwork and then Network there by failing the PrivateNetworks constraint for network_id
[07:12:46] Joros: has joined #RubyOnRails
[07:14:53] tbuehlmann: I'd say the before_create should be a before_validation
[07:16:25] Cork: tbuehlmann: the function needs to clam a row in another table so if i run it before_validate i need to have a way to clean up if it fails validation
[07:23:51] srinidhi: has joined #RubyOnRails
[07:28:10] tbuehlmann: before_validation should be in the transaction already
[07:28:35] tbuehlmann: another approach: can't you make sure the record exists before creating the private network?
[07:34:40] Cork: tbuehlmann: no, the network table is not exposed in the ui so the model needs to handle it
[07:35:32] Cork: interesting about the transaction, haven't actually checked that it doesn't revert that on it's own >_<
[07:36:34] Cork: heh you're correct
[07:36:42] Cork: man talk about over working a none problem -_-'
[07:36:52] Cork: tbuehlmann: thx for kicking me in the correct direction >_>
[07:37:01] za1b1tsu: I want to create a rails plugin (a rails app that can be used as a gem in another rails app), that handles database related tasks (including the database). From waht I am reading I should use rails plugin my_app --mountable. But when I try to create the db, it is created in the dummy app, not in /db. What should I do?
[07:37:20] tbuehlmann: heh, you're welcome!
[07:39:35] quazimodo: has joined #RubyOnRails
[07:52:50] hahuang6-: has joined #RubyOnRails
[07:53:18] za1b1tsu: so basically rails plugins are not meant for handling databases
[08:22:32] za1b1tsu: should I make a normal rails app and then convert it into a gem?
[08:28:03] mangold: has joined #RubyOnRails
[08:29:14] za1b1tsu: hmmm, the idea is to have the database management separate so I can use in other projects
[08:30:07] za1b1tsu: have a web application and a dekstop application
[08:30:16] za1b1tsu: cli application etc
[08:30:34] tbuehlmann: what does "database management" mean exactly?
[08:30:48] za1b1tsu: migrations, schema, ORM
[08:33:03] ellcs: has joined #RubyOnRails
[08:33:12] tbuehlmann: why wouldn't you do that in the rails app?
[08:33:35] za1b1tsu: for example, I want to make a cli application that uses that database
[08:33:40] za1b1tsu: or try a desktop application etc
[08:34:31] sevenseacat: activerecord handles all that
[08:34:54] sevenseacat: no? or different rails library. include that
[08:35:53] za1b1tsu: for example, I want to create a migration, I have to create it for each app
[08:36:18] za1b1tsu: uh, nevermind, I should have my thoughts cleared, it's a personal project
[08:36:45] za1b1tsu: in my mind, I wanted to have the same backend for types of applications
[08:37:09] za1b1tsu: just change how you interent act with it, web, api, cli
[08:38:35] lxsameer: has joined #RubyOnRails
[08:42:01] tbuehlmann: web and api sounds like a rails app to me. a cli could be a gem (or script), but using the api, not interacting with the database on its own
[08:43:57] lxsameer: has joined #RubyOnRails
[09:00:02] Sylario: has joined #RubyOnRails
[09:04:00] mikecmpbll: has joined #RubyOnRails
[09:07:07] Dbugger: has joined #RubyOnRails
[09:45:01] pwnd_nsfw: has joined #RubyOnRails
[09:52:16] andywww: has joined #RubyOnRails
[09:53:47] hightower2: has joined #RubyOnRails
[09:58:33] tdy1: has joined #RubyOnRails
[10:04:04] mangold: has joined #RubyOnRails
[10:05:00] Ergo: has joined #RubyOnRails
[10:15:11] andywww: has joined #RubyOnRails
[10:26:27] andywww: has joined #RubyOnRails
[10:28:06] andywww: has joined #RubyOnRails
[10:48:55] lankanmon: has joined #RubyOnRails
[10:51:10] mangold: has joined #RubyOnRails
[11:02:09] apparition: has joined #RubyOnRails
[11:22:06] conta: has joined #RubyOnRails
[11:39:59] beholders_eye: has joined #RubyOnRails
[11:51:55] jaddison: has joined #RubyOnRails
[12:18:29] ariejan: has joined #RubyOnRails
[12:32:47] za1b1tsu: has joined #RubyOnRails
[12:42:48] Ergo: has joined #RubyOnRails
[12:43:31] faitswulff: has joined #RubyOnRails
[13:05:08] faitswulff: has joined #RubyOnRails
[13:07:20] ariejan: has joined #RubyOnRails
[13:09:33] mangold: has joined #RubyOnRails
[13:20:37] defsdoor: has joined #RubyOnRails
[13:53:48] Arkantos: has joined #RubyOnRails
[13:58:22] regedit: has joined #RubyOnRails
[13:59:37] ariejan: has joined #RubyOnRails
[14:21:56] mangold: has joined #RubyOnRails
[14:34:09] segy: has joined #RubyOnRails
[14:45:55] Vaevictus: has joined #RubyOnRails
[14:46:38] Vaevictus: anyone have a document for getting SSO working on a linux rails server?
[14:47:24] tbuehlmann: no, that's a pretty big topic
[14:47:48] Vaevictus: fair enough
[14:48:22] Vaevictus: I just realized that my unexpectedly-approved-by-departmentheads project requires it.
[14:49:07] Vaevictus: it's a trivial project, otherwise. :\
[14:50:28] faitswulff: has joined #RubyOnRails
[14:54:28] snk: has joined #RubyOnRails
[15:07:08] Dbugger: has joined #RubyOnRails
[15:07:34] faitswulff: has joined #RubyOnRails
[15:12:14] orbyt_: has joined #RubyOnRails
[15:12:45] ariejan: has joined #RubyOnRails
[15:15:26] MrCrackPotBuilde: has joined #RubyOnRails
[15:18:53] rascencio: has joined #RubyOnRails
[15:29:53] Inside: SSO of what kind
[15:30:05] Inside: Like active directory?
[15:30:07] Vaevictus: i suppose what i'm after is windows ad kerberos passthrough
[15:30:11] Vaevictus: now that i'm researching
[15:30:29] Vaevictus: i suppose i do that on the webserver layer?
[15:31:49] Vaevictus: or pam layer, i suppose
[15:33:11] Inside: I use active directory in my SSO app
[15:33:29] Inside: I don't know how kerberos ties into that
[15:33:55] Inside: I'm literally working on that code right now heh
[15:34:05] Vaevictus: well, the browsers on windows (when configured to do so) will pass the login auth from your windows sessopm
[15:34:17] Vaevictus: so you don't have to prompt for u/p at all
[15:35:42] Inside: Can you use devise?
[15:35:50] Inside: devise + ldap_authenticatable gem is the way to go
[15:37:14] Vaevictus: we're a hospital, and to encourage people to do a better job of console security, we're going to have a security game where if you leave your workstation unattended, someone can lock it for you with a simple command... and i'm going to have it also ping a webserver with who got "hacked" and what alias is claiming responsibility
[15:37:37] Vaevictus: i've literally only heard of devise this morning.
[15:39:13] Vaevictus: cash prizes for the most locked terminals :D
[15:41:05] orbyt_: has joined #RubyOnRails
[15:41:18] Vaevictus: so, what's devise?
[15:45:55] Inside: it's a gem for authentication
[15:46:27] Inside: sounds like what you want is an internal webpage someone can go to, then click a button?
[15:46:30] Inside: to log the person out?
[15:48:09] Inside: actually you probably don't even need devise for such athing
[15:57:21] Vaevictus: at this point, i may just use a batch file
[15:57:28] orbyt_: has joined #RubyOnRails
[15:57:35] Inside: how does someone claim the prize though?
[15:57:48] Vaevictus: batchfilename <alias>
[15:57:56] Vaevictus: well, that's yet to be determined
[15:58:06] Inside: that'd require someone to know how to use command prompt
[15:58:07] Vaevictus: I may have them register
[15:58:17] Inside: I suppose
[15:58:22] Vaevictus: you can do it from start, i think if i put it in the path
[15:58:23] Inside: the .bat file could pop up a prompt
[15:58:36] Inside: and then you could do a POST to an internal server
[15:58:44] jaddison: has joined #RubyOnRails
[15:58:54] Vaevictus: right now, if i do batchfilename.bat <alias> it's *instantaneous* locking and still loads a webbrowser with a target url including the alias
[15:59:03] Vaevictus: change it to "lockme"
[15:59:17] Vaevictus: claiming responsibility would be optional
[15:59:31] Vaevictus: yeah, prompting might be nice
[15:59:34] Inside: screwing with my coworkers AND getting kudos?
[15:59:36] Inside: i'm all in
[15:59:40] Vaevictus: kudos and *money*
[15:59:59] Vaevictus: screwing with them, silently getting kudos and money, publically remaining *anonymous*
[16:00:12] Vaevictus: and the benefit? account paranoia for FREE
[16:00:28] NeXTSUN: has joined #RubyOnRails
[16:00:29] kapil____: has joined #RubyOnRails
[16:00:44] Vaevictus: the day i'm over in medsurg and i see someone stand up, start to leave, then glare at me and go back, that's when i win :D
[16:01:37] Inside: I need to merge master into my working branch
[16:01:48] Inside: but there's a merge conflict
[16:02:10] Inside: but it wants me to commit all my changes
[16:02:14] Inside: but I don't want to commit my changes just yet
[16:02:37] Vaevictus: aww, win10 *searched* for it if i don't put .bat
[16:02:45] Inside: mostly because VSCode lets me diff everything within the editor really nicely
[16:02:56] Vaevictus: i may have to wrap it in an exe
[16:03:09] Inside: hammer out a quickie C# program with a dialog box
[16:03:22] Inside: winform it up
[16:03:29] Vaevictus: yeah. i'm torn on that
[16:03:50] Vaevictus: type type vs type (no attribution) vs type mouse click type click
[16:04:23] Vaevictus: i think... if they really want a gui, I'll just point them at the webserver directly
[16:04:28] Vaevictus: i.e. desktop shortcut
[16:08:24] Vaevictus: the problem with non-executable/batches is that we then have to trust the "hacker" to lock the terminal
[16:11:20] tdy1: has joined #RubyOnRails
[16:12:21] gambl0r3: has joined #RubyOnRails
[16:24:06] NeXTSUN: has joined #RubyOnRails
[16:30:21] Vaevictus: i mean, if you're a nurse on the nursing unit screwing with a coworker, you want in-and-out as fast as possible
[16:30:25] Vaevictus: driveby if possible
[16:31:55] Inside: USB stick with auto executing bat
[16:32:19] Inside: everyone can have a custom usb stick
[16:32:24] Inside: you can make an app that makes USB stick images
[16:32:30] Vaevictus: ACTION gives you a usb virus
[16:32:36] Inside: but it's already possible
[16:32:42] Inside: unless you're hot gluing USB ports
[16:32:49] Vaevictus: not on my network. usb is locked out at the OS level
[16:32:54] Inside: nice nice nice
[16:33:05] Vaevictus: badusb is nasty anyway though
[16:36:01] [Butch]: has joined #RubyOnRails
[16:37:28] hnanon: has joined #RubyOnRails
[16:50:11] Ergo: has joined #RubyOnRails
[16:53:41] mlt-: has joined #RubyOnRails
[16:59:11] cam27: has joined #RubyOnRails
[17:14:32] orbyt_: has joined #RubyOnRails
[17:16:03] Inside: I am literally re-inventing cancan right now
[17:23:56] gambl0r3: has joined #RubyOnRails
[17:45:57] eddof13: has joined #RubyOnRails
[17:55:25] Andr3as: has joined #RubyOnRails
[18:07:17] Andr3as: hi all.. i've got an issue with running the command: rake webpacker:compile RAILS_ENV=staging which results in a
[18:07:25] Andr3as: TypeError: no implicit conversion of nil into String
[18:08:01] Andr3as: i did quite an extensive google search but i havent been able to come up with a hint on how to track that down.. anyone an idea how to find out where it dies?
[18:08:22] Andr3as: dev env compiles just fine
[18:09:17] havenwood: Time to update Rails (CVE with dev RCE)! https://weblog.rubyonrails.org/2019/3/13/Rails-4-2-5-1-5-1-6-2-have-been-released/
[18:11:01] havenwood: Andr3as: What version of Rails?
[18:11:11] havenwood: Andr3as: Maybe this issue?: https://github.com/rails/webpacker/issues/1912
[18:11:43] Andr3as: i am on 5.2.2.1
[18:12:24] Andr3as: havent touched the app in a while, it worked great before.. went from linux to windows, pulled it out of my gitlab, did some updates and now boom
[18:12:51] Andr3as: updates as in "bundle update" and some minor bug fixes in the code.. totally unrelated to that error
[18:13:28] Andr3as: will give that a try, havenwood.. thank you
[18:14:26] Andr3as: ha, that "fixes" it
[18:14:39] Andr3as: thanks a lot!! i googled for like hours
[18:18:24] cam27: has joined #RubyOnRails
[18:25:36] ss942: has joined #RubyOnRails
[18:27:02] ss942: Any tips on how to use deface gem to override view in place just after loop? I know that it would be :insert_after but I have problem with creating correct erb selector
[18:31:12] hnanon: has joined #RubyOnRails
[18:32:00] NeXTSUN: has joined #RubyOnRails
[18:32:24] za1b1tsu: has joined #RubyOnRails
[18:34:41] cnsvc: has joined #RubyOnRails
[18:42:38] Inside: Ugh.. how do I get rails to eager_load all the classes in a directory in production. I have a folder app/roles and inside I've got a number of classes ie: (Role::Admin) which are derived from Role::Base. I'd like to be able to have a "RoleManager" class where I could call "RoleManager.all_roles" and get all the available roles
[18:42:56] Inside: (without turning eager_load on)
[18:44:33] Inside: Although, I suppose, I could mess around with the base initialize() function for it to auto register itself.. seems dirty thoug
[18:44:50] Inside: oh, but it wouldn't even register
[18:44:57] Inside: or an initializer..
[18:52:37] sameerynho: has joined #RubyOnRails
[18:54:10] krawchyk: has joined #RubyOnRails
[18:57:28] ellcs: has joined #RubyOnRails
[19:01:45] faitswulff: has joined #RubyOnRails
[19:01:56] cam27: has joined #RubyOnRails
[19:04:39] uks: has joined #RubyOnRails
[19:05:34] hammer: has joined #RubyOnRails
[19:06:34] Milos: has joined #RubyOnRails
[19:07:37] w0rd-driven: has joined #RubyOnRails
[19:15:03] rascencio: has joined #RubyOnRails
[19:51:08] [Butch]: has joined #RubyOnRails
[19:59:37] mangold: has joined #RubyOnRails
[20:00:38] ur5us: has joined #RubyOnRails
[20:04:24] orbyt_: has joined #RubyOnRails
[20:10:32] eddof13: has joined #RubyOnRails
[20:18:56] ams__: has joined #RubyOnRails
[20:25:03] uksio: has joined #RubyOnRails
[20:31:35] eckhardt: has joined #RubyOnRails
[20:33:33] ellcs: has joined #RubyOnRails
[20:38:52] SanguineAnomaly: has joined #RubyOnRails
[20:54:26] jaddison: has joined #RubyOnRails
[21:01:11] SteenJobs: has joined #RubyOnRails
[21:09:44] faitswulff: has joined #RubyOnRails
[21:14:47] cnsvc: has joined #RubyOnRails
[21:17:34] faitswulff: has joined #RubyOnRails
[21:26:45] faitswulff: has joined #RubyOnRails
[21:27:31] SteenJobs_: has joined #RubyOnRails
[21:35:50] Inside: Radar: \o
[21:35:56] Radar: Inside: good morning
[21:39:06] faitswulff: has joined #RubyOnRails
[21:40:00] ss942: https://stackoverflow.com/questions/55149517/spree-deface-selector-on-erb-loop
[21:40:07] ss942: I really need help with deface gem
[21:42:27] gambl0r3: has joined #RubyOnRails
[21:46:55] Radar: ss942: !rule0
[21:46:55] helpa: ss942: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[21:50:19] Fernando-Basso: has joined #RubyOnRails
[21:50:30] faitswulff: has joined #RubyOnRails
[22:00:37] dviola: has joined #RubyOnRails
[22:11:14] defsdoor_: has joined #RubyOnRails
[22:26:13] dviola: has joined #RubyOnRails
[22:33:53] SteenJobs_: has joined #RubyOnRails
[22:39:31] ss942: has left #RubyOnRails: ()
[23:06:43] NeXTSUN: has joined #RubyOnRails
[23:45:31] hnanon: has joined #RubyOnRails
[23:51:52] segy: has joined #RubyOnRails