mrgreenfur

Activity Graph

Page 1 of 5 | Next »

2017-06-15

[02:33:23] mrgreenfur: Quit: mrgreenfur

2017-06-14

[17:02:31] mrgreenfur: has joined #RubyOnRails
[20:30:38] mrgreenfur: Quit: mrgreenfur
[20:59:57] mrgreenfur: has joined #RubyOnRails
[21:15:18] mrgreenfur: has joined #RubyOnRails
[21:45:06] mrgreenfur: I keep getting a NameError uninitialized constant CreateEventJob
[21:45:16] mrgreenfur: Must’ve been somethign in a recent sidekiq update, any else bump into this?

2017-06-09

[15:53:42] mrgreenfur: has joined #RubyOnRails
[15:56:27] mrgreenfur: I keep getting *** ActiveModel::RangeError Exception: 5682012932 is out of range for ActiveModel::Type::Integer with limit 4 bytes on an attribute that is text in model and in DB.
[15:56:30] mrgreenfur: Anyone seen this before?
[15:57:04] mrgreenfur: found an int column…yikees
[21:37:46] mrgreenfur: Quit: mrgreenfur

2017-05-22

[15:47:13] mrgreenfur: has joined #RubyOnRails
[15:54:49] mrgreenfur: Random redis question: AppSignal tells me during a new account signup flow, that i’m allocated 2.4mm ruby objects across 54,000 redis calls. This seems very bad and slow. Int he code, i cache a single rails model to redis. Anyone know where to look to find all these others?
[16:20:02] mrgreenfur: @matthewd Monitor command?
[16:20:26] mrgreenfur: will give it a shot, thanks for the tip!
[16:28:02] mrgreenfur: holy crap, a few big objects are written and then thousands of scans
[16:28:05] mrgreenfur: thanks matthewd
[16:36:39] mrgreenfur: Man, redis-cache is following endless empty cursors from redis, even when there are no results
[16:48:00] mrgreenfur: turns out it’s how redis works. Using deletE_matched will always iterate through ALL keys , just with a cursor
[16:48:28] mrgreenfur: anyone have tips for better namespaceing redis keys? E.g. I’m caching computed values for an account and saving them with the account ID in the key name, then using delete_matched periodically to erase them all
[16:51:14] mrgreenfur: thats basically what i’m doing
[16:51:29] mrgreenfur: but when you do a delete with a wildcard, it scans every key using a cursor to find matching ones
[16:51:53] mrgreenfur: so each operation is O(1) but it’s really O(n) as it follows the cursors
[16:52:15] mrgreenfur: I’d love it if there was a way to nest keys under another
[16:52:37] mrgreenfur: I have those, they’re in the db
[16:52:55] mrgreenfur: and then deleting the whole hash
[16:53:47] mrgreenfur: mind exploded
[16:54:31] mrgreenfur: i love it, i wonder how to make rails.cache.fetch work with this, maybe i’ll monkey patch it in
[16:56:08] mrgreenfur: yeah, that works for some computed values. I also have some infrequently changing settings that i read a lot but don’t write frequently. When they change I need to erase them all.
[16:56:48] mrgreenfur: they are mostly in async workers so no one hears redis scream in pain
[16:56:58] mrgreenfur: very goo dpoint
[16:59:52] mrgreenfur: oh wow, this is awesome. Using it for regular cache and directly is super
[17:00:05] mrgreenfur: ^ err as cache store and directly
[17:04:55] mrgreenfur: will keep it in mind, thanks for the warning :)
[17:32:12] mrgreenfur: @workmad3 do you use a monkeypatch to avoid caching nil values?
[19:00:56] mrgreenfur: has left #RubyOnRails: ()

2017-05-17

[00:35:19] mrgreenfur: has left #RubyOnRails: ()
[01:14:02] mrgreenfur: has joined #RubyOnRails
[01:43:47] mrgreenfur: Quit: mrgreenfur
[01:44:46] mrgreenfur: has joined #RubyOnRails
[02:00:05] mrgreenfur: Quit: mrgreenfur

2017-05-16

