« Back to channel list

#RubyOnRails - 04 July 2018

« Back 1 day Forward 1 day »
[00:01:30] cagomez: has joined #RubyOnRails
[00:04:23] duderonomy: has joined #RubyOnRails
[00:09:51] cagomez: has joined #RubyOnRails
[00:16:34] xuyuheng: has joined #RubyOnRails
[00:17:41] johndunn: has left #RubyOnRails: ()
[00:17:48] darkhanb: spaces or tabs?
[00:18:02] planigan: has joined #RubyOnRails
[00:18:48] blackmesa1: has joined #RubyOnRails
[00:19:07] jbd7072: has joined #RubyOnRails
[00:35:06] planigan: has joined #RubyOnRails
[00:36:41] xuyuheng: has joined #RubyOnRails
[00:47:11] orbyt_: has joined #RubyOnRails
[00:47:58] benlieb: has joined #RubyOnRails
[00:48:42] lupine: spaces. two of them, to be exact
[00:57:29] sevenseacat: has joined #RubyOnRails
[01:12:17] fragamus: has joined #RubyOnRails
[01:25:59] LambdaSource: has joined #RubyOnRails
[01:34:17] xuyuheng: has joined #RubyOnRails
[02:04:36] bradleyprice: has joined #RubyOnRails
[02:06:40] psychoslave_: has joined #RubyOnRails
[02:22:54] Technodrome: has joined #RubyOnRails
[03:00:22] jbd7072: wat https://i.imgur.com/1m2rtyF.png
[03:02:18] sevenseacat: not even once.
[03:03:05] jbd7072: paypal-sdk-rest. not even once.
[03:04:32] jbd7072: it still does it with a string
[03:04:56] sevenseacat: is the first arg supposed to be in cents or something?
[03:04:59] jackhum: has joined #RubyOnRails
[03:05:00] jbd7072: https://i.imgur.com/7182pZL.png
[03:05:25] jbd7072: stripe uses cents, paypal doesn't, so i gotta babysit these values
[03:05:56] sevenseacat: well 0.01 cents would surely round down to 0.00 dollars
[03:06:12] sevenseacat: so it might not be as crazy as it looks
[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:08:00] sevenseacat: well if you have a wat moment, one of your assumptions must be incorrect
[03:09:16] darkhanb: has joined #RubyOnRails
[03:09:22] braincrash: has joined #RubyOnRails
[03:10:07] fragamus: has joined #RubyOnRails
[03:10:26] srinidhi: has joined #RubyOnRails
[03:10:55] jbd7072: how do i do this https://www.rubydoc.info/gems/money/Money#infinite_precision-class_method
[03:11:01] jbd7072: i suck at reading docs
[03:11:08] jbd7072: tried Money.infinite_precision(true) { Money.new("0.01", "USD") }
[03:11:58] sevenseacat: just Money.infinite_precision i think
[03:13:17] jbd7072: oh it's like a global option. ruby is so weird
[03:13:36] fragamus: has joined #RubyOnRails
[03:13:42] jbd7072: LOL https://i.imgur.com/XSQMIO0.png
[03:14:49] sevenseacat: well that looks like exactly what I said before
[03:15:02] sevenseacat: first argumet to Money.new is in cents
[03:15:12] sevenseacat: and to_s is displaying in dollars
[03:16:47] fragamus: has joined #RubyOnRails
[03:16:47] jbd7072: dollars don't go to the ten thousandths place though
[03:17:03] sevenseacat: but you asked for infinite precision so now they do
[03:17:58] sevenseacat: https://github.com/RubyMoney/money#usage first example
[03:19:02] jbd7072: ah yeah my bad. forgot the money gem takes values in cents too
[03:21:05] woohoou: has joined #RubyOnRails
[03:24:25] jackhum: has joined #RubyOnRails
[03:25:55] apeiros__: has joined #RubyOnRails
[03:26:50] apeiros: has joined #RubyOnRails
[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
[03:35:52] apeiros__: has joined #RubyOnRails
[03:43:01] kapil___: has joined #RubyOnRails
[03:56:53] apeiros: has joined #RubyOnRails
[03:59:50] darkhanb: has joined #RubyOnRails
[04:10:53] bradleyprice: has joined #RubyOnRails
[04:13:45] srinidhi: has joined #RubyOnRails
[04:35:16] jackhum: has joined #RubyOnRails
[04:36:12] fragamus: has joined #RubyOnRails
[04:41:46] Saukk: has joined #RubyOnRails
[05:03:27] tdy: has joined #RubyOnRails
[05:04:46] orbyt_: has joined #RubyOnRails
[05:13:06] reber: has joined #RubyOnRails
[05:19:55] benlieb: has joined #RubyOnRails
[05:37:43] yottanami: has joined #RubyOnRails
[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)
[05:40:19] yottanami: Bundler::GemNotFound: Could not find rake-12.3.1 in any of the sources
[05:40:37] yottanami: I am trying this in a git container and I have rake in my Gemfile
[05:41:10] yottanami: I also tried to change the bundle path to --path vendor/cache
[05:55:32] roamingdog: has joined #RubyOnRails
[05:56:17] roamingdog: has joined #RubyOnRails
[05:57:07] roamingdog: has joined #RubyOnRails
[05:57:54] roamingdog: has joined #RubyOnRails
[05:58:44] roamingdog: has joined #RubyOnRails
[06:05:53] jackhum: has joined #RubyOnRails
[06:12:50] sandstrom: has joined #RubyOnRails
[06:17:10] apeiros: has joined #RubyOnRails
[06:18:57] markh: has joined #RubyOnRails
[06:22:08] markh: has left #RubyOnRails: ()
[06:25:19] fragamus: has joined #RubyOnRails
[06:25:41] jackhum: has joined #RubyOnRails
[06:25:50] benlieb: has joined #RubyOnRails
[06:30:18] jbd7072: has joined #RubyOnRails
[06:40:10] dionysus69: has joined #RubyOnRails
[07:00:33] mtkd: has joined #RubyOnRails
[07:19:39] Technodrome: has joined #RubyOnRails
[07:20:02] blackmesa1: has joined #RubyOnRails
[07:22:08] conta: has joined #RubyOnRails
[07:33:14] benlieb: has joined #RubyOnRails
[07:37:36] conta: has joined #RubyOnRails
[07:43:03] Venomen: has joined #RubyOnRails
[07:43:18] sagax: has joined #RubyOnRails
[07:43:35] sagax: how to get default path to log ?
[07:43:43] sagax: where i can find this?
[07:44:12] tbuehlmann: there's a log directory in your rails app, do you mean that?
[07:44:25] sagax: yes, dir and file
[07:45:02] sagax: but how to i get path to log file in rails?
[07:51:40] tbuehlmann: this? Rails.root.join('log', 'development.log')
[07:54:18] mikecmpbll: has joined #RubyOnRails
[07:56:22] sandstrom: has joined #RubyOnRails
[08:13:35] desperek: has joined #RubyOnRails
[08:20:51] jnollette: has joined #RubyOnRails
[08:26:13] apeiros: has joined #RubyOnRails
[08:32:38] dionysus69: anyone using spiped for securing communication between servers?
[08:35:28] conta: has joined #RubyOnRails
[08:36:19] za1b1tsu: has joined #RubyOnRails
[08:42:04] Sylario: has joined #RubyOnRails
[08:42:55] sandstrom: has joined #RubyOnRails
[08:53:54] DrYockel: has joined #RubyOnRails
[09:08:25] vedu_: has joined #RubyOnRails
[09:15:18] nemesit: has joined #RubyOnRails
[09:15:27] nemesit: is there no full outer join?
[09:19:37] roamingdog: has joined #RubyOnRails
[09:26:28] vedu_: has joined #RubyOnRails
[09:28:22] fragamus: has joined #RubyOnRails
[09:29:23] ellcs: has joined #RubyOnRails
[09:41:38] schneider: has joined #RubyOnRails
[09:55:47] Puffball: has joined #RubyOnRails
[10:01:16] fragamus: has joined #RubyOnRails
[10:04:35] rikkipitt: has joined #RubyOnRails
[10:18:41] cschneid: has joined #RubyOnRails
[10:25:05] Dbugger: has joined #RubyOnRails
[10:34:15] drale2k_: has joined #RubyOnRails
[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:36:25] drale2k_: why is it turning ComputerDriVe into ComputerDriFe ... ?
[10:37:52] drale2k_: is this some rails automagic gone wrong ?
[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:39:38] sevenseacat: no, because it thinks drife pluralizes to drives
[10:43:23] conta: has joined #RubyOnRails
[10:43:26] drale2k_: thanks worked
[10:44:26] drale2k_: btw is "drifes" also correct as a plural of "drive" in english ?
[10:55:05] Terens: has joined #RubyOnRails
[10:55:12] Terens: I am getting a very strange error
[10:55:23] schneider: has joined #RubyOnRails
[10:55:26] Terens: I am getting error: fatal: Could not parse object '11f47aae0af655f9d531c1e060b1b65498badbcb'.
[10:55:43] Terens: although if I get the repository this commit is there
[10:56:08] hfp_work: has joined #RubyOnRails
[11:07:21] apeiros: has joined #RubyOnRails
[11:20:46] apparition: has joined #RubyOnRails
[11:26:17] sandstrom: has joined #RubyOnRails
[11:27:36] bonhoeffer: has joined #RubyOnRails
[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:30:24] vedu_: has joined #RubyOnRails
[11:46:39] sevenseacat: it doesnt do anything? no output at all?
[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
[11:48:11] sevenseacat: so it all works now?
[11:51:34] conta: has joined #RubyOnRails
[11:59:07] Cork: has joined #RubyOnRails
[12:04:50] vedu_: has joined #RubyOnRails
[12:07:17] bonhoeffer: has joined #RubyOnRails
[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:08:23] bonhoeffer: are there any logs I can look at
[12:12:07] sagax: after i import some module i got some methods. How to i can got - where provide some method?
[12:12:16] sagax: who provide*
[12:12:49] sagax: not class, i question about method
[12:17:57] sagax: i found, method(:some_method).source_location
[12:18:14] sagax: it's about file, but not about object
[12:22:52] psychoslave: has joined #RubyOnRails
[12:30:38] srinidhi: has joined #RubyOnRails
[12:34:26] blackmesa1: has joined #RubyOnRails
[12:57:00] pankaj: has joined #RubyOnRails
[12:57:26] pankaj: I have developed a lightweight rails app. What is the best way currently to easily deploy it?
[12:57:56] tbuehlmann: deploying to heroku is pretty easy
[12:58:15] work_: has joined #RubyOnRails
[12:59:13] samosaphile: has joined #RubyOnRails
[12:59:27] ellcs: has joined #RubyOnRails
[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:05:28] tbuehlmann: here's an article on the topic: https://devcenter.heroku.com/articles/git
[13:06:56] pankaj: tbuehlmann: OK
[13:07:10] pankaj: tbuehlmann: So, I will be deploying to github?
[13:08:04] lupine: you literally can't do that
[13:08:42] pankaj: lupine: On my git repository?
[13:09:41] vedu_: has joined #RubyOnRails
[13:14:17] za1b1tsu: has joined #RubyOnRails
[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:22:04] srinidhi: has joined #RubyOnRails
[13:22:15] tbuehlmann: samosaphile: you can initialize new rails apps with --skip-bootsnap
[13:24:14] tbuehlmann: samosaphile: may I ask why you want to get rid of it?
[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)
[13:33:59] samosaphile: does anyone use nano text editor here?
[13:42:55] uksio: has joined #RubyOnRails
[14:03:53] resting: has joined #RubyOnRails
[14:21:38] psychoslave: has joined #RubyOnRails
[14:25:07] mtkd: has joined #RubyOnRails
[14:26:15] za1b1tsu: has joined #RubyOnRails
[14:30:38] bonhoeffer: has joined #RubyOnRails
[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:35:30] drale2k_: has joined #RubyOnRails
[14:35:44] conta: has joined #RubyOnRails
[14:36:18] bonhoeffer: rails is running from /usr/local/bin/rails
[14:36:44] bonhoeffer: shouldn't that run from /Users/tim/.rbenv/versions/2.5.1/bin/ruby
[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:38:10] bonhoeffer: that seems like a problem
[14:38:13] pLaTo0n: has joined #RubyOnRails
[14:39:25] bonhoeffer: trying this page to troubleshoot: https://makandracards.com/makandra/1667-how-to-fix-gems-are-unavailable-although-they-are-installed
[14:44:28] bonhoeffer: i have this in application.rb: Bundler.require(*Rails.groups)
[14:50:04] bonhoeffer: bundle exec rails c <-- this works
[14:50:49] srinidhi: has joined #RubyOnRails
[14:51:23] blackmesa1: has joined #RubyOnRails
[14:55:37] kapil___: has joined #RubyOnRails
[14:57:13] Ergo: has joined #RubyOnRails
[15:00:32] ellcs: has joined #RubyOnRails
[15:08:48] blackmesa: has joined #RubyOnRails
[15:17:50] cschneid: has joined #RubyOnRails
[15:27:54] ebsen: has joined #RubyOnRails
[15:31:45] troys: has joined #RubyOnRails
[15:32:52] apeiros: has joined #RubyOnRails
[15:37:42] bradleyprice: has joined #RubyOnRails
[15:41:23] mtkd: has joined #RubyOnRails
[15:46:22] DaDa|Urka: has joined #RubyOnRails
[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?
[16:00:22] jcarl43: has joined #RubyOnRails
[16:14:46] mtkd: has joined #RubyOnRails
[16:21:05] Technodrome: has joined #RubyOnRails
[16:23:02] vedu_: has joined #RubyOnRails
[16:23:04] rshetty: has joined #RubyOnRails
[16:26:39] apeiros: has joined #RubyOnRails
[16:37:09] lxsameer: has joined #RubyOnRails
[16:51:01] LambdaSource: has joined #RubyOnRails
[16:53:42] lxsameer: has joined #RubyOnRails
[16:57:37] jmay: has joined #RubyOnRails
[17:01:22] drale2k_: has joined #RubyOnRails
[17:07:22] mtkd: has joined #RubyOnRails
[17:09:05] lxsameer: has joined #RubyOnRails
[17:26:32] ellcs: has joined #RubyOnRails
[17:34:53] blackmesa: has joined #RubyOnRails
[17:38:11] s2013: has joined #RubyOnRails
[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:39:21] s2013: usually use capistrano/mina but is there something simpler?
[17:43:48] jmay: has joined #RubyOnRails
[17:44:32] lxsameer: has joined #RubyOnRails
[17:47:08] sandstrom: has joined #RubyOnRails
[17:49:47] fryguy: capistrano is pretty simple
[17:49:59] fryguy: what issues do you have with it that you are trying to solve potentialy with a different tool?
[17:52:10] sandstrom: has joined #RubyOnRails
[17:57:22] benlieb: has joined #RubyOnRails
[18:01:12] Dimik: has joined #RubyOnRails
[18:01:17] johndunn: has joined #RubyOnRails
[18:17:57] s2013: has joined #RubyOnRails
[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:28:53] s2013: i know in laravel there is osmething called forge
[18:29:03] regedit: has joined #RubyOnRails
[18:31:43] regedit: (how) can i reference the request parameters within routes.rb? ex. if params['foo'] == 'bar'; match.... end
[18:31:51] ebsen: has joined #RubyOnRails
[18:32:15] regedit: NameError: undefined local variable or method `params' for #<ActionDispatch::Routing::Mapper:0x00000006112780>
[18:32:24] regedit: is what i currently get
[18:36:54] sandstrom: has joined #RubyOnRails
[18:56:22] jmay: has joined #RubyOnRails
[18:56:27] paul91: has joined #RubyOnRails
[18:57:36] lxsameer: has joined #RubyOnRails
[19:02:13] Puffball: has joined #RubyOnRails
[19:04:14] edliss: has joined #RubyOnRails
[19:05:27] ellcs: has joined #RubyOnRails
[19:06:43] arup_r: has joined #RubyOnRails
[19:07:35] lxsameer: has joined #RubyOnRails
[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
[19:09:44] mtkd: has joined #RubyOnRails
[19:11:12] sagax: has joined #RubyOnRails
[19:17:51] s2013: has joined #RubyOnRails
[19:40:35] ebsen: has joined #RubyOnRails
[19:45:29] Aherin: has joined #RubyOnRails
[19:48:23] blackmesa: has joined #RubyOnRails
[19:49:35] psychoslave: has joined #RubyOnRails
[19:59:00] s2013: has joined #RubyOnRails
[20:03:38] paul91: has left #RubyOnRails: ()
[20:06:05] bonhoeffer: has joined #RubyOnRails
[20:06:49] ellcs: has joined #RubyOnRails
[20:07:16] bonhoeffer: it is a problem to have multiple paths for rubygem paths
[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
[20:13:23] bonhoeffer: my guess is that i need to get this in my path: /Users/tim/.rbenv/shims/
[20:16:32] benlieb: has joined #RubyOnRails
[20:16:55] NoGodDamnIdea: has joined #RubyOnRails
[20:21:51] jmay: has joined #RubyOnRails
[20:24:12] cagomez: has joined #RubyOnRails
[20:27:52] daemonwrangler: has joined #RubyOnRails
[20:37:44] daemonwrangler: has joined #RubyOnRails
[20:41:57] sameerynho: has joined #RubyOnRails
[20:52:39] NoGodDamnIdea: has joined #RubyOnRails
[20:53:40] benlieb: has joined #RubyOnRails
[20:58:15] benlieb: has joined #RubyOnRails
[21:02:06] jmay: has joined #RubyOnRails
[21:03:26] fragamus: has joined #RubyOnRails
[21:05:20] benlieb: has joined #RubyOnRails
[21:18:02] benlieb: has joined #RubyOnRails
[21:19:51] daemonwrangler: has joined #RubyOnRails
[21:32:34] jottr: has joined #RubyOnRails
[21:33:05] agent_white: has joined #RubyOnRails
[21:36:00] bonhoeffer: has joined #RubyOnRails
[21:42:10] benlieb: has joined #RubyOnRails
[21:45:05] s2013: has joined #RubyOnRails
[21:48:30] DTZUZO: has joined #RubyOnRails
[21:59:29] jmay: has joined #RubyOnRails
[22:06:50] FernandoBasso: has joined #RubyOnRails
[22:09:22] DrYockel1: has joined #RubyOnRails
[22:12:30] johndunn: has left #RubyOnRails: ()
[22:13:14] benlieb: has joined #RubyOnRails
[22:19:13] blackmesa: has joined #RubyOnRails
[22:34:38] FernandoBasso: has joined #RubyOnRails
[22:37:32] ellcs: has joined #RubyOnRails
[22:50:36] akaiiro: has joined #RubyOnRails
[22:52:47] Technodrome: has joined #RubyOnRails
[23:08:42] blackmesa: has joined #RubyOnRails
[23:11:40] ellcs: has joined #RubyOnRails
[23:14:35] benlieb: has joined #RubyOnRails
[23:27:00] jottr: has joined #RubyOnRails
[23:30:14] lunarkitty7: has joined #RubyOnRails
[23:30:22] bonhoeffer: has joined #RubyOnRails
[23:38:20] jmay: has joined #RubyOnRails
[23:47:12] hfp_work: has joined #RubyOnRails