#RubyOnRails - 04 July 2018
« Back 1 day Forward 1 day »
[03:07:27] jbd7072: well given that round_to_nearest_cash_value() exists i wouldn't expect to_s to just do that too
[03:10:55] jbd7072: how do i do this https://www.rubydoc.info/gems/money/Money#infinite_precision-class_method
[03:32:56] sevenseacat: "TypeError: incompatible marshal file format (can't be read) format version 4.8 required; 50.48 given" thats a new one for me
[05:40:19] yottanami: I am trying to create a cronjob using whenever gem. it created this job in crontab `/bin/bash -l -c 'cd /var/www/pabetoop && RAILS_ENV=production bundle exec rake board:update --silent` now the problem is I got bundler: failed to load command: rake (/usr/local/bin/rake)
[10:36:14] drale2k_: I have created a model "ComputerDrive" and my Computer model "has_many :computer_drives". Now when i want to list computer drives and call "Computer.first.computer_drives" i get "NameError (uninitialized constant Computer::ComputerDrife)"
[10:37:54] sevenseacat: because thats how the inflector thinks it should be singularized. you can override it
[10:39:00] drale2k_: so by that logic i should be able to call .computer_drifes ? For that i get "NoMethodError (undefined method `computer_drifes' for #<Computer:0x00007faa5baaa200>)" as well
[10:39:20] sevenseacat: https://liamseanbrady.wordpress.com/2015/02/06/adding-custom-inflections-in-rails/
[10:55:26] Terens: I am getting error: fatal: Could not parse object '11f47aae0af655f9d531c1e060b1b65498badbcb'.
[11:27:47] bonhoeffer: i'm stuck: bundle exec rake db:setup Could not find nokogiri-1.8.3 in any of the sources Run `bundle install` to install missing gems.
[11:28:08] bonhoeffer: of course i run bundle install and I also ran bundle exec bundle install but that doesn't do anything
[11:47:27] bonhoeffer: sevenseacat: very sorry, I wrote that too quickly. I know better. I removed my Gemfile rehashed rbenv and got all my gems in the right path now
[12:08:16] bonhoeffer: sevenseacat: yes -- that worked -- but I can't start rails now. I get "You may have encountered a bug in the Ruby interpreter or extension libraries." and the stacktrace is too long. If I try to output stdout to a text file, it doesn't capture it either
[12:12:07] sagax: after i import some module i got some methods. How to i can got - where provide some method?
[12:57:26] pankaj: I have developed a lightweight rails app. What is the best way currently to easily deploy it?
[13:03:47] pankaj: tbuehlmann: Well, I am not an experienced Web developer or designer so I think I need a tutorial on what is meant to deploy the application.
[13:05:07] tbuehlmann: the short version is you'll be using git to push your project to a remote computer
[13:15:04] lupine: you can't deploy to github. it's not a thing. you can push code to github, and have github push to another party for deployment (or for the other party to pull from github)
[13:17:23] samosaphile: how do you make it so that, 'require 'bootsnap/setup'' is permanently commented out or removed from config/boot.rb, so that whenever i do rails new app, i don't have to manually do it everytime (because it creates that line automatically be default)
[13:27:38] samosaphile: tbuehlmann: https://github.com/Shopify/bootsnap/issues/67 https://gitlab.com/gitlab-org/gitlab-ce/issues/45230 bootsnap is broken on armv7 (running rails on ubuntu chroot on a arm chromebook)
[14:34:18] bonhoeffer: i have a different path for my gems -- bundle install works fine, but then rails seems to be running in a different environment: https://gist.github.com/tbbooher/fc923ae529398eeed9e0e2a96c19a32c
[14:38:02] bonhoeffer: and I have two gem paths: /Users/tim/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0 and /Users/tim/.gem/ruby/2.5.0
[14:39:25] bonhoeffer: trying this page to troubleshoot: https://makandracards.com/makandra/1667-how-to-fix-gems-are-unavailable-although-they-are-installed
[15:52:29] DaDa|Urka: Does anyone one if a 404 (or moreover all http errors) are mapped to /404 in the routes.rb? What happens if I use different namespaces/scopes? Still all mapped to the $root+$error_code?
[17:38:13] s2013: whats the simplest way to deploy a rails app to a vps? are there any paid tools that can help with that?
[17:49:59] fryguy: what issues do you have with it that you are trying to solve potentialy with a different tool?
[18:28:46] s2013: fryguy i dont want to have to do any configuration really . . basically make it as simple as heroku w/o usng heroku
[18:31:43] regedit: (how) can i reference the request parameters within routes.rb? ex. if params['foo'] == 'bar'; match.... end
[18:32:15] regedit: NameError: undefined local variable or method `params' for #<ActionDispatch::Routing::Mapper:0x00000006112780>
[19:07:50] arup_r: I want to make my model Room as polymorphic instead of keeping 2 Fks like drywall_id, paint_id etc. Can anyone suggest me a good name for this please? https://gist.github.com/aruprakshit/5a981a404fa8dad192a92a2430f4987c
[20:07:33] bonhoeffer: i have Users/tim/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0 and /Users/tim/.gem/ruby/2.5.0
[20:09:42] bonhoeffer: my problem is that I have to install missing gems that are bundle installed and I can't install them through the bundle
[20:10:35] bonhoeffer: my gem env home shows: /Users/tim/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0 but gem -v is 2.7.6