mustmodify

Activity Graph

Page 1 of 12 | Next »

2019-05-16

[14:15:41] mustmodify: has joined #ruby
[14:16:42] mustmodify: Ever since the whole "Open SSL has a bug!" vulnerability, I haven't been able to install rubies using ruby-install. I need to install 2.2.10 and am wondering if anyone can help me understand what dependencies I need installed on Ubuntu?
[14:18:57] mustmodify: I just need to get this app running first, but I acknowledge and agree.
[14:21:04] mustmodify: OK, I'll check it out. Thanks.
[15:07:06] mustmodify: has left #ruby: ()

2019-03-06

[15:34:15] mustmodify: has joined #ruby
[15:35:03] mustmodify: How do I represent this character in ruby, so that I can use gsub to remove it? https://www.fileformat.info/info/unicode/char/200b/index.htm
[15:35:53] mustmodify: current guess is "\u200B"
[15:36:03] mustmodify: great thanks
[15:36:20] mustmodify: zero-width space is the dumbest character I've ever considered considering.
[15:42:56] mustmodify: I'm sometimes frustrated by people who figure that because JS is available in all browsers, it must be the superior language for back-ends.
[15:43:11] mustmodify: I mean, it's an option, but to rule out other options because of wide availability... hm...
[17:01:37] mustmodify: has left #ruby: ()

2019-02-21

[20:52:33] mustmodify: has joined #ruby
[20:53:09] mustmodify: So I'm getting "OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol". I have libssl-dev installed on Ubuntu 18 so I would have thought it had the latest ...
[20:53:24] mustmodify: Should I try to compile something newer? Or am I on the wrong track?
[20:56:35] mustmodify: Yep, that got me, too.
[20:59:24] mustmodify: Does anyone know the actual ssl packages required to install 2.3.x? Seems like whatever they are, I don't have it.
[21:16:52] mustmodify: Wow, after really struggling with that, I'm finally seeing it install ruby 2.3.8!
[21:19:34] mustmodify: that's no fun
[21:19:59] mustmodify: has left #ruby: ()
[21:19:59] mustmodify: Turns out if you post to port 80 with SSL, the server doesn't take it very well.

2019-01-04

[22:09:22] mustmodify: has joined #ruby
[22:09:26] mustmodify: I'm having brain problems.
[22:10:01] mustmodify: I want an iterator that provides the n and the n+1st elements of an array
[22:10:09] mustmodify: is that a thing? I guess I could write one...
[22:12:05] mustmodify: havenwood: Oh blah, I was just writing it. Spoil my fun!
[22:12:10] mustmodify: thanks I'll check it out.
[22:12:46] mustmodify: havenwood: Hunh. I would never have found that. Thanks.
[22:12:56] mustmodify: has left #ruby: ()

2018-12-20

[15:50:41] mustmodify: has joined #RubyOnRails
[15:54:00] mustmodify: Good morning. I'm having an issue in production affecting 50 - 100 full time users. The Rails site I maintain runs in production for months without issues (but with frequent deploys.) Last night I restarted the server after changing a MySQL config. (Yes, that wasn't strictly necessary.) Site continued to run until 10am eastern. Then it 504'd all requests. Process was still running. I killed it. It restarted. 10 minutes later
[15:54:27] mustmodify: Nothing interesting in /production.log or the upstart log.
[15:55:03] mustmodify: So at this point I'm looking for dots to try to connect. Any thoughts?
[18:56:51] mustmodify: Quit: Page closed

2018-10-29

[18:41:39] mustmodify: has joined #ruby
[18:42:07] mustmodify: How do I figure out which characters are represented by \xE2\x80\x90def ?
[18:42:12] mustmodify: any sequence.
[19:02:12] mustmodify: has left #ruby: ()

2018-09-13

[21:10:10] mustmodify: has joined #ruby
[22:26:44] mustmodify: has left #ruby: ()

2018-08-14

[15:30:20] mustmodify: has joined #ruby
[15:30:38] mustmodify: has left #ruby: ()

