#RubyOnRails - 21 August 2018
« Back 1 day Forward 1 day »
[01:30:41] sevenseacat: I am doing what twitter wont - banning throwaway twitter accounts (from our platform. as a config option.)
[03:58:04] sevenseacat: nice! yeah that's a good idea - hence why I touched on it so early in foundations, just so people know where rails fits into the equation
[03:58:41] Radar: I think we should teach HTML/CSS/JS -> React & friends -> JSON APIs -> Web servers -> Databases -> Infra
[06:09:41] dionysus69: what does this mean exactly? it's important that Sidekiq be run against a Redis instance that is not configured as a cache but as a persistent store.
[06:10:43] dionysus69: I knew redis had snapshots and backups periodically but I didn't know it could be setup as a persistent store :S
[09:07:53] dionysus69: is it absolute must to use separate redis for sidekiq? is it more of a problem of throughput or the key conflicts?
[09:22:43] Andr3as: does a counter_cache always "just counts"? or could i use it for do some calculations as well? like when a trade has many executions and each execution has a size field which could be positive or negative and i wanna calculate the position size with adding up all the sizes of each execution
[09:23:22] dionysus69: any particular reason that this doesn't work in staging but works in development? http://paste.debian.net/1038714/
[09:23:28] sevenseacat: Andr3as: it always just counts. it you want to do something else, write your own.
[09:24:17] dionysus69: I think it would be because it has problem authenticating, I get non-existent route error
[09:25:22] dionysus69: dunno what other info to mention, there aren't much differences between environments that affect sidekiq
[09:25:46] dionysus69: capistrano is bundling so it should have installed sidekiq too, it's in the gemfile, first time deployment
[09:30:47] dionysus69: dunno, I will restart server, maybe sidekiq isn't launched correctly for some reason
[09:32:39] dionysus69: but I have no idea what changed, because process was launched fine with /home/user/.rvm/bin/rvm default do bundle exec sidekiq
[10:32:08] dionysus69: sevenseacat: I got the reason why it missbehaved, the problem was in I used phased restart on staging and production and in order for sidekiq route to become available, i had to restart puma without phasing
[10:40:23] Stimpy_2000: im trying to update my database entries with a text field tag and an ajax request but i always get "POST http://localhost:3000/useraccounts/102 404 (Not Found)" in the JS console
[10:42:21] Stimpy_2000: i have PUT and PATCH /useraccounts/:id(.:format) useraccounts#update defined in the routes
[10:42:45] sevenseacat: you're not making a PUT or PATCH request though - you're making a POST request
[11:42:41] Stimpy_2000: is there any way to update a existing record with an ajax request. i just need to add an extra field
[11:44:17] Stimpy_2000: im passing "url:'/useraccounts'+$(this).attr('id')" into the ajax request but i always get a 404
[11:46:53] Stimpy_2000: @jane_booty_doe, ActionController::RoutingError (No route matches [POST] "/useraccounts/102")
[11:47:29] Stimpy_2000: i think im a little confused on where to send the request to update an exisiting article with ajax
[11:49:03] Stimpy_2000: @jane_booty_doe, if i would want to update an existing article via ajax input field while im typing, the route to send it to would be PATCH /useraccounts/:id(.:format) useraccounts#update
[11:50:37] Stimpy_2000: i check if the field has 4 chars, if it has i send an ajax request to url:'/useraccounts/'+$(this).attr('id'), with method:"POST"
[11:52:31] jane_booty_doe: kinda hard to give advice w/o seeing the code. but you need to add an event listener. or render .js.erb and just pass the data into an existing function
[11:53:27] jane_booty_doe: i have a dummy github account i use for asking stupid questions on irc and discord. comes in handy a lot
[12:07:01] Stimpy_2000: @jane_booty_doe, i commented out the redirect in the controller. thanks a lot mang!
[13:15:22] Stimpy_2000: when i try to send a request i get the message "ActionController::RoutingError (uninitialized constant AdminControllerController)" in the console
[13:19:56] Stimpy_2000: @jane_booty_doe, you know how to get around the "invalid authenticity token" when using ajax requests? without using the skip_before_action :verify_authenticity_token
[14:10:52] lankanmon: Hi all, I am new to Rails and am trying to figure things out. I am trying to create json file with jbuilder and the output looks like: https://api.jsonbin.io/b/5b7c1bef6376d24455a9abf6 My jbuilder file has json.changeset change_log.changeset and I can see the changeset on the json file. I want to know how to change json.changeset change_log.changeset so I can replace the provider_ids with the provider name
[14:44:13] mjacob: is there a way to set a breakpoint in the debugger for every time a object of a specific class was allocated?
[14:50:05] dionysus69: what's a proper directory to store things like systemd service files in a rails hierarchy, I don't want to make it ugly :)
[14:50:45] dionysus69: vendor or lib ? the worst case scenario is for me to create new dir but I would rather avoid that
[15:34:35] tdelam: whats the preferred way to create an admin area to perform CRUD operations these days? I used to create namespaced admin area in Rails 3.
[15:59:33] adavia: Weird issue here. Im trying to open a pdf file on the browser but is being shown in binary text. This is only happening in production.
[17:05:02] timdotrb: I keep getting Mongo errors on my Resque jobs, one of them is: EOFError: end of file reached. The other is: Errno::EPIPE: Broken pipe. Has anyone else run into either of these?
[17:05:54] timdotrb: It also looks like Resque is using an old version of my code, even though I’ve restarted it. Is there a way to force refresh the code that it’s using?
[18:04:07] lazyatom: Hey folks -- if you've been meaning to check out Mastodon, I've just set up an instance especially for us: https://ruby.social
[20:11:01] tycoon177: are there any options to write on pdfs with prawn? i see that they removed templates due to pdf corruptions