[00:04:36] mrgreenfur: amperry: does the sql work directly to the db to save values = 8?
[00:04:49] mrgreenfur: is there a foreign key or constraight that’s causing it to fail?
[00:07:39] mrgreenfur: non_revenue_status_id sounds like a foreign object reference
[00:07:46] mrgreenfur: is there a model called non_revenue_status?
[00:07:54] mrgreenfur: err NonRevenueStatus
[00:08:06] mrgreenfur: and is there one with id = 8?
[00:08:26] mrgreenfur: and the relationship is setup with belongs_to or somesuch
[00:13:12] mrgreenfur: still sounds like there is an error from the rdbms
[00:13:16] mrgreenfur: causing it to rollback
[00:13:25] mrgreenfur: might want to try executing the insert sql manually
[00:15:31] mrgreenfur: or update, whatever sql rails is trying to run before it rollsback
[00:15:42] mrgreenfur: likely a constraint is failing
[00:15:48] mrgreenfur: should be in the console
[00:46:14] mrgreenfur: Quit: mrgreenfur
[13:00:13] mrgreenfur: has joined #RubyOnRails
[18:01:26] mrgreenfur: Whats the best way to test a flow between multiple controllers? A feature spec?
[18:04:23] mrgreenfur: tbuehlmann: I tried a quick one but found it was missing stuff I’m used to in controller specs: @request, devise sign_in methods, etc. Any tips ot bring that stuff back?
[18:30:39] mrgreenfur: thanks tbuehlmann

2017-05-15

[13:22:41] mrgreenfur: has joined #RubyOnRails
[13:23:09] mrgreenfur: Morning everyone! I’d like to moniotr my app for errors in production, how do folks keep on top of errors and problems that happen in prod?
[13:26:56] mrgreenfur: @sevenseacat thanks! is there one you recommend or is popular?
[13:32:15] mrgreenfur: thanks for the recommendations, much appreciated
[13:32:28] mrgreenfur: sounds like there’s no clear winner, i’ll pick on ui and price then I suppose
[14:00:02] mrgreenfur: anyone tried skylight.io?
[14:00:46] mrgreenfur: oh it’s for performance not errors oops
[15:14:14] mrgreenfur: Quit: mrgreenfur
[18:25:38] mrgreenfur: has joined #RubyOnRails
[23:05:10] mrgreenfur: Anyone here a genius at redids/sidekiq? Something happened in the last few days and now I can’t look at the sidekiq UI and there are tons of errors like: Error fetching job: Error connecting to Redis on x.x.x.x:6380 (Errno::ECONNREFUSED)
[23:05:22] mrgreenfur: I can connect just fine in a rails console and in the redis-cli
[23:05:31] mrgreenfur: @mikecmpbll :D
[23:06:18] mrgreenfur: yeah, but i can’t figure how where to look. I can connect from host to redis via redis-cli AND via a shell using the Redis.new....
[23:06:34] mrgreenfur: something slippery is afoot
[23:07:07] mrgreenfur: it sets the redis url and namespace
[23:07:49] mrgreenfur: i can copy/paste it into console to test it and it works fine
[23:08:35] mrgreenfur: let me try. As far as I can see jobs ar estill enqueuing and de-queueing just fine, just the web UI barfs
[23:10:11] mrgreenfur: yup enqueing works fine
[23:11:22] mrgreenfur: it’s showing my apps 500 page
[23:13:03] mrgreenfur: Got those lines in the initializer
[23:13:49] mrgreenfur: Sidekiq.configure_server do |config|
[23:13:50] mrgreenfur: config.redis = redis_options
[23:13:52] mrgreenfur: Sidekiq.configure_client do |config|
[23:13:53] mrgreenfur: config.redis = redis_options
[23:14:56] mrgreenfur: just setting the url and the namespace
[23:15:42] mrgreenfur: yeah, tried redeploying a few times
[23:15:52] mrgreenfur: will try restarting redis next i guess
[23:16:48] mrgreenfur: i dont relaly know either. I can see the 500 in the web page and then there are workers failling to connect
[23:16:58] mrgreenfur: there’s no max-connections limit on the redis instance
[23:19:25] mrgreenfur: oh well, i’ll keep banging on it, thanks mikecmpbll
[23:21:14] mrgreenfur: nah, u mensa man
[23:33:26] mrgreenfur: could copy the cron syntax

2017-05-11

[00:07:06] mrgreenfur: has joined #RubyOnRails

2017-05-10

[22:20:08] mrgreenfur: has joined #RubyOnRails
[23:17:03] mrgreenfur: Quit: mrgreenfur

2017-04-30

[00:06:03] mrgreenfur: Quit: mrgreenfur
[00:06:56] mrgreenfur: has joined #RubyOnRails
[00:36:33] mrgreenfur: Quit: mrgreenfur
[00:37:29] mrgreenfur: has joined #RubyOnRails
[01:07:30] mrgreenfur: Quit: mrgreenfur
[01:08:27] mrgreenfur: has joined #RubyOnRails
[01:38:21] mrgreenfur: Quit: mrgreenfur
[01:39:51] mrgreenfur: has joined #RubyOnRails
[02:08:51] mrgreenfur: Quit: mrgreenfur
[02:09:48] mrgreenfur: has joined #RubyOnRails
[02:40:11] mrgreenfur: Quit: mrgreenfur
[04:32:33] mrgreenfur: has joined #RubyOnRails

