« Back to channel list

#RubyOnRails - 26 June 2019

« Back 1 day
[00:16:45] ellcs: has joined #RubyOnRails
[01:14:12] sevenseacat: has joined #RubyOnRails
[01:28:58] ellcs: has joined #RubyOnRails
[01:36:43] IGnorAND: ACTION is going crazy with these rails deps. 
[01:36:45] IGnorAND: I keep getting uninitialized constant
[01:36:57] IGnorAND: The gems exist
[01:39:59] dviola: has joined #RubyOnRails
[01:41:55] Technodrome: has joined #RubyOnRails
[01:42:19] sevenseacat: can you show a specific example?
[01:42:54] IGnorAND: sevenseacat: well, I'm still troubleshooting what's wrong here
[01:43:04] IGnorAND: just needed to rant
[01:43:25] IGnorAND: NameError: uninitialized constant FactoryBot
[01:43:51] IGnorAND: Just then it was my shouldamatchers. I commented those out and then this appears
[01:43:59] IGnorAND: there must be something wrong
[01:44:39] IGnorAND: and I do a bundle install --with development test and yet :S
[01:45:33] IGnorAND: I think the gems arent including their dependancies
[01:50:38] IGnorAND: added a require 'factory_bot' and its gone, now I have a undefined local variable or method `shouldaDatabaseCleaner'. sigh
[02:15:40] cschneid: has joined #RubyOnRails
[02:19:22] crankharder: has joined #RubyOnRails
[02:21:51] rodd: I've been trying to push a dockerized rails app to production for the past couple days, when I start the application with puma -C config/puma.rb its workers timeout: [1] ! Terminating timed out worker: 8
[02:21:53] rodd: Any ideas?
[02:22:34] rodd: I can't find a way to debug / see why it's timing out, no logs or anything that helps
[02:25:34] atrius: has joined #RubyOnRails
[02:27:14] duderonomy: has joined #RubyOnRails
[02:41:57] frewsxcv: anyone know if these are the same? Integer(n, exception: false) and n.to_i
[02:47:09] mochiyoda_: has joined #RubyOnRails
[02:47:22] _aeris: has joined #RubyOnRails
[02:57:35] rodd: nvm figured out
[02:59:01] sandstrom: has joined #RubyOnRails
[03:10:09] timdotrb: has joined #RubyOnRails
[03:10:55] braincrash: has joined #RubyOnRails
[03:14:07] ellcs: has joined #RubyOnRails
[03:15:45] Saukk: has joined #RubyOnRails
[03:34:47] Caerus: I'm down a rabbit hole... title = Net::HTTP.get(URI.parse('https://www.youtube.com/watch?v=k6BL1GOXgp8')).scan(/<title>(.*?)<\/title>/).flatten.join works perfectly from irb.
[03:35:14] Caerus: but when I use that exact line on an activejob it doesn't get the title
[03:35:24] sevenseacat: what does it get?
[03:36:04] Caerus: it only happens with youtube
[03:44:36] havenwood: frewsxcv: No, they're not the same - but they're similar.
[03:45:14] havenwood: frewsxcv: #to_i is more permissive - it'll be more likely to turn a thing into a number, even if it's not quite right
[03:45:36] havenwood: frewsxcv: ''.to_i #=> 0
[03:45:44] havenwood: frewsxcv: Integer('', exception: false) #=> nil
[03:48:13] havenwood: '1100101x'.to_i(16) #=> 17826049
[03:48:17] havenwood: Integer('1100101x', 16, exception: false) #=> nil
[03:48:45] havenwood: Integer('1100101', 16, exception: false) #=> 17826049
[03:50:11] havenwood: frewsxcv: #Integer doesn't ignore trailing extraneous characters and it doesn't presume a 0 when there's no valid number at the start.
[04:05:54] m_antis_: has joined #RubyOnRails
[04:06:02] s00pcan: has joined #RubyOnRails
[04:13:06] uplime: has joined #RubyOnRails
[04:51:05] sandstrom: has joined #RubyOnRails
[04:57:49] armyriad: has joined #RubyOnRails
[05:06:20] uplime: has joined #RubyOnRails
[05:20:43] conta: has joined #RubyOnRails
[05:20:43] alxgsv: has joined #RubyOnRails
[05:26:38] srinidhi: has joined #RubyOnRails
[06:00:25] schneider: has joined #RubyOnRails
[06:02:58] conta: has joined #RubyOnRails
[06:04:10] sevenseacat: has joined #RubyOnRails
[06:08:51] srinidhi: has joined #RubyOnRails
[06:20:03] ZAJDAN: who use gem wkhtmltopdf?
[06:23:48] sevenseacat: if you have a question about it, just ask
[06:24:18] Technodrome: has joined #RubyOnRails
[06:25:08] ZAJDAN: sevenseacat: probably Iam blind, I can to find some documentation how to use
[06:26:08] sevenseacat: you'd typically use it through some other pdf generation library such as wicked_pdf
[06:27:05] ZAJDAN: what? I have to use nex one gem for the pdf?
[06:27:46] ZAJDAN: I though that the gem wkhtmltopdf is all I need
[06:29:17] sevenseacat: its a cli tool.
[06:29:55] ZAJDAN: ok....you mean install it into OS
[06:30:32] sevenseacat: what are you trying to do?
[06:30:40] ZAJDAN: this I already have..I installed wkhtmltopdf(CLI) into my OS(Debian)...
[06:30:55] ZAJDAN: the library itself
[06:31:22] ZAJDAN: then I installed gem wkhtmltopdf into Rails
[06:33:19] ZAJDAN: or the wicked-pdf is something next?
[06:33:28] sevenseacat: what are you trying to do?
[06:34:09] ZAJDAN: generate PDF from my APP
[06:34:36] sevenseacat: then yes, you need a pdf library like wicked pdf.
[06:35:03] sevenseacat: https://github.com/mileszs/wicked_pdf
[06:35:07] ZAJDAN: I was confused what all I need
[06:35:35] ZAJDAN: but now I understand ....gem 'wkhtmltopdf-binary' is in fact the binary .....
[06:35:55] sevenseacat: you should ask your actual questions, not random things
[06:37:20] ZAJDAN: you do not understand me..... I thought that gem 'wkhtmltopdf-binary' is the library, but now I see that not...it is binary of the wkhtmltopdf itself
[06:38:08] ZAJDAN: cause I have wkhtmltopdf also in my system 'OS' out of rails
[06:39:54] Technodrome: has joined #RubyOnRails
[06:40:00] ZAJDAN: usualy wrapper/library can use wkhtmltopdf directly from system ...in PHP case
[06:40:15] sevenseacat: yep, wicked_pdf is the wrapper.
[06:43:01] ZAJDAN: when I will not install wkhtml(binary) via gem, but directly into OS ...are Rails/wicked_pdf able use the wkhtmltopdf in this way or the gem must be installed?
[06:43:19] sevenseacat: you should check the wicked_pdf docs
[06:43:43] sevenseacat: or even just the readme
[06:45:30] ZAJDAN: You personally use it?
[06:46:59] ZAJDAN: are you glad..works well?
[06:47:34] ZAJDAN: you probably run on Apple yes?
[06:48:29] sevenseacat: again, ask your actual questions.
[06:49:30] ZAJDAN: sorry I will not disturb you
[07:01:29] ZAJDAN: render :pdf => "my_pdf_name.pdf", ......VS...... render pdf: "my_pdf_name.pdf",
[07:02:10] ZAJDAN: way of the syntax is optional or it depends on version of rails?
[07:02:22] sevenseacat: they're exactly the same thing.
[07:02:54] ZAJDAN: => is newer way?
[07:04:19] sandstrom: has joined #RubyOnRails
[07:05:54] ZAJDAN: I do not understand for what is in render pdf ..... :template => "controller_name/show.pdf.erb",
[07:06:55] ZAJDAN: I just want to send values and fill them into some view which should be rendered into PDF
[07:09:59] ZAJDAN: aha I do not need use the option template...just :layout ..in my case
[07:19:29] ZAJDAN: fuck! after that I installed gem wicked_pdf : LoadError Unable to autoload constant CommissionsController, expected /home/zajdan/prod_commission/app/controllers/commissions_controller.rb to define it
[07:20:09] ZAJDAN: raise LoadError, "Unable to autoload constant #{qualified_name}, expected #{file_path} to define it" unless from_mod.const_defined?(const_name, false)
[07:21:05] ZAJDAN: ok...restart PUMA solved it
[07:26:30] schneider: has joined #RubyOnRails
[07:32:18] jefffrails35: has joined #RubyOnRails
[07:43:39] srinidhi: has joined #RubyOnRails
[07:55:41] mikecmpbll: has joined #RubyOnRails
[08:07:35] ZAJDAN: anybody here?
[08:09:52] conta: has joined #RubyOnRails
[08:15:26] Technodrome: has joined #RubyOnRails
[08:30:21] deepredsky: has joined #RubyOnRails
[08:32:31] srinidhi: has joined #RubyOnRails
[09:05:54] dtzuzu: has joined #RubyOnRails
[09:17:31] NL3limin4t0r: ZAJDAN: Srry can't help you. I have little to no experience in rendering PDF files from a RoR server.
[09:17:47] Technodrome: has joined #RubyOnRails
[09:20:51] ZAJDAN: Nl3limin...Hope somebody could help: https://github.com/mileszs/wicked_pdf/issues/844
[09:22:14] ZAJDAN: wkhtmltopdf I use in PHP without problem ... there I understood quickly
[09:22:27] ZAJDAN: but in Rails Iam confuse
[09:30:26] m_antis: has joined #RubyOnRails
[09:42:18] quazimodo: has joined #RubyOnRails
[09:42:29] quazimodo: has joined #RubyOnRails
[09:44:34] mikecmpb_: has joined #RubyOnRails
[09:54:35] conta: has joined #RubyOnRails