#RubyOnRails - 22 October 2018
« Back 1 day Forward 1 day »
[00:45:23] Stabby: Trouble with Ruby on Rails, just created a controller, can't visit root homepage. Problem with the default application view:
[00:45:24] Stabby: Showing C:/Sites/drinkmeway/app/views/layouts/application.html.erb where line #7 raised:
[00:45:30] Stabby: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
[02:21:54] skwurl: im trying to build a rails app for a rpg character generator. ive already built a ruby program to do the same. In the ruby program i used a textfile.
[02:23:04] skwurl: could i do the same in a rails app? is there a way to build a controller method to reference a textfile, and where would i store the textfiles if so?
[03:36:07] i8igmac: havenwood: is there a way to use nokogiri to pull variables from a url like stuff?list=VAR
[09:16:41] sunny2976: I get a doublerender error even when I have only a render method and a return in my controller. And I have no idea how thats even possible
[09:16:55] sunny2976: https://stackoverflow.com/questions/52925651/doublerendererror-with-no-content-return-and-no-other-code
[09:30:51] sunny2976: The thing I dont get is that if my return statement is the second line after that head :no_content, where is there a chance to produce a second render?
[09:34:55] sunny2976: arc-api_1 | App 8597 output: AbstractController::DoubleRenderError (Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return".):
[09:38:03] sevenseacat: no, I want the complete information from your server log. show the request being made, the error, the backtrace
[13:57:58] ss942: When I create issue, I can set back_url parameter and it would redirect me to path than been set after creation of new issue new?continue=true&back_url=google.com
[13:57:58] ss942: useful links: https://www.rubydoc.info/github/edavis10/redmine/IssuesController https://www.rubydoc.info/github/edavis10/redmine/DocumentsController
[15:16:19] nzst: My asset precompilation has been maxing out my cpu on deploys, sometimes failing. What is the current state of improving asset precompilation cpu efficiency and time? any good article or practices? most of the stuff i'm finding is a bit outdated and doesn't include any webpacker infos
[15:49:54] nzst: does anyone else notice node hosing the cpu on asset:precompile? i'm wondering if i'm under-specced or misconfigured
[16:50:24] nzst: i found https://edgeguides.rubyonrails.org/active_storage_overview.html CMD+F "Store files locally"
[16:58:42] drale2k_: nzst: i am already storing them locally. I am talking about grabbing a file from disk instead a form or API
[17:00:33] nzst: drale2k_: like this? https://edgeguides.rubyonrails.org/active_storage_overview.html#attaching-file-io-objects
[17:02:43] drale2k_: nzst: do you by any chance know if this will trigger an upload through the rails stack or just move the file on disk and create a db record ?
[17:03:23] nzst: no, i don't know that off the top of my head, i was just helping search through the docs
[19:18:05] Scient: well crap... the ActiveRecord attributes API is pretty neat and everything, but for some reason the model instance is never exposed to the type classes, making it impossible to create neat instance aware stuff (like stuff with instance caching etc)
[19:57:51] Scient: luckyruby: i wish, it has this overly simplistic approach of doing everything on demand