2018-05-11

[17:28:34] mustmodify: >> if "I cheat\nö".force_encoding('UTF-8') =~ /\A[\x00-\x7f]*\z/ then "broken regex" else "huh? it works correctly?" end
[17:28:56] mustmodify: My chat client sometimes gets mixed up and adds an underscore.
[17:29:20] mustmodify: so that's weird... I'm using 2.1.6 and I get something different.
[17:29:58] mustmodify: what is //n?
[17:32:07] mustmodify: method is called `valid_encoding?` so I want true if it's all ascii
[17:36:53] mustmodify: Right. We have an interface. Per the RFC, it should be UTF-8. Sometimes people are dumb, and they tell me it's UTF-8, and then send ISO-8944 or whatever. So I'd like the server to test files. If it finds one that isn't encoded right, to then isolate the file and alert me.
[17:37:30] mustmodify: Actually I'm not sure it's an RFC, but there's a media type called HL7, which should be ASCII.
[17:38:30] mustmodify: I'd take UTF-8.
[17:38:57] mustmodify: I mean, it's maybe not preferable, but I just don't want to throw bad encodings into my db.
[17:40:14] mustmodify: that's correct.
[17:40:16] mustmodify: that's what happens.
[17:42:14] mustmodify: ok, let me run this though rspec and see what happens. :)
[17:44:35] mustmodify: ta da! That works. Thanks all.
[19:36:23] mustmodify: has left #ruby: ()

2018-03-27

[16:54:20] mustmodify: has joined #RubyOnRails
[16:54:35] mustmodify: I transitioned a heavily-used site to a new server.
[16:54:48] mustmodify: Where heavily used ~ 200 RPM
[16:55:26] mustmodify: Site works great, but the whenever jobs aren't firing because cron doesn't have the right environment... chruby being one.
[16:55:48] mustmodify: I tried to create a script at script/env-init that would call chruby, set environmental variables, etc...
[17:49:13] mustmodify: has left #RubyOnRails: ()

2018-03-15

[15:45:26] mustmodify: has joined #RubyOnRails
[15:45:59] mustmodify: I filled out the form to join the Rails slack chanel ... am I supposed to get an email or something? It has been days.
[15:46:03] mustmodify: I filled it out twice!
[19:26:34] mustmodify: @spohnz: I think the correct question is "can I limit the width of the other fields to make sure my page isn't longer than the viewport."
[19:26:44] mustmodify: Use CSS to set a width.
[19:26:47] mustmodify: or a max-width
[19:27:34] mustmodify: yep. Either <td class="description">..
[19:28:10] mustmodify: and then in your css set a .description {max-width: 30vw;}
[19:28:25] mustmodify: (this is the sloppy way)
[19:28:35] mustmodify: <td style="max-width: 300px">
[19:28:44] mustmodify: use px or % or vw or whatever.
[19:28:51] mustmodify: vw = viewport width, fyi
[21:09:56] mustmodify: has left #RubyOnRails: ()

2018-02-01

