#RubyOnRails - 07 January 2019
« Back 1 day Forward 1 day »
[11:20:08] lupine: it seems that eager loading doesn't pull `app/views/*` into memory at boot-up. Is there a setting or gem that would cause this to happen?
[11:23:07] lupine: deployments aren't atomic, so sometimes we have a process running with the old code, but new views
[11:23:31] lupine: if the process read the view files into RAM at bootup, that would stop being a problem
[11:27:48] sevenseacat: I don't know of any library that does that. but I'd suggest looking at your deployment strategy
[11:28:12] sevenseacat: not sure how you can have old code and new views when views are part of the code
[11:31:33] lupine: sevenseacat: it's a consequence of not stopping the process while a package install is ongoing, a decision taken to minimise downtime
[11:31:58] lupine: .deb packages can use either mode when they include a service - stop it while upgrading, or not.
[11:32:24] lupine: if you don't, the files are updated while the old process is still running, then once the extraction is complete, the service is restarted. good for uptime, bad for correctness :/
[13:18:16] catbusters: Hi! I'm trying to use Grape to build an API, and I keep coming across examples that show `get "", root: :something`. What is the `root` supposed to do?
[13:21:42] emers2n: I'm struggling to format a hash with children to match a JSON request format: https://pastebin.com/raw/pUXGbCNE
[13:26:14] emers2n: @catbusters Could not parse profiles. I'm assuming I'm not nesting the profiles correctly when manually define the hash
[13:58:11] jlebrech: i'm getting a template error: (undefined method `' for nil:NilClass) but the value is still being rendered correctly.
[15:07:16] dekroning: i'm using bitbucket pipelines to build my repo, but now i't complaining about not using bundler 2, when I run gem list: bundler (2.0.1, 1.16.6, default: 1.16.2), for some reason I cannot get rid of 1.16.2 via the build scripts, is there away to force a different version of bundler?
[17:32:01] kidPalooma: Hello, I have a statement like this in my routes.rb file: "resources :resource_configurations, except: [:show], as: :resources do ... end". This changes all the helpers method for my "resource" resources, however, when I call form_for @resource, the form_for method looks for the old resource_configurations helpers
[17:53:54] Travis-42: in a rails application template, is there a way to detect options set in the command line (such as "--webpack=react" so that the template can respond accordingly?
[19:02:02] CGibsonmm: I am trying to test a User in a RSpec.feature test, I want to update my users to have a column the accepts a boolean, say terms_of_service: true, In my model I have a validation on create that force the user to validates :terms_of_service, acceptance: true I need a way do something like this in my feature test that allows something like @user = create(:user, terms_of_service: false) rspec/rails allows the creati
[19:03:06] CGibsonmm: I need to be able to test against a user in the db that is already there prior to the new column, at this time all users have terms_of_service
[21:03:07] havenwood: NeXTSUN: https://ryanbigg.com/2015/06/mac-os-x-ruby-ruby-install-chruby-and-you
[21:07:25] havenwood: NeXTSUN: That ^ tutorial for setting up chruby should serve you well. It allows you to have multiple Rubies, as you might need for the varying version expectation across many projects.
[21:08:15] havenwood: NeXTSUN: You can also point chruby at the Homebrew Ruby. That's a quick way to get started if Ruby 2.6 is your cup of tea.
[21:18:55] waheedi: so please correct me if I'm wrong, if I use an encrypted cookie for some random user, and using this implementation for verification, I would see all his web socket messages? https://api.rubyonrails.org/classes/ActionCable/Connection/Base.html
[21:21:10] havenwood: NeXTSUN: https://ryanbigg.com/2015/06/mac-os-x-ruby-ruby-install-chruby-and-you
[21:24:56] waheedi: NeXTSUN: you can always build your own web framework too, if there is a need for one
[21:34:48] tubbo: waheedi: encrypted cookies can only be readable by the client that they were encrypted for afaik