« Back to channel list

#RubyOnRails - 17 March 2017

« Back 1 day Forward 1 day »
[00:00:16] eclecticjohny: has joined #RubyOnRails
[00:04:07] rgtk: has joined #RubyOnRails
[00:04:26] tdy: has joined #RubyOnRails
[00:06:43] green_hat: has joined #RubyOnRails
[00:07:34] brandtam: has joined #RubyOnRails
[00:12:53] SteenJobs: has joined #RubyOnRails
[00:15:42] xhoy: has joined #RubyOnRails
[00:17:24] beingjohnm_: anybody have any experience with the Griddler gem? I'm trying to use it to process incoming email via mailgun and it doesn't seem to be parsing the emails as indicated by the documentation
[00:21:29] pawnbox: has joined #RubyOnRails
[00:22:42] Technodrome: has joined #RubyOnRails
[00:23:57] dobs: has joined #RubyOnRails
[00:25:31] djbkd: has joined #RubyOnRails
[00:26:01] dobs: hi, does anyone know how to make a where condition on an eager_loaded association with a class_name? (e.g.: City.includes(:state).where(state: { iso: "AL" } does NOT work if the "belongs_to :state" association uses a "class_name" other than "state")
[00:27:52] dobs: the where condition becomes "where state.iso = 'AL'" when i would want it to be "where state_table_V1.iso = 'AL'"
[00:35:32] FoolsGambit: has joined #RubyOnRails
[00:36:28] dminuoso: dobs: I have stopped trying to right arel.
[00:37:05] dobs: dminuoso: lol did you understand what i meant
[00:37:09] dminuoso: dobs: Anything non-trivial receives the raw sql treatment. Since Ive done that I sped up writing queries because I didn't have to keep translating SQL into this bizarre quirky AR syntax that breaks if you try anything non-basic-crud
[00:37:13] dminuoso: croberts: Yes.
[00:37:34] croberts: dminuoso: accidental ping?
[00:37:42] dminuoso: croberts: My irssi is super bugged.
[00:37:45] hahuang61: has joined #RubyOnRails
[00:37:47] croberts: no worries :)
[00:37:48] dminuoso: croberts: I typed do<tab> and it completed with croberts
[00:38:15] dminuoso: croberts: Ive been experiencing this for months now. :|
[00:38:22] dobs: dminuoso: so you have no idea how to put a where condition on an association?
[00:38:31] dobs: (without raw sql)
[00:38:32] croberts: hope it gets fixed soon for you :( that does not sound fun
[00:39:58] dobs: City.includes(:states).merge(State.where(iso: "AL")) works but .. heh ...
[00:40:11] dminuoso: dobs: that's what I did.
[00:40:25] dminuoso: dobs: you end up with these huge incomprehensible arel queries..
[00:40:33] dminuoso: its you fighting ActiveRecord.
[00:40:50] dobs: then how do you put a where condition on a left join association
[00:41:14] dobs: where "model.field" does not work if model.name != table_name
[00:41:31] nOwz: has joined #RubyOnRails
[00:45:00] dobs: sometimes im amazed how rails is so awesome and powerful but "forgot" (is that the right word?) simple things like an or condition or a where condition on a join lol
[00:46:26] blackmesa: has joined #RubyOnRails
[00:50:03] dminuoso: dobs: Perhaps now you understand why ORMs are generally frowned upon.
[00:50:27] dminuoso: SQL was designed to describe all these problems.
[00:50:51] dminuoso: dobs: Have you ever tried using analytic functions over windows with AR?
[00:51:03] dminuoso: Its super trivial and generally incredibly useful.
[00:51:09] Papierkorb: dminuoso, dobs: Sequel is surprisingly powerful
[00:51:14] dminuoso: but with AR its basically "fuck off"
[00:51:21] Papierkorb: AR just isn't up to speed
[00:51:33] dobs: Papierkorb: yes i know
[00:51:35] Papierkorb: it already forces you to write strings when you need a LIKE :|
[00:51:56] dobs: AR does not really like legacy databases
[00:52:16] dobs: i am beginning to think it wouldve been faster to rename all the old tables
[00:52:23] dminuoso: dobs: AR does not like anything that is compatible with sqlite.
[00:52:30] dminuoso: *that is not
[00:53:41] dobs: Papierkorb: do *you* know how to put a where condition on an association? lol
[00:53:52] Papierkorb: dobs: with AR? No idea
[00:54:06] dminuoso: dobs: Its simple.
[00:54:12] Papierkorb: Though I'd use a scope there
[00:54:25] dobs: Papierkorb: even with a scope
[00:54:31] dminuoso: dobs: City.includes(:state).where(states: { iso: "AL" })
[00:54:39] dobs: dminuoso: does not work
[00:54:41] dminuoso: dobs: look closer.
[00:54:46] dminuoso: dobs: and look again
[00:54:55] dminuoso: dobs: its not what you wrote. :o)
[00:54:55] dobs: dminuoso: does not work if the table name is not "states"
[00:55:04] dminuoso: dobs: then change that symbol to the..
[00:55:35] dobs: i thought AR would "take the table name of the association named :state"
[00:56:53] dminuoso: AR is basically short for "fuck off"
[00:57:59] dminuoso: dobs: Honestly the cases I had I used raw sql fragments in the where clause
[00:58:39] lightheaded: has joined #RubyOnRails
[00:58:44] dminuoso: dobs: i.e. .where('"FOO"."baz" = ?', quux)
[00:58:49] dobs: dminuoso: yes that does work indeed
[00:59:07] dminuoso: dobs: and if you think about it really long there's absolutley nothing wrong with that.
[00:59:08] dobs: dminuoso: the only "problem" is that you have to know the name of the underlying table
[00:59:19] dminuoso: Oh boy. You have to know about the table you are interacting with.
[00:59:24] dminuoso: You are acting as if this is a bad thing.
[00:59:34] dminuoso: AR does not encapsulate tables.
[00:59:37] dminuoso: AR is not about hiding.
[00:59:40] dminuoso: Its about hiding SQL.
[01:01:28] dminuoso: dobs: Which is kind of the problem. It automatically hides this from you for so long that you feel uncomfortable when you are presented with reality.
[01:02:18] dobs: dminuoso: no, i love sql that is not a problem
[01:02:43] dobs: dminuoso: its just that i was trying to do it "the rails way" (whatever that means lol)
[01:03:05] dminuoso: dobs: think about it: the moment you even say: .where(name: "foo") you already have to know the name of the underlying column
[01:03:15] dminuoso: you have to know about the names of all underlying columns
[01:03:22] dobs: alias_attribute
[01:03:42] dminuoso: you mean to say
[01:03:44] dminuoso: rename_column in a migratoin
[01:03:54] dobs: there is no migration
[01:03:57] dobs: legacy database
[01:04:04] dminuoso: that is your real problem then
[01:04:11] dminuoso: not having to know underlying table names
[01:04:21] dobs: yes i know
[01:04:56] iwada: has joined #RubyOnRails
[01:06:16] dobs: http://stackoverflow.com/questions/4103677/activerecordrelation-cannot-use-named-association-in-where-clause-of-join
[01:07:29] baweaver: https://github.com/rzane/baby_squeel
[01:08:16] juggler: has joined #RubyOnRails
[01:17:13] dobs: thanks for the conversation
[01:21:21] baweaver: E45: 'readonly' option is set (add ! to override)
[01:23:21] jtcchan: has joined #RubyOnRails
[01:23:30] eclecticjohny: has joined #RubyOnRails
[01:24:55] stayBlind: has joined #RubyOnRails
[01:26:20] stayBlind: has left #RubyOnRails: ("Leaving")
[01:26:41] dminuoso: baweaver: Wait. Are you one of those silly users that has r/w permissions in their filesystem.
[01:26:42] green_hat: has joined #RubyOnRails
[01:26:59] dminuoso: Real men live the fact that anyone could modify any file.
[01:29:22] baweaver: E212: Can't open file for writing
[01:30:35] jtcchan: has joined #RubyOnRails
[01:32:03] dminuoso: baweaver: if you pick a manly file system you would be much more productive instead of battling vim!
[01:33:26] baweaver: :w !sudo tee %
[01:42:08] Rodya_: has joined #RubyOnRails
[01:42:16] dopamean_: has joined #RubyOnRails
[01:43:32] SteenJobs: has joined #RubyOnRails
[01:45:21] cschneid_: has joined #RubyOnRails
[01:48:13] newalexandria: has joined #RubyOnRails
[01:50:45] irishfromua: has joined #RubyOnRails
[01:52:14] jeffleeismyhero: has joined #RubyOnRails
[01:52:26] hfp_work: has joined #RubyOnRails
[01:52:41] pawnbox: has joined #RubyOnRails
[01:55:28] SteenJobs: has joined #RubyOnRails
[01:57:59] irishfromua: has joined #RubyOnRails
[02:00:32] Jasaka: has joined #RubyOnRails
[02:07:08] habitullence_: has joined #RubyOnRails
[02:10:45] rfoust: has joined #RubyOnRails
[02:20:09] DaniG2k: has joined #RubyOnRails
[02:21:56] DaniG2k: I have a has_many / belongs_to association between ActivityHost and Activity models
[02:22:10] DaniG2k: and a select tag in a form
[02:22:25] DaniG2k: I want the select tag to preselect the activity's activity_host
[02:22:26] pawnbox: has joined #RubyOnRails
[02:22:40] DaniG2k: i currently have the line
[02:22:52] DaniG2k: <%= f.select(:host_id, options_for_select(ActivityHost.all.map {|host| [host.name, host.id]}, selected: @activity.activity_host)) %>
[02:23:00] DaniG2k: however, this is not preselecting the correct value
[02:23:39] DaniG2k: I'm wondering what I'm doing incorrectly
[02:23:46] hahuang61: has joined #RubyOnRails
[02:23:51] DaniG2k: here is a Gist:
[02:25:09] DaniG2k: https://gist.github.com/DaniG2k/82ac6a39474328f910cd7b691af1d725
[02:25:53] roflmyeggo: has joined #RubyOnRails
[02:26:26] irishfromua: has joined #RubyOnRails
[02:27:56] spicerack: has joined #RubyOnRails
[02:28:20] jenrzzz: has joined #RubyOnRails
[02:28:48] the_coder: has joined #RubyOnRails
[02:29:36] the_coder: I'm accessing the results of an API lookup with the following piece of code item_hash["OfferSummary"]["LowestUsedPrice"]["FormattedPrice"]
[02:30:12] the_coder: How can I determine if that variable exists or to set a different object?
[02:31:02] chridal: item_hash["OfferSummary"]["LowestUsedPrice"]["FormattedPrice"].nil?
[02:31:18] chridal: the_coder ^^
[02:31:26] roflmyeggo: suggestions for theming a rails app?
[02:31:32] roflmyeggo: is Dressed the canonical way to go?
[02:31:49] the_coder: Already tried that chridal, it triggers an error when it doesn't exist
[02:32:12] chridal: So which of them is it that doesn't exist?
[02:32:19] chridal: Can you expect any of those elements to exist?
[02:32:31] chridal: I mean OfferSummary, LowestUsedPrice or FormattedPrice?
[02:32:42] spicerack: I'm installing a bootstrap gem - bootstrap-sass - when i try to generate the bootstrap documents my terminal says: Could not find generator 'layout:install'. - does anyone know anything about this that could help?
[02:32:49] chridal: the_coder: or are none of them guaranteed to be there?
[02:32:58] the_coder: I've just figured it out, instead of .nil?, I prefaced it with defined? and that worked great
[02:33:09] the_coder: Thank you for assistance chridal
[02:33:45] the_coder: what is the meaning of that emotican
[02:35:45] chridal: It's thumbs up
[02:37:11] chridal: the_coder: I think it originates from MSN/AIM, but it also works on Messenger
[02:37:25] the_coder: Ah I see m8, cheers
[02:38:35] aperkins81: has joined #RubyOnRails
[02:38:55] newalexandria: has joined #RubyOnRails
[02:39:21] chagel: has joined #RubyOnRails
[02:40:05] nya: has joined #RubyOnRails
[02:46:15] DaniG2k: has left #RubyOnRails: ()
[02:46:24] DaniG2k: has joined #RubyOnRails
[02:47:20] boog: has joined #RubyOnRails
[02:52:31] pawnbox: has joined #RubyOnRails
[02:57:17] agent_white: has joined #RubyOnRails
[02:59:35] lightheaded: has joined #RubyOnRails
[03:00:40] nickenchuggets: when a server is looking for a particular cookie... does the client know?
[03:00:57] nickenchuggets: does the client know you're sniffing its cookies
[03:02:28] the_coder: If I catch you looking at my cookies
[03:02:32] the_coder: I sweater god
[03:03:33] the_coder: Anyone here knowledgable on Active Jobs? Reading the docs and wondering what the best way to have a recurring job is (every x hours)
[03:03:46] the_coder: Should I use the after job function to just add the job back into the queue?
[03:04:40] libastral: has joined #RubyOnRails
[03:10:09] shamanime: has joined #RubyOnRails
[03:19:03] nickenchuggets: you sweater god
[03:19:08] nickenchuggets: god of sweaters
[03:21:34] cschneid_: has joined #RubyOnRails
[03:24:19] adkoge: has joined #RubyOnRails
[03:32:31] Jasaka|NA: has joined #RubyOnRails
[03:34:24] webnanners: has joined #RubyOnRails
[03:35:10] Jasaka|NA: has joined #RubyOnRails
[03:35:46] DoubleMalt: has joined #RubyOnRails
[03:39:22] spicerack: I'm installing a bootstrap gem - bootstrap-sass - when i try to generate the bootstrap documents my terminal says: Could not find generator 'layout:install'. - does anyone know anything about this that could help?
[03:39:59] spicerack: I've googled/SO it
[03:40:31] duderonomy: has joined #RubyOnRails
[03:41:49] pawnbox: has joined #RubyOnRails
[03:44:52] Rodya_: has joined #RubyOnRails
[03:46:01] spicerack: ah i understand what's going on now
[03:53:42] dopamean_: has joined #RubyOnRails
[03:56:13] envint: has joined #RubyOnRails
[03:58:21] username: has joined #RubyOnRails
[03:58:40] armyriad: has joined #RubyOnRails
[04:00:12] Jasaka: has joined #RubyOnRails
[04:01:20] zero1one0: has joined #RubyOnRails
[04:04:25] doodlehaus: has joined #RubyOnRails
[04:10:46] boog: has joined #RubyOnRails
[04:24:31] hahuang61: has joined #RubyOnRails
[04:34:36] DoubleMalt: has joined #RubyOnRails
[04:43:39] eclecticjohny: has joined #RubyOnRails
[04:44:19] eclecticjohny: has joined #RubyOnRails
[04:45:39] Rodya_: has joined #RubyOnRails
[04:47:53] jeyraof^mbpr: has joined #RubyOnRails
[04:51:38] nOwz: has joined #RubyOnRails
[04:58:20] pawnbox: has joined #RubyOnRails
[04:58:41] patarr: has joined #RubyOnRails
[05:00:12] lightheaded: has joined #RubyOnRails
[05:06:17] unmanbearpig: has joined #RubyOnRails
[05:13:21] username: has joined #RubyOnRails
[05:15:15] dionysus69: has joined #RubyOnRails
[05:15:37] tofutoon: has joined #RubyOnRails
[05:19:19] djbkd: has joined #RubyOnRails
[05:26:08] jaequery: has joined #RubyOnRails
[05:40:07] pawnbox: has joined #RubyOnRails
[05:42:04] brent__: has joined #RubyOnRails
[05:42:37] pawnbox: has joined #RubyOnRails
[05:43:20] pawnbox: has joined #RubyOnRails
[05:45:33] lightheaded: has joined #RubyOnRails
[05:46:25] Rodya_: has joined #RubyOnRails
[05:52:25] pawnbox: has joined #RubyOnRails
[05:54:44] pawnbox: has joined #RubyOnRails
[05:54:45] WinterBluFox: has joined #RubyOnRails
[05:56:15] pawnbox: has joined #RubyOnRails
[06:01:01] Robtop__: has joined #RubyOnRails
[06:02:01] dminuoso: spicerack: Avoid rails gems for raw CSS things such as bootstraps IMO.
[06:05:37] rubyonrails159: has joined #RubyOnRails
[06:06:27] pwnd_nsfw`: has joined #RubyOnRails
[06:10:14] harfangk: has joined #RubyOnRails
[06:10:15] spicerack: should i just import it manually then?
[06:10:15] dminuoso: spicerack: Anyway, look at that repository and tell me which generator that is supposed to run.
[06:10:43] dminuoso: spicerack: The answer is: none. It's just a raw sass library
[06:10:55] dminuoso: spicerack: What you may be looking for is a gem called "bootstrap-generators"
[06:11:21] spicerack: Well, I made a post on reddit and someone says that the docs say to just use @import in the application.css but the tutorial i'm following (learn-rails daniel kehoe) says that after you install this particular gem you need to import the bootstrap files, so the gem in the tutorial is bootstrap-sass
[06:11:39] DoubleMalt: has joined #RubyOnRails
[06:11:51] dminuoso: How about you refer to the raw installation instructions of the gem?
[06:12:11] spicerack: yeah that's what i'm working on kinda but i'm going to have to wait until saturday to work on it again
[06:12:13] spicerack: it's pretty late
[06:14:49] spicerack: thanks for the insight :)
[06:15:09] Jasaka|NA: has joined #RubyOnRails
[06:25:17] hahuang61: has joined #RubyOnRails
[06:28:48] onkelhotte: has joined #RubyOnRails
[06:30:57] pulkit4tech: has joined #RubyOnRails
[06:42:36] kristofferR: has joined #RubyOnRails
[06:44:32] darutoko: has joined #RubyOnRails
[06:47:08] Rodya_: has joined #RubyOnRails
[06:49:03] Ebok: has joined #RubyOnRails
[06:52:33] nOwz: has joined #RubyOnRails
[06:54:10] d0nn1e: has joined #RubyOnRails
[06:57:12] jenrzzz: has joined #RubyOnRails
[06:57:12] jenrzzz: has joined #RubyOnRails
[06:59:32] patarr: has joined #RubyOnRails
[07:05:07] iamse7en: has joined #RubyOnRails
[07:07:42] pLaTo0n: has joined #RubyOnRails
[07:10:49] iamse7en: anyone have a second to help me? i'm stumped on what combos of .map/.select/etc to get the desired result here. https://gist.github.com/anonymous/480bf9f18e98fd12020a196ff4dad7ca
[07:16:06] lightheaded: has joined #RubyOnRails
[07:16:19] keerthana: has joined #RubyOnRails
[07:17:16] dionysus69: has joined #RubyOnRails
[07:21:16] cschneid_: has joined #RubyOnRails
[07:25:13] prvithani: has joined #RubyOnRails
[07:26:15] prvithani: Hi guys, i'm getting error while running custom generator with templates
[07:26:42] prvithani: technically, the rails can't interpret the erb syntax in .rb file for generator templates
[07:28:56] conta: has joined #RubyOnRails
[07:31:26] r3vDev: has joined #RubyOnRails
[07:31:43] xall: has joined #RubyOnRails
[07:32:51] r3vDev: has joined #RubyOnRails
[07:33:41] lightheaded: has joined #RubyOnRails
[07:35:00] r3vDev: has joined #RubyOnRails
[07:42:11] jtcchan: has joined #RubyOnRails
[07:44:43] pwnd_nsfw: has joined #RubyOnRails
[07:45:32] defsdoor: has joined #RubyOnRails
[07:46:59] rvanlieshout: has joined #RubyOnRails
[07:47:04] rvanlieshout: has left #RubyOnRails: ()
[07:47:05] kassav_: has joined #RubyOnRails
[07:47:35] rvanlieshout: has joined #RubyOnRails
[07:48:46] iwada: has joined #RubyOnRails
[08:00:28] Jasaka|NA: has joined #RubyOnRails
[08:01:30] pwnd_nsfw`: has joined #RubyOnRails
[08:03:41] pawnbox: has joined #RubyOnRails
[08:04:50] Jasaka|NA: has joined #RubyOnRails
[08:11:49] _3dwardsharp: has joined #RubyOnRails
[08:16:51] aganov: has joined #RubyOnRails
[08:18:04] mark_66: has joined #RubyOnRails
[08:19:48] Robtop__: has joined #RubyOnRails
[08:21:48] pawnbox: has joined #RubyOnRails
[08:26:12] hahuang61: has joined #RubyOnRails
[08:28:24] amritoit: has joined #RubyOnRails
[08:32:34] artto: has joined #RubyOnRails
[08:35:51] juggler: has joined #RubyOnRails
[08:49:24] ReBa_: has joined #RubyOnRails
[08:50:47] fluxsource: has joined #RubyOnRails
[08:53:20] nOwz: has joined #RubyOnRails
[08:56:42] Jasaka|NA: has joined #RubyOnRails
[08:59:26] doodlehaus: has joined #RubyOnRails
[08:59:56] artto: has joined #RubyOnRails
[09:00:24] patarr: has joined #RubyOnRails
[09:01:56] zpe: has joined #RubyOnRails
[09:05:09] tvw: has joined #RubyOnRails
[09:11:20] artto: has joined #RubyOnRails
[09:11:46] jtcchan: has joined #RubyOnRails
[09:15:16] artto: has joined #RubyOnRails
[09:19:22] arBmind: has joined #RubyOnRails
[09:19:52] Radar: has joined #RubyOnRails
[09:21:25] boshhead: has joined #RubyOnRails
[09:21:32] tris: has joined #RubyOnRails
[09:22:44] artto: has joined #RubyOnRails
[09:22:52] guacamole: has joined #RubyOnRails
[09:23:09] rgr: has joined #RubyOnRails
[09:24:33] Pumukel: has joined #RubyOnRails
[09:25:30] elaptics: has joined #RubyOnRails
[09:27:04] marr: has joined #RubyOnRails
[09:31:56] srinidhi: has joined #RubyOnRails
[09:35:40] spicerack: has joined #RubyOnRails
[09:36:28] Jasaka: has joined #RubyOnRails
[09:40:21] Jasaka|NA: has joined #RubyOnRails
[09:42:23] rgr: hand holding. so many new things. so many things seemingly overlapping. do I use bundle OR rvm?
[09:42:59] _3dwardsharp: rgr uh, you can you either/both/none
[09:43:17] rgr: pretty much the whoel gem concept is to "bundle" things into a self contained "bundle" that can run regardless of system wide versions?
[09:43:37] _3dwardsharp: no, that's rvm's thing
[09:43:48] rgr: and not bundler?
[09:43:57] jlebrech: has joined #RubyOnRails
[09:44:20] rgr: ugh. OK. I'l need to go google more. I read so many half arsed convoluted things its hard to sort the wheat from the chaff.
[09:44:38] jlebrech: am i right in thinking it's better to permit parameters at the point the parameter is required, rather than early in the controller?
[09:44:39] blackmesa: has joined #RubyOnRails
[09:45:05] _3dwardsharp: rgr, 1) close your web browser 2) open your terminal, start irb
[09:45:12] dminuoso: _3dwardsharp: You are mixing two things up
[09:45:23] dminuoso: 10:43 < rgr> pretty much the whoel gem concept is to "bundle" things into a self contained "bundle" that can run regardless of system wide versions?
[09:45:26] dminuoso: Yes and no.
[09:45:33] _3dwardsharp: dminuoso well, sure :D
[09:45:34] dminuoso: rgr: Bundle manages gems, but rvm/rbenv/chruby manages ruby versions.
[09:45:36] dminuoso: rgr: However!
[09:45:48] _3dwardsharp: rvm gemset's gonna blow yr mind!
[09:45:53] dminuoso: rgr: A gemfile can also constrain a ruby version (but it cannot make bundle use that version)
[09:45:57] dminuoso: _3dwardsharp: screw rvm
[09:46:14] helpa: has joined #RubyOnRails
[09:46:15] _3dwardsharp: i got no shade for rvm
[09:46:22] dminuoso: Honestly, go into #ruby sometimes. Every day you get users with strange and bizarre issues related to rvm.
[09:46:40] dminuoso: It hooks into shell commands to work
[09:46:49] _3dwardsharp: that's totally real! it can be a bear to get started with
[09:47:02] dminuoso: I wouldn't recommend anything but chruby if you need version switching.
[09:47:25] jlebrech: dminuoso: vms for the win
[09:47:31] dminuoso: jlebrech: docker for the win.
[09:47:33] workmad3: has joined #RubyOnRails
[09:47:59] jlebrech: dminuoso: yeah
[09:48:35] _3dwardsharp: yeah, docker, like rvm, is great until it's not, lolol
[09:48:36] jlebrech: dminuoso: just install the things you need for your current app, no weird old shit from 5 years ago
[09:48:47] dminuoso: _3dwardsharp: Such as?
[09:48:55] dminuoso: _3dwardsharp: docker provides predictable environments.
[09:49:09] jlebrech: _3dwardsharp: when you use it wrong, and try to retrofit stuff into running containers?
[09:49:52] dminuoso: _3dwardsharp: most issues I see related to docker have to do with really large scaling -> but by the time you scale an app to hundreds of servers you have the resources to hire entire teams to deal with scalability.
[09:49:57] _3dwardsharp: hey! i'm not here to argue for rvm or docker! both are super useful. but there's nuance to every tool
[09:51:57] Jasaka: has joined #RubyOnRails
[09:51:57] jlebrech: rvm more than one version of ruby shouldn't exist together
[09:52:19] dminuoso: jlebrech: well locally i have tons of ruby versions for various reasons.
[09:52:27] dminuoso: and for this something like chruby is absolutely great.
[09:52:47] jlebrech: dminuoso: locally you can chose i guess
[09:53:02] dminuoso: jlebrech: Yea. For deployment rvm is almost never the right tool.
[09:53:12] dminuoso: For deployment system ruby should be preferred or docker.
[09:53:20] dminuoso: (or a raw ruby-install)
[09:54:25] AzaToth: has joined #RubyOnRails
[09:54:31] jlebrech: i use rbenv and switch system ruby for my use case (no the best, should have an rvmrc)
[09:54:55] fox_mulder_cp: dminuoso: ahaha. next part of my app ^) https://1drv.ms/i/s!AvS3PCPMZNLuibUWDdyh7JaSLwgTPA
[09:55:27] fox_mulder_cp: zones need to be arranged, yep. and trololo is a russian-lang memo )
[09:55:29] dminuoso: ACTION clicks
[09:55:35] tbuehlmann: ACTION clicks
[09:55:52] dminuoso: fox_mulder_cp: Looking good. :)
[09:55:59] rgr: eek. thanks chaps. water suitably muddied now ;) Youtube here I come! ;)
[09:56:04] lxsameer: has joined #RubyOnRails
[09:56:06] dminuoso: Ive done some more checking, ant.design is really impressive fox_mulder_cp
[09:56:20] dminuoso: fox_mulder_cp: there's a styling issue!
[09:56:25] dminuoso: your panels dont align
[09:56:39] dminuoso: te check result panel is slightly smaller than the panels above and below
[09:57:24] fox_mulder_cp: dminuoso: i know, thanks. i rewrite code styling for one template. do you think, that is a good style for show this to end-users?
[09:58:01] fox_mulder_cp: dminuoso: by the way, in this onedrive folder another screens presented
[09:58:37] dminuoso: fox_mulder_cp: only seeing that one screen
[09:58:53] dminuoso: fox_mulder_cp: But yeah, I think it looks clean and good to start with.
[09:59:37] dminuoso: tbuehlmann: what do you think?
[10:00:12] tbuehlmann: looks like a website to me
[10:00:19] tbuehlmann: sorry, no time right now :(
[10:01:39] fox_mulder_cp: dminuoso: https://1drv.ms/f/s!AvS3PCPMZNLuia8D1FjSB5ICCzvnJA
[10:05:14] Jasaka|NA: has joined #RubyOnRails
[10:08:34] Jasaka|NA: has joined #RubyOnRails
[10:11:12] _3dwardsharp: *sigh* and then i find this: https://gist.github.com/edwardsharp/01d35947ffea615546bea4050f09c5d3
[10:12:13] dminuoso: _3dwardsharp: let me guess, that method takes a parameter called "this" and then starts calling methods on this? :-)
[10:13:14] jlebrech: is it possible to make vcr match only the path and not every param?
[10:13:39] rgr: has joined #RubyOnRails
[10:13:57] _3dwardsharp: like query params?
[10:14:21] rgr: has joined #RubyOnRails
[10:14:41] jlebrech: yeah, i changed my code and it's passing a few junk params to it but the response should be the same anyway
[10:14:52] _3dwardsharp: uri_without_param ?
[10:15:06] ebbflowgo: has joined #RubyOnRails
[10:15:07] jlebrech: ah, i'll look into it
[10:15:34] gloscombe: has joined #RubyOnRails
[10:15:46] _3dwardsharp: ACTION def look; self.class.look(self); end
[10:16:06] jlebrech: found it, easy
[10:19:11] jlebrech: vcr should record multiple variations of a query
[10:20:30] jlebrech: i want an engine to manage vcr cassettes like rails_admin
[10:20:48] pawnbox: has joined #RubyOnRails
[10:21:38] nOwz: has joined #RubyOnRails
[10:24:58] Andr3as: morning everyone - is there an easy way to somewhat overwrite the redirect via a form? i want to have a new form where i can create an entry and with OK it should redirect like defined in the controller.. but i'd like to have another submit button "Save and Create New" which should create the entry and redirect to the new action again...
[10:25:04] Pumukel: has joined #RubyOnRails
[10:25:06] Cork: where is the documentation for valid values for config.active_support.deprecation ?
[10:26:28] FoolsGambit: has joined #RubyOnRails
[10:27:00] hahuang61: has joined #RubyOnRails
[10:27:49] quazimodo: has joined #RubyOnRails
[10:28:35] jlebrech: Andr3as: yes just use redirect_to with params
[10:29:54] keerthana: has joined #RubyOnRails
[10:29:56] Andr3as: aah, right, that makes sense, thank you, jlebrech
[10:33:46] dminuoso: Mmm, how are sequences used for primary keys? Am I right in assuming that rails will implicitly pass seq.nextval for the ID column somewhere?
[10:33:53] dminuoso: The thing is, the SQL log does not show this.
[10:34:02] dminuoso: Maybe its just this stupid oracle "enhanced" adapter.
[10:37:17] adlerdias__: has joined #RubyOnRails
[10:39:28] rgr: has joined #RubyOnRails
[10:39:36] jtcchan: has joined #RubyOnRails
[10:39:36] patarr: has joined #RubyOnRails
[10:39:52] pawnbox: has joined #RubyOnRails
[10:40:09] username: has joined #RubyOnRails
[10:42:05] _3dwardsharp: no, rails likely would not generate the next key (integer?) value itself
[10:44:31] w0bni: has joined #RubyOnRails
[10:46:27] dminuoso: _3dwardsharp: it likely does an INSERT INTO foos (ID) values (seq.nextval)
[10:46:33] dminuoso: except the logger hides this
[10:48:01] artto: has joined #RubyOnRails
[10:49:50] Rodya_: has joined #RubyOnRails
[10:53:45] Fernando-Basso: has joined #RubyOnRails
[11:06:43] ferr1: has joined #RubyOnRails
[11:09:03] arBmind: has joined #RubyOnRails
[11:13:02] Radar: has joined #RubyOnRails
[11:13:51] lightheaded: has joined #RubyOnRails
[11:15:15] zpe: has joined #RubyOnRails
[11:17:14] TvL2386: has joined #RubyOnRails
[11:20:40] bbrowning: has joined #RubyOnRails
[11:20:46] aajjbb: has joined #RubyOnRails
[11:21:23] blackmesa: has joined #RubyOnRails
[11:28:12] teddysmoker: has joined #RubyOnRails
[11:33:40] jtcchan: has joined #RubyOnRails
[11:34:34] ldnunes: has joined #RubyOnRails
[11:36:01] Jasaka: has joined #RubyOnRails
[11:37:14] artto: has joined #RubyOnRails
[11:38:23] marahin: has joined #RubyOnRails
[11:39:08] marahin: Hello. What am I doing wrong? https://gist.github.com/Marahin/33efcb2dee1387fc002bbb1d6f1ff1c2
[11:42:24] _3dwardsharp: .create will call .save itself, no need for you to call save
[11:43:03] dminuoso: marahin: Also try to avoid non-! methods with AR.
[11:43:22] quazimodo: has joined #RubyOnRails
[11:43:24] dminuoso: marahin: (Though in this case you shouldn't use save at all, but you should have used save! at the very least)
[11:43:45] marahin: _3dwardsharp yeah, that .save was from before, where I was trying to debug that
[11:44:33] marahin: Actually, pardon me, I managed to google and make it _work_ http://stackoverflow.com/a/12109098
[11:45:11] HoierM_: has joined #RubyOnRails
[11:46:57] _3dwardsharp: irc: we're here to make google'ing easy'r...
[11:47:24] artto: has joined #RubyOnRails
[11:50:52] zpe: has joined #RubyOnRails
[11:50:54] Rodya_: has joined #RubyOnRails
[11:53:15] bbrowning: has joined #RubyOnRails
[11:53:47] Pumukel: has joined #RubyOnRails
[11:55:00] tvw: has joined #RubyOnRails
[11:55:01] Schoolmeister: has joined #RubyOnRails
[11:55:21] zpe_: has joined #RubyOnRails
[11:58:41] pickle_: has joined #RubyOnRails
[11:59:47] Jameser: has joined #RubyOnRails
[11:59:50] zpe: has joined #RubyOnRails
[12:04:19] pickle__: has joined #RubyOnRails
[12:09:43] Jasaka: has joined #RubyOnRails
[12:10:48] nOwz: has joined #RubyOnRails
[12:19:37] cschneid_: has joined #RubyOnRails
[12:27:47] hahuang61: has joined #RubyOnRails
[12:28:01] jtcchan: has joined #RubyOnRails
[12:39:53] Jasaka|NA: has joined #RubyOnRails
[12:41:59] Schoolmeister: has joined #RubyOnRails
[12:43:01] brent__: has joined #RubyOnRails
[12:46:34] pawnbox: has joined #RubyOnRails
[12:47:19] doodlehaus: has joined #RubyOnRails
[12:47:38] mauro1254: has joined #RubyOnRails
[12:50:08] marahin: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[12:51:35] Rodya_: has joined #RubyOnRails
[12:51:40] Pumukel: has joined #RubyOnRails
[12:54:13] pawnbox: has joined #RubyOnRails
[12:54:32] echosystm: has joined #RubyOnRails
[12:54:49] echosystm: i need to use multiple ruby versions on my server, none of which are bundled with the distro
[12:55:01] echosystm: i want to use rbenv
[12:55:15] echosystm: however, there is only one shims directory
[12:55:26] kristofferR: has joined #RubyOnRails
[12:55:30] echosystm: does anyone know how i can have basically two shims directories - one for each ruby?
[12:57:04] echosystm: or should i just install an entire rbenv for each
[12:57:07] echosystm: seems like a waste
[13:01:47] FoolsGambit: has joined #RubyOnRails
[13:01:48] Technodrome: has joined #RubyOnRails
[13:02:17] jlebrech: i think if you have two rubies the first one it treated like you system ruby, so you only need one shims directory. but i could be wrong
[13:03:04] ramortegui: has joined #RubyOnRails
[13:04:13] blackmesa: has joined #RubyOnRails
[13:05:54] Jasaka|NA: has joined #RubyOnRails
[13:08:35] r3vDev: has joined #RubyOnRails
[13:09:52] pickle__: has joined #RubyOnRails
[13:12:12] nikivi: has joined #RubyOnRails
[13:13:52] armea: has joined #RubyOnRails
[13:14:21] artto: has joined #RubyOnRails
[13:14:31] armea: I have `@applications = [current_user.oauth_applications, current_user.applications]` in my controller. current user has 2 oauth apps and 7 applications. In my view I have <%= @applications.count %> but this returns 2. Why don't I get 9?
[13:14:45] GodFather: has joined #RubyOnRails
[13:16:05] fox_mulder_cp: open rails c(onsole) and try to execute code in it
[13:16:41] chouhoulis: has joined #RubyOnRails
[13:17:40] NoGodDamnIdea: has joined #RubyOnRails
[13:17:40] NoGodDamnIdea: has joined #RubyOnRails
[13:18:51] epochwolf: armea: you have an array containing two other arrays :)
[13:19:37] epochwolf: So the count is correct, there's 2 objects in that array. And those objects should be an array of 2 and an array of 7
[13:21:07] epochwolf: What you probably want is `@applications = [current_user.oauth_applications, current_user.applications].flatten` That'll collapse everything into 1 array containing all the items.
[13:21:24] pickle__: has joined #RubyOnRails
[13:21:44] epochwolf: Here's the documentation for Array#flatten: https://ruby-doc.org/core-2.2.0/Array.html#method-i-flatten
[13:21:47] armea: @epochwolf, thanks!
[13:22:13] jtcchan: has joined #RubyOnRails
[13:24:53] mitt3ns: has joined #RubyOnRails
[13:25:02] ebbflowgo: has joined #RubyOnRails
[13:25:30] Flwyd: has joined #RubyOnRails
[13:25:54] pickle__: has joined #RubyOnRails
[13:26:22] davedo321: has joined #RubyOnRails
[13:26:26] Flwydity: has joined #RubyOnRails
[13:27:55] Rodya_: has joined #RubyOnRails
[13:31:33] tbuehlmann: when having a postgres json column ("settings"), setting it via project.update(params.require(:project).permit(:settings)) results in it saving a string like `"{\"foo\":\"bar\"}"`, not an actual object. any goto way I'm missing besides defining a settings=(value) method calling something like super(JSON.parse(value)) (or using the attributes api)?
[13:31:51] DLSteve_: has joined #RubyOnRails
[13:32:06] epochwolf: tbuehlmann: are you sending json in the param?
[13:32:58] netzfisch: has joined #RubyOnRails
[13:33:04] Duckily: has joined #RubyOnRails
[13:33:35] rubyonrailed: has joined #RubyOnRails
[13:35:18] fox_mulder_cp: tbuehlmann: some like model.update( json_field[:json_field_here] = 'ddd' )
[13:35:44] fox_mulder_cp: and access it via model.json[:key]
[13:37:22] chouhoulis: has joined #RubyOnRails
[13:38:48] apotry: has joined #RubyOnRails
[13:39:25] ReBa_: has joined #RubyOnRails
[13:41:15] tbuehlmann: epochwolf: good point, I think I don't. let me try
[13:42:58] tbuehlmann: yeah, that's it, sending a raw JSON body works
[13:43:24] epochwolf: tbuehlmann: Yeah, it was getting converted twice.
[13:43:52] epochwolf: The problem is if you dump a String containing JSON into that setter, it just saves a String. :/
[13:44:20] epochwolf: It expects it to be ruby objects and will then serialize to json when saving.
[13:44:41] epochwolf: Doing a raw json body causes the middleware to parse the json. :)
[13:45:59] tbuehlmann: yeah, thanks
[13:46:22] rubyonrailed: has joined #RubyOnRails
[13:46:45] epochwolf: ACTION takes a bow, trips, and falls into the orchestra pit
[13:47:54] tbuehlmann: and now.. this: https://github.com/rails/rails/issues/9454 :\
[13:47:56] dminuoso: 14:43 < epochwolf> The problem is if you dump a String containing JSON into that setter, it just saves a String. :/
[13:48:20] dminuoso: That's because it's still a valid JSON primitive.
[13:48:51] epochwolf: dminuoso: correct
[13:48:53] Jasaka|NA: has joined #RubyOnRails
[13:48:57] dminuoso: tbuehlmann: Rails used to do this differently until a while ago.
[13:49:08] dminuoso: Which was highly inconsistent.
[13:49:20] centrx: has joined #RubyOnRails
[13:49:20] centrx: has joined #RubyOnRails
[13:49:30] tbuehlmann: I really could take a string instead of an object and JSON.parse it, so I can still use permit(:setting)
[13:49:46] quazimodo: has joined #RubyOnRails
[13:49:49] tbuehlmann: maybe there's a clever comment in that issue
[13:50:03] epochwolf: ACTION pets tbuehlmann 
[13:50:13] epochwolf: It'll be okay.
[13:51:02] tbuehlmann: hm! https://github.com/rails/strong_parameters/pull/231/files
[13:51:22] dminuoso: strong params has become pretty annoying :(
[13:51:35] dminuoso: but luckily there's to_unsafe_h
[13:51:58] tbuehlmann: dminuoso: https://github.com/tbuehlmann/lappen/blob/441cc2eb2d4916117e2a3dbbc36d8edd37d13db1/lib/lappen/performer.rb#L18 :o
[13:52:21] tbuehlmann: I like strong_params, it's good enough for 95% of the things
[13:52:33] dminuoso: tbuehlmann: I like 50% of that line :P
[13:52:42] dminuoso: The other 50% I hate.
[13:53:30] tbuehlmann: https://www.youtube.com/watch?v=pjvQFtlNQ-M
[13:53:37] epochwolf: I actually found a nice solution. I've been playing around with reform and it removes the need for strong parameters since you specify all the fields.
[13:54:01] epochwolf: Though having a form object is kind of a heavy solution
[13:54:37] tbuehlmann: how does it solve it? by just not having writes for the unwanted attributes?
[13:55:21] dminuoso: tbuehlmann: Ive started to develop a lot of cases where I dont use AR mass assignment in the first place.
[13:55:50] dminuoso: Though .require/.permit is still nice for debugging purposes.
[13:55:55] pickle__: has joined #RubyOnRails
[13:56:40] jsrn_: has joined #RubyOnRails
[13:56:53] fox_mulder_cp: 198 commits in rails api app
[13:57:11] tbuehlmann: oh, there'll be .permit(settings: {}) in 5.1 - time to try that v5.1.0.beta1 :)
[13:57:34] fidelipoo: has joined #RubyOnRails
[13:58:00] epochwolf: tbuehlmann: In reform, you specify all the fields for the form. It extracts and parses the parameters into those fields. No more unsafe parameters.
[13:58:57] tbuehlmann: you somehow initialize the form object. if there are more attributes than wanted, they are just not used, right?
[13:59:12] ReBa_: How can you create dynamic items in a xml file based on an array? https://gist.github.com/RemiBa/0a35a7673a9fcf9f044f17901df33221
[13:59:44] epochwolf: @order_form = OrderForm.new(Order.new); @order_form.validate(params[:order]); @order_form.save!
[14:00:09] tbuehlmann: epochwolf: not so sure about the problem being solved by that
[14:00:11] epochwolf: ReBa_: xml.send(key, value)
[14:00:19] harfangk: has joined #RubyOnRails
[14:00:26] epochwolf: tbuehlmann: The form not matching the underlaying objects. :)
[14:00:43] epochwolf: Or wanting to seperate form validation from record validation.
[14:01:20] epochwolf: In my case, I've got a lot of pricing bullshit that I'm shoving into OrderForm instead of Order.
[14:01:28] pickle__: has joined #RubyOnRails
[14:01:55] ReBa_: epochwolf: Thank you for the tip, but I get <send>01010101Inspection010101</send>
[14:02:16] epochwolf: ReBa_: what output did you want?
[14:04:31] blackmesa: has joined #RubyOnRails
[14:05:09] epochwolf: ReBa_: replace send with tag!
[14:05:21] artto: has joined #RubyOnRails
[14:05:35] ReBa_: epochwolf: So that would becoome: xml.tag(key, value)
[14:05:57] ReBa_: epochwolf: Sorry (I thought you were being enthousiastic :P)
[14:06:28] invalidusrname: has joined #RubyOnRails
[14:06:44] ReBa_: epochwolf: But seems to work perfectly! :)
[14:06:52] ReBa_: Thank you!
[14:06:56] epochwolf: You're welcome.
[14:07:18] alex88: has joined #RubyOnRails
[14:07:55] Mohan: has joined #RubyOnRails
[14:09:22] Guest98708: rails production site puma not picking up changes. production log, throw an error for a method which i have removed. Server spec: nginx, puma
[14:11:42] tbuehlmann: Guest98708: have you just changed the code without restarting the server?
[14:14:32] Guest98708: i have deploying via capistrano which eventually restarting the reserver
[14:15:11] epochwolf: Guest98708: did you verify new code was on disk and manually restart puma?
[14:15:54] Guest98708: production has lastest code in server. restart from local with cap production puma:restart
[14:16:17] jtcchan: has joined #RubyOnRails
[14:16:56] eclecticjohny: has joined #RubyOnRails
[14:17:48] epochwolf: Guest98708: how did you verify you had the latest code?
[14:20:04] Guest98708: epochwolf: after loggin to production, cd to "current" folder and then found the files are with latest changes. but production log shows error on code which is not in server
[14:20:35] Jameser: has joined #RubyOnRails
[14:21:15] epochwolf: Does puma:restart just signal the process or does it actually to stop, start?
[14:21:39] envint: has joined #RubyOnRails
[14:22:23] envint: has left #RubyOnRails: ()
[14:23:33] Derperperd: has joined #RubyOnRails
[14:23:58] Guest98708: epochwolf: Command: cd /var/www/mysite/current && ( export RACK_ENV="production" ; /usr/bin/env bundle exec pumactl -S /var/www/mysite/shared/tmp/pids/puma.state restart ) DEBUG [41c7d071] Command restart sent success
[14:25:28] epochwolf: Guest98708: I honestly don't know. My next step is usually nuking all the puma processes and their pid files and starting everything back up clean.
[14:26:45] epochwolf: I don't work on high availablity systems so I tend to stick to the brute force approach. (And honestly, any HA system, you'd just take a server out of rotation and hit it with a wrench or rebuild it)
[14:27:02] tenderlove: has joined #RubyOnRails
[14:28:10] Guest98708: epochwolf: thats fine. thanks for your support & directions. i am lost at it for 2 hr or so. let me try to kill puma process and start back. i guess that what you mean.
[14:28:43] hahuang61: has joined #RubyOnRails
[14:29:21] epochwolf: That's generally the first thing I do if things aren't behaving after a deploy. I'd verify all commands run, double checking for deploying to the wrong server, etc.
[14:30:01] workmad3: has joined #RubyOnRails
[14:30:19] Jasaka: has joined #RubyOnRails
[14:30:42] epochwolf: If the code is actually there, attempt restart. If that doesn't fix, kill the application servers manually using ps and kill, then clear out pid files and start the app servers back up.
[14:31:04] Guest98708: epochwolf: okay. actually codes are moving to the right server but seems puma is not picking. thanks for point it out. i was hesitating from killing the process directly in the server.
[14:31:30] Guest98708: epochwolf: will try the same
[14:31:36] DoubleMalt: has joined #RubyOnRails
[14:31:37] epochwolf: Guest98708: if that doesn't work, I'd start checking that everything is pointing to the same folders. :)
[14:32:08] epochwolf: If that fails, assume code didn't actually get deployed OR fix didn't work and uncovered a bug in prod.
[14:32:42] epochwolf: Oh, and always verify you're working on the correct server at every step. :)
[14:33:25] epochwolf: 99% of the time, it's a single detail. Lots of little steps that can go wrong.
[14:33:51] epochwolf: So step back, take a deep breath, maybe get coffee, and troubleshoot from step 1.
[14:34:17] patarr: has joined #RubyOnRails
[14:35:01] blackmesa: has joined #RubyOnRails
[14:35:32] lightheaded: has joined #RubyOnRails
[14:35:34] Guest98708: epochwolf: thank you friend, those words help to regain the focus :) i was banging my head. definetely need a cup of coffee.
[14:37:29] agent_white: Mornin' folks
[14:38:14] epochwolf: Guest98708: good luck. I'll be back in about an hour.
[14:42:14] keegnotrub: has joined #RubyOnRails
[14:42:50] pickle_: has joined #RubyOnRails
[14:43:12] Rodya__: has joined #RubyOnRails
[14:49:53] cschneid_: has joined #RubyOnRails
[14:53:37] envint: has joined #RubyOnRails
[14:55:05] spicerack: has joined #RubyOnRails
[14:59:28] Jasaka|NA: has joined #RubyOnRails
[14:59:55] doodlehaus: has joined #RubyOnRails
[15:01:26] iamayam: has joined #RubyOnRails
[15:02:09] kitsuneyo: has joined #RubyOnRails
[15:03:31] lizard2010: has joined #RubyOnRails
[15:03:31] shinnya: has joined #RubyOnRails
[15:08:24] shamrock: has joined #RubyOnRails
[15:08:36] Pumukel: has joined #RubyOnRails
[15:10:06] envint: has joined #RubyOnRails
[15:10:10] patarr1: has joined #RubyOnRails
[15:10:13] pawnbox: has joined #RubyOnRails
[15:10:31] jtcchan: has joined #RubyOnRails
[15:11:14] doodleha_: has joined #RubyOnRails
[15:13:43] raphaelmro: has joined #RubyOnRails
[15:15:24] artto: has joined #RubyOnRails
[15:16:58] iamayam: has joined #RubyOnRails
[15:20:57] naprimer_3: has joined #RubyOnRails
[15:24:23] mostlybadfly: has joined #RubyOnRails
[15:25:45] brent__: has joined #RubyOnRails
[15:27:43] lxsameer: has joined #RubyOnRails
[15:29:10] roadrunneratwast: has joined #RubyOnRails
[15:30:34] raul782: has joined #RubyOnRails
[15:30:37] roadrunneratwast: Hi all I am here in the tutorial https://www.railstutorial.org/book/filling_in_the_layout#code-layout_links_test_signup_full_title_helper and am getting the message that "undefined local variable or method `root_path' for SiteLayoutTest:Class(NameError)"
[15:31:13] raul782: Hey guys is there a gem that successfully audits many to many relationships?
[15:31:47] Jasaka: has joined #RubyOnRails
[15:31:53] roadrunneratwast: Actually I am here https://www.railstutorial.org/book/filling_in_the_layout#code-layout_links_test and getting the error
[15:31:54] raul782: I've tried audited, papertrail and all have that limitation
[15:33:10] raul782: When we tried to audit habtm or m2m they fail miserably, in audited I had to do some custom setup to try to cope with that, but it's not a scalable solution
[15:35:29] envint: has joined #RubyOnRails
[15:41:55] jstrong: has joined #RubyOnRails
[15:42:10] jstrong: Hey all, what’s the recommended rails app server for local dev work?
[15:42:22] jstrong: e.g. would you use thin / puma over the default of webrick?
[15:42:34] centrx: jstrong: webrick is fine
[15:42:35] epochwolf: Doesn't Rails 5 default to puma in development?
[15:42:36] jstrong: we’ve got a pretty huge RoR app that runs pretty slow in development and looking to speed up page loads on local machine.
[15:42:43] jstrong: epochwolf: maybe. using rails4
[15:43:09] epochwolf: jstrong: hmm... I'd try puma.
[15:43:15] jstrong: will give a shot
[15:43:44] centrx: jstrong: thin is a good alternative -- easy and fast -- but the slowness might be due to uncached pages/queries in dev, not the web server itself
[15:44:00] Cork: is there a way to get activeModel to NOT titelize the field name when it generates error messages?
[15:44:15] jstrong: centrx: Yeah, probably. But looking for quick wins if possible.
[15:44:43] jstrong: At some point need to take a deeper dive into how rails autoloads and have better configurations for lighter autoloads to speed up things like rake db:migrate
[15:45:12] jstrong: Cork: gist and I can help you
[15:45:17] jstrong: show us your model and validation configuration.
[15:45:33] username1: has joined #RubyOnRails
[15:45:33] jstrong: you can change the names of keys used for validation messages both in ActiveModel and through a locales file.
[15:45:58] Cork: jstrong: just found it, the error was for the relation not the _id field and i didn't have a translation for that
[15:47:22] jstrong: Puma definitely seems to be faster, nice.
[15:49:04] Jasaka: has joined #RubyOnRails
[15:50:31] dopamean_: has joined #RubyOnRails
[15:52:50] kinduff: has joined #RubyOnRails
[15:53:08] ReBa_: has joined #RubyOnRails
[15:54:06] Schoolmeister: has joined #RubyOnRails
[15:55:06] ReBa_: If you use render_to_string, and afterwards uses a redirect, does Rails generates a DoubleRenderError?
[15:55:50] gloscombe: has joined #RubyOnRails
[15:56:46] [Butch]: has joined #RubyOnRails
[16:01:21] Duckily: has joined #RubyOnRails
[16:02:42] envint: has joined #RubyOnRails
[16:03:28] Duckily: has joined #RubyOnRails
[16:04:21] beingjohnm_: anybody use the Griddler gem? Would love to ask a couple questions about implementing it.
[16:04:41] jtcchan: has joined #RubyOnRails
[16:06:04] silverdust: has joined #RubyOnRails
[16:06:24] jsrn_: has joined #RubyOnRails
[16:08:53] epochwolf: ReBa_: try it?
[16:10:50] pLaTo0n: has joined #RubyOnRails
[16:12:51] pawnbox: has joined #RubyOnRails
[16:13:07] ReBa_: yeah... it generates the DoubleRenderError :s
[16:14:07] ReBa_: Because I want to add save 2 files (xml & xlsx) to a zip file
[16:14:28] epochwolf: ReBa_: you can use the xml builder without rendering.
[16:15:10] ReBa_: So you wouldn't use export.xml.builder as view, but instead a render action?
[16:15:18] ReBa_: They need to be downloadable seperately too
[16:15:28] epochwolf: No... you can put the builder in a class somewhere.
[16:15:48] polishdub: has joined #RubyOnRails
[16:16:06] nickjj: has joined #RubyOnRails
[16:16:09] ReBa_: For example, you would put it in a model?
[16:16:22] epochwolf: I'd generally make it it's own class.
[16:16:41] ReBa_: Ow! Never done that before! :o
[16:16:44] ReBa_: Time to learn something new!
[16:17:27] gusrub: has joined #RubyOnRails
[16:19:57] ReBa_: epochwolf: Do you have an example / tutorial, or a documentation page which I can use to learn?
[16:20:51] ReBa_: Thank you
[16:21:08] pLaTo0n: has joined #RubyOnRails
[16:21:47] rafaeldelucena: has joined #RubyOnRails
[16:21:54] kitsuneyo: i put a hash of default test attributes in a method inside a controller tests file: https://gist.github.com/kitsuneyo/6f78343c385b8f59e12995c4d200b502 ... is it possible to refer to its individual values in my tests? i tried `default_attrs['key']` and `default_attrs.key`
[16:22:03] pawnbox: has joined #RubyOnRails
[16:23:35] artto: has joined #RubyOnRails
[16:23:42] epochwolf: ReBa_: ruby uses the builder gem, getting the details now.
[16:25:08] patarr: has joined #RubyOnRails
[16:27:14] Technodrome: has joined #RubyOnRails
[16:27:26] ReBa_: epochwolf: I'm already using the builder gem, my file is named export.xml.builder
[16:27:34] ReBa_: So that's a plus, I guess?
[16:29:20] rubyonrailed: has joined #RubyOnRails
[16:29:23] epochwolf: ReBa_: https://github.com/jimweirich/builder
[16:29:32] hahuang61: has joined #RubyOnRails
[16:31:39] ReBa_: epochwolf: https://gist.github.com/RemiBa/8faed45b8f994eb0832677549e798d70
[16:31:48] ReBa_: that's what I have now
[16:31:56] ReBa_: but it's situated inside a view
[16:32:51] ReBa_: So you would create a seperate class for it?
[16:33:08] ReBa_: With probably exactly the same (reusable) code
[16:33:11] epochwolf: ReBa_: yeah, all you need to do is put xml = Builder::XmlMarkup.new at the top and xml.target! at the bottom.
[16:33:21] epochwolf: And then you can put that anywhere.
[16:33:28] ReBa_: And where do you put that file?
[16:33:43] epochwolf: Anywhere you'd like. lib/ maybe?
[16:34:09] jokke: has left #RubyOnRails: ("WeeChat 1.7")
[16:36:46] Pumukel: has joined #RubyOnRails
[16:37:11] ReBa_: epochwolf: Thank you for the tips & superhelp!! :)
[16:37:31] roadrunneratwast: has joined #RubyOnRails
[16:37:44] GodFather: has joined #RubyOnRails
[16:39:36] teddysmoker: has joined #RubyOnRails
[16:40:13] workmad3_: has joined #RubyOnRails
[16:41:50] GodFather_: has joined #RubyOnRails
[16:42:20] GodFather__: has joined #RubyOnRails
[16:49:55] Derperperd: has joined #RubyOnRails
[16:50:14] hahuang61: has joined #RubyOnRails
[16:53:44] Rodya_: has joined #RubyOnRails
[16:55:07] umdstu: has joined #RubyOnRails
[16:55:30] umdstu: is it possible to call a java jar with option to get a result back from in my rails app
[16:57:25] centrx: umdstu: You can execute things on the command-line with exec() or system() or backticks, etc.
[16:57:43] centrx: be careful with that though, e.g. don't pass unsanitized parameters to it
[16:58:06] centrx: use a delayed job
[16:58:09] keegnotrub: has joined #RubyOnRails
[16:58:10] centrx: pass data in the DB
[16:58:12] umdstu: centrx: i tried that but i dont get anything back or errors
[16:58:26] pLaTo0n: has joined #RubyOnRails
[16:59:03] jtcchan: has joined #RubyOnRails
[16:59:42] Jasaka|NA: has joined #RubyOnRails
[17:02:36] kinduff: has joined #RubyOnRails
[17:02:40] keerthana: has joined #RubyOnRails
[17:03:22] [Butch]: has joined #RubyOnRails
[17:05:02] baweaver: umdstu: the easier way is to have the JAR expose a REST API because JVM startup time will stall Rails for a bit.
[17:05:18] baweaver: Treat it like a separate service
[17:06:16] epochwolf: Or you can run jruby and pull in the jar as a library.
[17:06:54] epochwolf: I've used jruby for itext a number of times.
[17:07:03] roadrunneratwast: has left #RubyOnRails: ()
[17:08:19] envint: has joined #RubyOnRails
[17:08:40] baweaver: epochwolf: Is porting an entire app to JRuby non-trivial?
[17:08:49] baweaver: or do you just mean run it in the background?
[17:09:09] epochwolf: baweaver: not for development.
[17:09:41] baweaver: I seem to remember having a lot of fun fighting guard and other tools when I did.
[17:09:54] epochwolf: baweaver: ah, I disabled that.
[17:10:14] baweaver: Rather avant guard of you, no?
[17:10:51] epochwolf: ACTION groans
[17:13:10] patarr: has joined #RubyOnRails
[17:13:20] TAiS46: has joined #RubyOnRails
[17:15:29] Jasaka: has joined #RubyOnRails
[17:16:53] TAiS46: hi there, I am trying to generate a link: <%= link_to 'Add Keys', controller: 'keys', action: 'new', id: key_group %> the result is /key/new?id=1 ... shouldn't it be /key/new/1 ? How can I create a link linke this?
[17:17:48] epochwolf: TAiS46: Does `rake routes` have a route for /key/new/:id ?
[17:17:59] envint: has joined #RubyOnRails
[17:19:48] TAiS46: epochwolf: now it has :) Thank you
[17:20:16] blackmesa: has joined #RubyOnRails
[17:23:16] rubyonrailed: has joined #RubyOnRails
[17:24:15] Rodya_: has joined #RubyOnRails
[17:24:52] Jasaka: has joined #RubyOnRails
[17:25:15] TAiS46: has joined #RubyOnRails
[17:26:22] szulak_: has joined #RubyOnRails
[17:26:23] cnk: has joined #RubyOnRails
[17:32:00] SteenJobs: has joined #RubyOnRails
[17:34:01] envint: has joined #RubyOnRails
[17:35:34] envint: has joined #RubyOnRails
[17:36:38] chouhoulis: has joined #RubyOnRails
[17:38:54] Pumukel: has joined #RubyOnRails
[17:44:19] envint: has joined #RubyOnRails
[17:44:26] patarr: has joined #RubyOnRails
[17:57:34] xangria: has joined #RubyOnRails
[17:58:32] xangria: Hello guys, i have a job offer to make a market place but i'm not sure how much I should charge. Can someone with previous experience help me please
[17:58:49] xangria: Ps: the design is already done so I won't need to worry about that
[17:59:06] gusrub: has joined #RubyOnRails
[18:00:01] _djbkd: has joined #RubyOnRails
[18:00:04] cnk: UI design or data design? And has the payment processor been chosen?
[18:01:10] xangria: The graphical design is done and we're using stripe
[18:01:54] xangria: i'll need to scrape 2 sites and use like 4 API's if that's any help
[18:02:13] yamzalal: has joined #RubyOnRails
[18:03:27] rgtk: has joined #RubyOnRails
[18:03:42] cnk: I don't have a number to suggest to you. Just a process of estimate as small pieces as you can manage. Add up that number, then double it
[18:04:10] xangria: i like the "double it" part ahahaa
[18:06:45] yamzalal: epochwolf: Finally i was able to fix the error. Though i have removed the method which caused the error, somehow the same method was used somewhere else. Finally figured out there was issue in user session table (due to wrong code commit one of the developers) which throws error message. Thanks your wonderful words & support.
[18:07:24] FLeiXiuS: has joined #RubyOnRails
[18:07:24] FLeiXiuS: has joined #RubyOnRails
[18:07:27] cnk: Largely bidding work is in part "who assumes the risk" - fixed price, you assume the risk; hourly, its all on the customer. So some combination - write out scope and a price range and then see
[18:08:05] yamzalal: epochwolf: the issue has nothing to do with puma. May be i should sharpen my skills to figure out run time errors.
[18:08:19] baweaver: and there are no rules against posting jobs on here as long as you're not spamming it every hour Xangria
[18:08:41] baweaver: So if you get it up on a freelancer site with more details feel free to post away
[18:10:37] Jasaka|NA: has joined #RubyOnRails
[18:14:56] Jasaka|NA: has joined #RubyOnRails
[18:15:53] AmiMoench: has joined #RubyOnRails
[18:16:10] SteenJobs: has joined #RubyOnRails
[18:17:33] arBmind: has joined #RubyOnRails
[18:27:36] nOwz: has joined #RubyOnRails
[18:28:35] blackmesa: has joined #RubyOnRails
[18:29:33] Jasaka: has joined #RubyOnRails
[18:36:16] kinduff: has joined #RubyOnRails
[18:41:31] w0bni: has joined #RubyOnRails
[18:43:03] chouhoulis: has joined #RubyOnRails
[18:43:28] pLaTo0n: has joined #RubyOnRails
[18:43:47] envint: has joined #RubyOnRails
[18:55:29] envint: has joined #RubyOnRails
[18:56:29] patarr: has joined #RubyOnRails
[18:58:46] dionysus69: has joined #RubyOnRails
[19:00:28] IRCFrEAK: has joined #RubyOnRails
[19:03:06] jordansz: has joined #RubyOnRails
[19:03:56] jordansz: hi everyone im hoping someone can help me out with https://gist.github.com/jordanlance/d42fad6bdaea93fed1c9b2ad2f84770f
[19:04:05] jordansz: how could i return a named route in this method? i cant get it done
[19:04:56] jordansz: this rturns a invalid method error
[19:05:13] jordansz: its really uneasy to have these hardcoded as string i want it to use a named route
[19:05:26] USvER: has joined #RubyOnRails
[19:08:32] epochwolf: jordansz: you mispelled wizard.
[19:08:50] jordansz: i know i do this all the time ;)"
[19:09:50] Cohedrin: has joined #RubyOnRails
[19:10:08] jenrzzz: has joined #RubyOnRails
[19:10:08] jenrzzz: has joined #RubyOnRails
[19:14:14] envint: has joined #RubyOnRails
[19:16:36] IRCFrEAK: has joined #RubyOnRails
[19:19:17] spicerack: has joined #RubyOnRails
[19:20:43] chouhoulis: has joined #RubyOnRails
[19:20:54] doodlehaus: has joined #RubyOnRails
[19:21:16] IRCFrEAK: has joined #RubyOnRails
[19:23:45] blackmesa: has joined #RubyOnRails
[19:26:04] pLaTo0n: has joined #RubyOnRails
[19:27:12] gambl0re: has joined #RubyOnRails
[19:33:08] Technodrome: has joined #RubyOnRails
[19:33:53] Jasaka|NA: has joined #RubyOnRails
[19:37:29] Pumukel: has joined #RubyOnRails
[19:38:21] nertzy: has joined #RubyOnRails
[19:38:45] envint: has joined #RubyOnRails
[19:44:03] envint: has joined #RubyOnRails
[19:44:32] doodlehaus: has joined #RubyOnRails
[19:44:58] Jasaka|NA: has joined #RubyOnRails
[19:45:15] pulkit4tech: has joined #RubyOnRails
[19:47:57] tvw: has joined #RubyOnRails
[19:50:31] envint: has joined #RubyOnRails
[19:51:17] Rodya_: has joined #RubyOnRails
[19:55:46] knight33: has joined #RubyOnRails
[19:59:18] chouhoulis: has joined #RubyOnRails
[20:06:33] username1: has joined #RubyOnRails
[20:08:11] Jasaka|NA: has joined #RubyOnRails
[20:10:31] IRCFrEAK: has joined #RubyOnRails
[20:11:34] FCser: has joined #RubyOnRails
[20:12:38] passion8: has joined #RubyOnRails
[20:15:06] Aherin: has joined #RubyOnRails
[20:16:53] artto: has joined #RubyOnRails
[20:19:39] passion8: has joined #RubyOnRails
[20:23:20] blackmesa: has joined #RubyOnRails
[20:24:44] Paari: has joined #RubyOnRails
[20:27:23] ahrs: has joined #RubyOnRails
[20:29:46] ahrs: has joined #RubyOnRails
[20:29:56] Paari: has left #RubyOnRails: ()
[20:30:57] IRCFrEAK: has joined #RubyOnRails
[20:32:22] Paari: has joined #RubyOnRails
[20:32:35] Paari: anyone here ?
[20:35:44] Paari: i am not sure this question fits here, but i want to know if there is any thing available which allow me to create/append text file from outside.
[20:36:57] baweaver: define "outside"
[20:37:15] dminuoso: fox_mulder_cp: say are you using typescript?
[20:37:56] dminuoso: The one thing I hate is how typescript makes life hard with immutable.js :(
[20:38:47] eforbes: has joined #RubyOnRails
[20:39:52] srinidhi: has joined #RubyOnRails
[20:41:50] brendan6: has joined #RubyOnRails
[20:42:24] Paari: earlier, we only have 1 server in which 1 sidekiq worker writes log in 1 file. i display that file into the browser. since the sidekiq process writes/appends continuously, that file in browser looks like streaming the logs. Now to meet the growing demand, we have few dedicated servers for sidekiq. I want to have same functionality with this dedicated servers too, like if i some sidekiq process write the file, i can show it without any
[20:43:10] Paari: any idea how to solve tackle problem ?
[20:43:44] baweaver: https://github.com/dwbutler/logstash-logger - just use logstash
[20:44:08] IRCFrEAK: has joined #RubyOnRails
[20:45:47] jenrzzz: has joined #RubyOnRails
[20:45:47] jenrzzz: has joined #RubyOnRails
[20:48:30] Derperperd: has joined #RubyOnRails
[20:49:11] IRCFrEAK: has joined #RubyOnRails
[20:49:45] agent_white: has joined #RubyOnRails
[20:51:13] chouhoulis: has joined #RubyOnRails
[20:52:13] blackmesa: has joined #RubyOnRails
[20:53:50] lightheaded: has joined #RubyOnRails
[21:00:11] alanquillin: has joined #RubyOnRails
[21:00:24] Rodya_: has joined #RubyOnRails
[21:01:14] brendan6: has joined #RubyOnRails
[21:08:56] givemeparttt2000: has joined #RubyOnRails
[21:08:58] givemeparttt2000: has left #RubyOnRails: ()
[21:14:14] d0nn1e: has joined #RubyOnRails
[21:16:34] apotry: has joined #RubyOnRails
[21:19:13] kitsuneyo: has joined #RubyOnRails
[21:20:32] givemeparttt2000: has joined #RubyOnRails
[21:20:34] givemeparttt2000: has left #RubyOnRails: ()
[21:20:56] envint: has joined #RubyOnRails
[21:25:03] Jasaka|NA: has joined #RubyOnRails
[21:25:37] pLaTo0n: has joined #RubyOnRails
[21:28:41] ResidentBiscuit: has joined #RubyOnRails
[21:28:54] Paari: We have few processes which create logs, say P1, P2 and P3 process create debug-p1.log , debug-p2.log and debug-p3.log respectively.
[21:28:54] Paari: As now, this processes are crashing the server as it is getting bigger and bigger, so we have 1 big server which send this processes into external server and allow it to complete into that server i.e now P1 can either goes to in server-1 or server-2 or server-3.
[21:28:55] Paari: As you see, we can't rely the process execution location but we need its process log. We are thinking to have 1 centralized server which allow us to create and write/append the log. Also, that file is accessible to us from any server.
[21:28:56] Paari: Any idea how can i ?
[21:28:57] Paari: PS: As this seems to be most common thing, i prefer not to create just API-service which accepts filename and content.
[21:33:38] username2: has joined #RubyOnRails
[21:33:46] username2: is it preferred to use xhr() or get/put/post/patch/delete with :xhr option specified for integration tests?
[21:34:06] username2: apidock seems to differ from the rails docs
[21:39:08] cnk: check versions apidock is 4.2, rails docs probably 5
[21:39:44] szulak: has joined #RubyOnRails
[21:41:01] username2: cnk: yeah, you're right
[21:42:31] rubyonrailed: has joined #RubyOnRails
[21:44:06] blackmesa: has joined #RubyOnRails
[21:44:53] Jasaka: has joined #RubyOnRails
[21:45:28] username2: does rails infer the @controller variable from the Class name for integration tests?
[21:46:02] username2: e.g. SampleControllerTest < ActionController:TestCase automatically sets @controller to sample_controller?
[21:46:13] username2: or an instance of SampleController
[21:48:11] rafaeldelucena: has joined #RubyOnRails
[21:49:27] cnk: one easy cheat is to generate a scaffold and see what files are created for you - and how they are hooked up
[21:49:49] username2: cnk: much appreciated
[21:55:31] _djbkd: has joined #RubyOnRails
[21:57:36] brendan6: has joined #RubyOnRails
[22:02:38] Rodya_: has joined #RubyOnRails
[22:05:27] _3dwardsharp: has joined #RubyOnRails
[22:25:46] jtcchan: has joined #RubyOnRails
[22:32:07] matthewd: has joined #RubyOnRails
[22:37:52] FoolsGambit: has joined #RubyOnRails
[22:42:35] Pumukel: has joined #RubyOnRails
[22:42:42] kitsuneyo: has joined #RubyOnRails
[22:48:45] matthewd_: has joined #RubyOnRails
[22:49:31] d5sx43: has joined #RubyOnRails
[22:53:28] jhack: has joined #RubyOnRails
[22:53:28] jhack: has joined #RubyOnRails
[23:01:58] Schoolmeister: has joined #RubyOnRails
[23:09:54] Or1on: has joined #RubyOnRails
[23:16:20] daemonwrangler: has joined #RubyOnRails
[23:24:39] GodFather__: has joined #RubyOnRails
[23:32:11] Duckily: has joined #RubyOnRails
[23:47:23] spicerack: has joined #RubyOnRails
[23:51:31] kitsuneyo: has joined #RubyOnRails
[23:55:19] glasz: folks, how do i write controller tests which work on all major versions of rails since and including 3.2?
[23:58:01] amperry: has joined #RubyOnRails