2017-04-29

[14:41:35] mrgreenfur: has joined #RubyOnRails
[14:43:44] mrgreenfur: I have a multi-tenant rails app and I’m thinking of makign per-tenant materialized views to make the experience and db resulsts faster. The tables would be something like ABC_tenant_id. Anyone ever tried having a dynamic table_name in a model before?
[17:09:19] mrgreenfur: Quit: mrgreenfur
[17:10:16] mrgreenfur: has joined #RubyOnRails
[17:40:02] mrgreenfur: Quit: mrgreenfur
[17:41:03] mrgreenfur: has joined #RubyOnRails
[18:10:43] mrgreenfur: Quit: mrgreenfur
[18:11:38] mrgreenfur: has joined #RubyOnRails
[18:41:23] mrgreenfur: Quit: mrgreenfur
[18:42:22] mrgreenfur: has joined #RubyOnRails
[19:12:06] mrgreenfur: Quit: mrgreenfur
[22:52:59] mrgreenfur: has joined #RubyOnRails
[22:53:19] mrgreenfur: thanks tbuehlmann
[23:35:22] mrgreenfur: Quit: mrgreenfur
[23:36:16] mrgreenfur: has joined #RubyOnRails

2017-04-25

[01:15:59] mrgreenfur: Quit: mrgreenfur

2017-04-24

[20:19:31] mrgreenfur: has joined #RubyOnRails

2017-04-12

[05:10:00] mrgreenfur: Quit: mrgreenfur
[13:11:03] mrgreenfur: has joined #RubyOnRails
[14:32:20] mrgreenfur: Quit: mrgreenfur

2017-04-11

[17:57:44] mrgreenfur: has joined #RubyOnRails
[17:59:25] mrgreenfur: Anyone ever used a python library from within rails/ruby?
[17:59:49] mrgreenfur: I’m trying ot get started with the facebook API, but the SDK is only in python and php. Should I write my own wrapper or use the python one?
[18:00:27] mrgreenfur: I found a few from like 7 years ago
[18:00:38] mrgreenfur: http://rfacebook.rubyforge.org/
[18:00:51] mrgreenfur: and htis one https://github.com/arsduo/koala
[18:00:55] mrgreenfur: ok, i’ll try Koala
[18:00:59] mrgreenfur: oh i see an update 2 months ago
[18:01:03] mrgreenfur: maybe this one is fresh
[18:01:07] mrgreenfur: thanks fryguy !
[18:02:19] mrgreenfur: oh you’re right
[18:02:31] mrgreenfur: Somehow I missed this when I read through the libs I found

2017-04-08

[00:40:35] mrgreenfur: has joined #RubyOnRails
[01:44:27] mrgreenfur: Quit: mrgreenfur
[14:21:39] mrgreenfur: has joined #RubyOnRails
[15:13:39] mrgreenfur: Quit: mrgreenfur
[16:07:40] mrgreenfur: has joined #RubyOnRails
[16:59:06] mrgreenfur: Quit: mrgreenfur
[18:10:18] mrgreenfur: has joined #RubyOnRails
[18:46:52] mrgreenfur: Quit: mrgreenfur
[19:12:56] mrgreenfur: has joined #RubyOnRails
[22:16:25] mrgreenfur: Quit: mrgreenfur

2017-04-07

[05:10:00] mrgreenfur: Quit: mrgreenfur
[05:11:03] mrgreenfur: has joined #RubyOnRails
[05:41:22] mrgreenfur: Quit: mrgreenfur
[05:42:22] mrgreenfur: has joined #RubyOnRails
[06:12:01] mrgreenfur: Quit: mrgreenfur
[06:13:01] mrgreenfur: has joined #RubyOnRails
[06:43:22] mrgreenfur: Quit: mrgreenfur
[06:44:20] mrgreenfur: has joined #RubyOnRails
[07:13:58] mrgreenfur: Quit: mrgreenfur
[12:40:16] mrgreenfur: has joined #RubyOnRails
[14:29:43] mrgreenfur: Quit: mrgreenfur
[17:48:25] mrgreenfur: has joined #RubyOnRails
[20:35:44] mrgreenfur: Quit: mrgreenfur
[22:16:55] mrgreenfur: has joined #RubyOnRails
[23:26:34] mrgreenfur: Quit: mrgreenfur