[22:33:44] mustmodify: So ... I'm using resque to add to a queue. And nothing is being queued. I'm looking at the web interface... nothing.
[22:34:04] mustmodify: Other queues have worked in the past. Other software also using resque works on the same machine....
[22:34:09] mustmodify: not working.
[22:34:15] mustmodify: I'm baffled.
[22:35:37] mustmodify: So I have three apps using Resque on my dev machine. I tried another one and it queued and immediately processed.
[22:35:59] mustmodify: Well, I mean, different app...
[22:36:15] mustmodify: different code base
[22:36:22] mustmodify: but Resque...
[22:36:25] mustmodify: should be the same.
[22:36:36] mustmodify: Let me check to see that the Resque.info is the same...
[22:38:07] mustmodify: So each app keeps a list of its own queues in config/resque_queues so that it doesn't try to work other apps' queues. But Resque.info[pending] doesn't know about that list...
[22:38:14] mustmodify: the not-working app shows 0 pending
[22:38:44] mustmodify: but the "working" app shows 2 pending. Not in its own queues -- I'm guessing those are from the not-working app's queues.
[22:38:53] mustmodify: if they use the same server, and the same environment...
[22:38:59] mustmodify: why would they have different numbers?
[22:40:05] mustmodify: Yeah, mysterious.
[22:40:12] mustmodify: a => not working; b=> working
[22:40:18] mustmodify: a: Resque.size(:email_queue) => 0
[22:40:22] mustmodify: b: Resque.size(:email_queue) => 2
[22:42:07] mustmodify: @radar good thought. Let me see.
[22:43:24] mustmodify: There isn't much configuration...
[22:43:48] mustmodify: just a list of failure handlers. And they seem the same, but I'll copy paste to make sure.
[22:58:31] mustmodify: @radar no luck on that one.
[22:58:38] mustmodify: but like I said, not much in the way of configuration.
[22:58:44] mustmodify: I guess it's just the defaults.
[23:00:18] mustmodify: a > Resque.info => {pending=>0, processed=>74812, queues=>13, :workers=>3, :working=>0, :failed=>0, :servers=>["redis://127.0.0.1:6379/0"], :environment=>"development"}
[23:00:41] mustmodify: b: >> Resque.info => {pending=>2, processed=>74812, queues=>13, :workers=>3, :working=>0, :failed=>0, :servers=>["redis://127.0.0.1:6379/0"], :environment=>"development"}
[23:01:17] mustmodify: So I guess I need to look at the source for info, figure out what it's asking Redis, and ask that.
[23:22:20] mustmodify: Well if anyone cares, I have narrowed it down to a single method.
[23:22:37] mustmodify: Resque.size( queue_name ) returns 0 or 2 depending on the application.
[23:22:45] mustmodify: Gemfile.lock says they should be using the same version of the code.
[23:22:58] mustmodify: And the code's pretty simple. But when I run the code in the console, it's 2 for both.
[23:23:04] mustmodify: So somehow that method is being redefined.
[23:24:25] mustmodify: OMG that's the dumbest thing.
[23:24:35] mustmodify: resque_spec is overriding.
[23:24:41] mustmodify: thank you debugger.
[23:40:23] mustmodify: has left #RubyOnRails: ()

2018-01-26

[17:23:34] mustmodify: has joined #RubyOnRails
[17:24:26] mustmodify: Anyone have an idea of the tradeoffs of selecting a general-purpose EC2 instance vs like a C5 "compute" instance for a busyish Rails site? (busyish = 300 RPM)
[19:32:05] mustmodify: dashboard, new records...
[19:32:33] mustmodify: well there are a bunch of options but you're right to think websockets is one of them.
[19:33:34] mustmodify: @Inside: I think a websocket can just announce new records. But alternately, you can query (via http or websocket) for the most recent ID or created_at date.
[19:33:46] mustmodify: and if it isn't what you have, then you need the new records.
[19:59:01] mustmodify: fine, but it's the same principle.
[19:59:35] mustmodify: If you're going to use websockets aka ActionCable
[19:59:57] mustmodify: then just have Rails keep track of which entries it has published on that channel
[20:00:11] mustmodify: and then have it query and publish new ones.
[20:00:17] mustmodify: Or you can do it via http, like you mentioned.
[20:03:08] mustmodify: It's not dirty...
[20:03:23] mustmodify: You want a resource that says "here is the most recent entry"
[20:03:33] mustmodify: either ID or creation date
[20:03:38] mustmodify: how are you going to create that resource?
[20:03:50] mustmodify: or you want a websocket to publish as those entries are created.
[20:04:09] mustmodify: how are you going to publish that?
[20:04:25] mustmodify: can the phonebank system publish?
[20:04:28] mustmodify: Presumably not.
[20:04:36] mustmodify: So then you must hook into it somehow.
[20:11:44] mustmodify: @Inside: so figure out the API first. Then test it. Then figure out how to use it from the website.
[21:40:35] mustmodify: Quit: ~ Trillian - www.trillian.im ~

2018-01-19