2017-04-06

[00:09:27] mrgreenfur: Quit: mrgreenfur
[02:56:07] mrgreenfur: has joined #RubyOnRails
[03:33:44] mrgreenfur: Quit: mrgreenfur
[12:44:19] mrgreenfur: has joined #RubyOnRails
[13:23:04] mrgreenfur: anyone know how to include regular rails helpers to be used in Mailers? I’ve tried everything and can’t seem to figure it out. Currently onto “include DatesHelper” in the Mailer class

2017-04-05

[13:56:07] mrgreenfur: has joined #RubyOnRails

2017-03-31

[00:21:57] mrgreenfur: Quit: mrgreenfur
[14:11:17] mrgreenfur: has joined #RubyOnRails
[14:48:28] mrgreenfur: Quit: mrgreenfur
[15:12:39] mrgreenfur: has joined #RubyOnRails
[16:48:56] mrgreenfur: Anyone know how to fire JS in a template only once? E.g. after turbolinks loads once, but not on every time.
[16:49:04] mrgreenfur: binding to .on(turbolinks:load
[16:49:09] mrgreenfur: seems to fire every time afterwards
[18:04:34] mrgreenfur: Quit: mrgreenfur

2017-03-30

[00:30:22] mrgreenfur: has joined #RubyOnRails
[00:42:39] mrgreenfur: Anyone wrangled with the ‘x-frame-options’ header?
[00:42:51] mrgreenfur: I had it turned off nicely in dev , but in production I can’ tseem to turn it off
[00:43:51] mrgreenfur: I added a controller concern, then did an after_action on some views to delete hte value
[00:44:12] mrgreenfur: I’ve also tried that, but per chrome network tab, it’s sending both ALLOWALL and DENY
[00:44:56] mrgreenfur: I thought so too!
[00:45:03] mrgreenfur: I wonder if some other settings are makign it more “secure"
[00:45:12] mrgreenfur: 'X-Frame-Options' => 'ALLLOWALL'
[00:45:12] mrgreenfur: I am using this now: config.action_dispatch.default_headers = {
[00:45:20] mrgreenfur: which doesn’t delete the header, just adds another it seems
[00:45:24] mrgreenfur: maybe i need to match case with rails
[00:45:29] mrgreenfur: evne though headers aren’t case snsitive
[00:46:05] mrgreenfur: Maybe chome is annoyingly caching, but i’ve tried hard refreshing and an incog window
[00:46:42] mrgreenfur: I DID NOT REALIZE THAT
[00:47:18] mrgreenfur: I’ve searched my code a few times couldn’t find it either. Maybe there’s a plugin interferring
[00:47:44] mrgreenfur: x-frame-options:DENY
[00:47:45] mrgreenfur: x-frame-options:ALLOWALL
[00:48:16] mrgreenfur: Radar: thanks for confirmation that it’s not rails!
[00:49:19] mrgreenfur: I was using this: “response.headers.delete "x-frame-options”
[00:49:29] mrgreenfur: now i’m trying a proverbial sledgehammer
[00:53:16] mrgreenfur: just redeployed, same hting:
[00:53:17] mrgreenfur: x-frame-options:DENY
[00:53:17] mrgreenfur: x-frame-options:ALLOWALL
[00:53:45] mrgreenfur: firefox agrees: X-Frame-Options:"ALLOWALL, DENY"
[00:53:48] mrgreenfur: the game is afoot!
[00:55:23] mrgreenfur: I’ll never get hose hours back
[00:55:25] mrgreenfur: nginx config: add_header X-Frame-Options DENY;
[00:55:41] mrgreenfur: thanks for the help Radar & matthewd
[00:57:05] mrgreenfur: pretty much!
[00:58:35] mrgreenfur: when in doubt blame ops
[02:00:21] mrgreenfur: Quit: mrgreenfur
[10:53:04] mrgreenfur: has joined #RubyOnRails
[10:54:00] mrgreenfur: Radar: In case you’re curious (for your book?), ‘ALLOWALL’ isn’t a valid x-frame-options value and chrome will still block the content. The header needs to be removed, which in rails is case sensitive, so you have to match how the defaults added it.
[11:25:58] mrgreenfur: Quit: mrgreenfur
[14:58:40] mrgreenfur: has joined #RubyOnRails
[21:05:03] mrgreenfur: Quit: mrgreenfur
[22:56:03] mrgreenfur: has joined #RubyOnRails

2017-03-29

[21:51:03] mrgreenfur: has joined #RubyOnRails
[22:22:16] mrgreenfur: Quit: mrgreenfur