[00:40:05] mustmodify: has left #RubyOnRails: ()

2018-01-18

[18:52:22] mustmodify: has joined #RubyOnRails
[18:52:36] mustmodify: Someone arbitrarily tell me what EC2 instance type I want?
[18:52:47] mustmodify: I know how much memory and drive I need... but ... T2, M5...
[19:16:24] mustmodify: So I have a monolith. Gets 100 to 400 RPM during the day.
[19:16:47] mustmodify: heavy DB usage, Resque,
[19:17:07] mustmodify: big DB if it matters, though I'm thinking about moving that to a separate device.
[19:18:43] mustmodify: I'm currently running 8GB. At this time I'm using 4.7, 3.1 free (doesn't add up but that's computers... 4.7 + 3.1 == 8! Hooray!)
[19:21:48] mustmodify: Hm... You know, I think I need more CPU. I hadn't thunk that before but I often spike to load averages of like 4+
[19:22:03] mustmodify: Guess I gotta figure out my current vcpus.
[19:22:53] mustmodify: so that's about right
[19:23:35] mustmodify: Currently I'm on RackSpace. 4vCPUs. 8GB. 320GB drive. 600Mbps throughput.
[19:23:47] mustmodify: I'm not using all my ram, so I guess 8 will work.
[19:23:56] mustmodify: But of course, Rails is slow
[19:24:37] mustmodify: I don't even know what question to ask.
[19:24:50] mustmodify: I want better performance. OK, what is causing performance issues?
[19:25:04] mustmodify: good question, self. Is it lack of memory? Probably not.
[19:25:19] mustmodify: is it CPU? How would I know?
[19:25:28] mustmodify: ask newrelic maybe?
[19:29:55] mustmodify: That's a real possibility. How would I know?
[21:44:21] mustmodify: Like, "grant all to user xyz on table Y"?

2018-01-11

[14:37:21] mustmodify: has joined #RubyOnRails
[14:44:24] mustmodify: has left #RubyOnRails: ()

2018-01-06

[18:44:42] mustmodify: has joined #RubyOnRails
[18:45:57] mustmodify: I'm having a weird issue... I'm getting "missing template unauthorized/respond" format :json ... seems like it should just ... render the json... any thoughts? https://gist.github.com/mustmodify/47eb7570043b25857c7483bce98b044d And I realize this is a wonky way to do auth.
[19:47:04] mustmodify: Rails has a policy about that.
[19:47:39] mustmodify: http://guides.rubyonrails.org/maintenance_policy.html
[19:47:55] mustmodify: "Only the latest release series will receive bug fixes. When enough bugs are fixed and its deemed worthy to release a new gem, this is the branch it happens from."
[19:51:57] mustmodify: looks like it.
[19:52:32] mustmodify: has left #RubyOnRails: ()

2017-12-23

[15:54:54] mustmodify: has joined #RubyOnRails
[15:55:40] mustmodify: I now have three bits of JS for analytics/etc. Facebook pixel, google analytics, and hubspot (CRM). It's so big I feel I need a partial just for that. But can't think what to name it.
[15:56:04] mustmodify: tracking I guess.
[15:56:08] mustmodify: good talk, thanks.
[16:02:41] mustmodify: Say I use grep -l to find a list of files with a term, and then for another term... so I have two lists of files. Is there a.... like ... set merge?
[16:02:59] mustmodify: grep "analytics" | merge `grep "UA-"`
[16:03:02] mustmodify: something like that?
[18:42:39] mustmodify: has left #RubyOnRails: ()

2017-12-06

[19:02:05] mustmodify: has joined #RubyOnRails
[19:04:11] mustmodify: Is my authenticity token supposed to change every time I restart my app?
[19:45:43] mustmodify: @mdinuoso: thanks
[20:02:57] mustmodify: has left #RubyOnRails: ()

2017-12-05

[15:51:28] mustmodify: has joined #RubyOnRails
[15:52:14] mustmodify: what's the term for the kind of search where you can select a category of things... say, in ecommerce, you can choose "pants" and then from there, you have "materials" and "colors" and ... uh ... "cut" and "zipper style" and you can filter down using those...
[15:52:20] mustmodify: what's that feature called?
[15:52:34] mustmodify: Filters is a generic term but there's something specific ... aspects or ...
[16:58:44] mustmodify: what does `bundle exec cap` do?
[17:30:26] mustmodify: is there a "bundle" directory?
[17:31:04] mustmodify: I mean, from your app root, if you go into irb and do `puts File.expand_path("../bundle", __FILE__).inspect` what do you get?
[17:48:36] mustmodify: has left #RubyOnRails: ()

2017-11-10

[16:55:24] mustmodify: has joined #RubyOnRails
[16:56:05] mustmodify: I need to know how long a certain worker typically takes. I'd like a chart. I have newrelic free and rails 3.2.x. Should I ...
[16:56:19] mustmodify: I could log the results, I could ship them to newrelic...
[16:56:28] mustmodify: I have google analytics, maybe I could do something with that.
[16:56:51] mustmodify: or I could just spit the numbers into a logfile and do the analysis myself.
[17:00:14] mustmodify: ok, well then I need to figure out if NewRelic will ... like ... do anything with that data, and what it'll do.
[17:07:08] mustmodify: Oh... I hadn't thought about NewRelic having pre-built tools for resque.
[17:07:14] mustmodify: good thought, thanks.
[18:11:23] mustmodify: has left #RubyOnRails: ()

2017-11-08

[15:31:30] mustmodify: has joined #RubyOnRails
[15:32:43] mustmodify: Our demo site requires that I add users and a bunch of other data. The factory with that data is 14583 lines long (auto-generated).
[15:34:40] mustmodify: Am I nuts for not wanting that in memory in production, where it would never be used? I'm thinking about just `./bin/rails runner script/provision_demo_user #{sanitized_id} #{sanitized_other_id}` ... it would be secure, but is it sensible?
[16:29:52] mustmodify: has left #RubyOnRails: ()

2017-10-24

[16:16:08] mustmodify: has joined #RubyOnRails
[16:16:30] mustmodify: What's the actual name for the hash-or-whatever-tags that the asset pipeline adds in production?
[16:16:47] mustmodify: assets/rails.png?2344234234234234
[17:08:40] mustmodify: has left #RubyOnRails: ()

2017-10-17

[21:09:05] mustmodify: has joined #RubyOnRails
[21:09:12] mustmodify: has left #RubyOnRails: ()

2017-10-13

[14:57:32] mustmodify: has joined #RubyOnRails
[15:01:28] mustmodify: a User can have a profile... and let's say it's polymorphic so that user can be a Customer, Technician, Client, etc. Users don't always have profiles. Users have email addresses because password resets. A Customer may or may not have a User... they may or may not be allowed to log in, or set up for that. But Customers have email addresses.
[15:02:06] mustmodify: If a customer does have an email address AND does have a user, and I change one email address, then they are out of sync.
[15:04:06] mustmodify: Should I (a) create a mechanism in the controller to keep them in sync, (b) create a callback to keep them in sync (I have sworn off multi-model callbacks... ) (c) automatically create inactive users when a customer is created and only store email address in the user (d) create an 'emails' table and have both link to it via foreign key or (e) some other option I hadn't thunk up.
[18:42:51] mustmodify: has left #RubyOnRails: ()

2017-10-11

[20:31:54] mustmodify: ok, so then reasons TO use rails.
[20:32:11] mustmodify: 1. strong domain language / need for modeling
[20:32:26] mustmodify: 2. need for rapid prototyping
[21:29:49] mustmodify: isn't this a Beatles song?
[22:06:26] mustmodify: ok, I only need one more thing for my Rails presentation tonight. A Rails joke.
[22:06:30] mustmodify: Or a programming joke.
[22:06:37] mustmodify: Preferably one that is funny. Anything? :)
[22:35:33] mustmodify: baweaver: that's so bad. :)
[22:35:39] mustmodify: has left #RubyOnRails: ()