havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.2.0, 3.1.3, 3.0.5, 2.7.7: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://t.ly/9ua4 | Logs: https://libera.irclog.whitequark.org/ruby/
ur5us has quit [Ping timeout: 252 seconds]
supay has quit [Quit: Connection closed for inactivity]
Aminda has quit [Ping timeout: 255 seconds]
Aminda has joined #ruby
hansolo has quit [Remote host closed the connection]
NightMonkey has quit [Quit: ZNC - http://znc.in]
NightMonkey has joined #ruby
cahoots has joined #ruby
<cahoots> hi, is there any ruby std lib function that takes a block and returns either the result of the block, or nil if an uncaught exception occurred within it?
Linux_Kerio has quit [Ping timeout: 268 seconds]
<weaksauce> doesn't sound like a thing cahoots but also doesn't sound very hard to write yourself as a wrapper
<weaksauce> def wrap(&block); block.call rescue nil end
<cahoots> yeah
hansolo has joined #ruby
gastus has quit [Ping timeout: 248 seconds]
ur5us has joined #ruby
NightMonkey has quit [Quit: ZNC - http://znc.in]
NightMonkey has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
kovital has joined #ruby
Aminda has quit [Ping timeout: 255 seconds]
Aminda has joined #ruby
kovital has quit [Quit: Best CPUs can count to infinity twice without being bugged out by zero division errors or whatnot.]
cahoots has joined #ruby
razetime has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
gastus has joined #ruby
cahoots has quit [Ping timeout: 268 seconds]
gastus_ has joined #ruby
gastus has quit [Ping timeout: 248 seconds]
willow has left #ruby [#ruby]
quazimodo has quit [Ping timeout: 252 seconds]
quazimodo has joined #ruby
ox1eef_ has quit [Quit: WeeChat 3.7]
ox1eef_ has joined #ruby
razetime has quit [Ping timeout: 248 seconds]
matoro- has quit [Ping timeout: 264 seconds]
dviola has quit [Quit: WeeChat 3.7.1]
matoro- has joined #ruby
cahoots has joined #ruby
Sankalp has quit [Ping timeout: 268 seconds]
Sankalp has joined #ruby
razetime has joined #ruby
tomtmym has joined #ruby
tomtmym has quit [Changing host]
tomtmym has joined #ruby
cahoots has quit [Ping timeout: 248 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
cahoots has joined #ruby
quazimodo has quit [Ping timeout: 248 seconds]
teclator has joined #ruby
cahoots has quit [Ping timeout: 248 seconds]
quazimodo has joined #ruby
cahoots has joined #ruby
cahoots has quit [Ping timeout: 260 seconds]
cahoots has joined #ruby
infinityfye has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 248 seconds]
cahoots has joined #ruby
dionysus69 has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
cahoots has joined #ruby
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
dittonedo has joined #ruby
Linux_Kerio has joined #ruby
FullMetalStacker has joined #ruby
FullMetalStacker has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Sankalp has quit [Ping timeout: 248 seconds]
Sankalp has joined #ruby
dittonedo has quit [Quit: Leaving]
razetime has quit [Read error: Connection reset by peer]
razetime has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
Guest6344 has joined #ruby
Guest6344 has quit [Excess Flood]
Guest6344 has joined #ruby
Guest6344 has quit [Excess Flood]
Guest6344 has joined #ruby
Guest6344 has quit [Excess Flood]
cahoots has joined #ruby
mollerup has quit [Remote host closed the connection]
niv has quit [Quit: Powered by LunarBNC: https://LunarBNC.net]
cahoots has quit [Ping timeout: 252 seconds]
cybniv has joined #ruby
cahoots has joined #ruby
cahoots has quit [Ping timeout: 256 seconds]
quazimodo has quit [Ping timeout: 260 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
clemens3 has quit [Quit: WeeChat 2.7]
clemens3 has joined #ruby
cahoots has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
razetime has quit [Remote host closed the connection]
aeris has quit [Ping timeout: 255 seconds]
aeris has joined #ruby
cahoots has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
gastus_ has quit [Ping timeout: 260 seconds]
FullMetalStacker has joined #ruby
gastus has joined #ruby
cahoots has joined #ruby
cahoots has quit [Ping timeout: 248 seconds]
Tempesta has quit [Quit: AdiIRC is updating to v4.3]
Tempesta has joined #ruby
cahoots has joined #ruby
meimei has quit [Remote host closed the connection]
pounce has quit [Remote host closed the connection]
meimei has joined #ruby
pounce has joined #ruby
konsolebox has joined #ruby
cek has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
Jonopoly has joined #ruby
Jonopoly has quit [Quit: WeeChat 3.0]
Jonopoly has joined #ruby
konsolebox has quit [Quit: Leaving]
Guest46 has joined #ruby
<Guest46> Hello 👋, I am not a Rubyist yet, but I need assitance editing a PDF created in Ruby.
<adam12> Guest46: Using Prawn or similar?
<Guest46> Prawn
<siasmj> Prawn is a great Ruby library for generating PDFs https://github.com/prawnpdf/prawn
<Guest46> Am pretty new to this: so here goes my question : end
<Guest46> pdf.move_down 36
<Guest46> :end  and pdf.move_down 36 (what doesthat indicate?)
<Guest46> on the PDF.
jidar has joined #ruby
cahoots has joined #ruby
<adam12> Guest46: It moves 36 points down from the current position. Here's the docs: http://gemdocs.org/gems/prawn/2.4.0/Prawn/Document.html#move_down-instance_method
cahoots has quit [Ping timeout: 248 seconds]
aeris has quit [Quit: ZNC - http://znc.sourceforge.net]
<Guest46> Thank you! Very helpful.
aeris has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
FullMetalStacker has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
moldorcoder7 has joined #ruby
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
yxhuvud has joined #ruby
Jonopoly has quit [Quit: WeeChat 3.0]
Guest46 has quit [Quit: Client closed]
cek has quit [Quit: Connection closed for inactivity]
jidar has quit [Quit: Remote host closed the connection]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 268 seconds]
teclator has quit [Ping timeout: 260 seconds]
bovis has joined #ruby
<bovis> https://bpa.st/FK53I I'm having trouble installing a gem (ruby bindings for mapnik https://github.com/mapnik/Ruby-Mapnik). The error is that compilation can't find a file rice/Enum.cpp. I have installed the rice gem, and the file does exist in /usr/lib/ruby/gems/3.1.0/gems/rice-4.0.4/rice/. What can I do?
cahoots has joined #ruby
cahoots has quit [Ping timeout: 255 seconds]
weaksauc_ has joined #ruby
weaksauce has quit [Ping timeout: 260 seconds]
<adam12> bovis: Seems like a missing dependency.
<adam12> bovis: what platform? and if linux, what distro?
teclator has joined #ruby
<bovis> adam12: Alpine Linux. The gem calls for rake (for compilation), rice, and rcairo as dependencies. Those all installed without an issue.
<adam12> bovis: ruby version
<adam12> bovis: and rubygems version? (gem --version)
<bovis> adam12: 3.1.3 for ruby, 3.3.26 for gem
<adam12> bovis: I wonder if you're affected by this... https://github.com/rubygems/rubygems/issues/6205
<adam12> I've never seen a gem depend on another gem's .h file tho.. so I might be wrong.
hightower4 has joined #ruby
<adam12> Oh, maybe not. It does find another header file.
<adam12> bovis: Can you make a paste of this? `ls -fl /usr/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include`
<adam12> Rather, `/usr/lib/ruby/gems/3.1.0/gems/rice-4.0.4/include/rice` (rice on the end)
hightower3 has quit [Ping timeout: 260 seconds]
<bovis> adam12: Two files: stl.hpp and rice.hpp
<adam12> I don't see that Enum file in the source. https://github.com/jasonroelofs/rice/tree/master/include/rice
<adam12> I wonder if this file would generating them. https://github.com/jasonroelofs/rice/blob/master/make_rice_headers.rb
<adam12> Actually, it looks like it generates those two files by combining headers.
<adam12> Maybe you can go back a rice version.
<adam12> gem install rice -v "~> 3.0"
<adam12> That might not work 100% because you'll need to force that version of rice.
<adam12> You could uninstall rice v4 as a hack. `gem uninstall rice -v "4.0"`. Then as long as you only have `gem list -l rice` as 3.0, it might all work.
<adam12> ^ bovis
<bovis> adam12: Installing rice 3.0 and then trying mapnik again gave the same error as before
<adam12> bovis: What does that include folder look like?
<adam12> bovis: Path might be different. Get the new path from the broken gem install.
teclator has quit [Ping timeout: 252 seconds]
cahoots has joined #ruby
<adam12> bovis: Could try 2.2.0 too. I don't actually know which version you want, but it's the one before they amalgamated headers.
<bovis> adam12: Interesting. Uninstalling rice v4 and trying install mapnik again gives a long list of errors. https://bpa.st/BXVQK With rice v3, the include folder doesn't exist, but here's the output of 'ls -fl /usr/lib/ruby/gems/3.1.0/gems/rice-3.0.0/ruby/lib/include/rice/' http://sprunge.us/YXzk5J
<adam12> bovis: Might still be worth going back to rice 2.2.0. Uninstall rice 3.
infinityfye has quit [Quit: Leaving]
cahoots has quit [Ping timeout: 248 seconds]
<adam12> bovis: Actually, looking closer at that error, I bet rice is fine now but mapnik is the issue.
<adam12> You can try going further down the rice version list, but I bet it won't change anything. How did you install mapnik?
<bovis> adam12: Alpine has a package for mapnik.
<adam12> bovis: Does Alpine split dev/headers? ie. mapnik-dev or similar?
cahoots has joined #ruby
<bovis> adam12: Yes. There's a package for mapnik-dev. Hadn't thought to try that...
<bovis> adam12: rice 2.2.0 didn't work. rice 2.2.0 with the mapnik-dev package didn't work. rice 4 with the -dev package didn't work (same error as originally)
cahoots has quit [Ping timeout: 246 seconds]
<adam12> bovis: What's the error with rice 3? Can you paste current version? And confirm mapnik version is one supported by ruby-mapnik.
<adam12> bovis: Outside of this, I dont have any ideas.
eikoakiba has joined #ruby
eikoakiba has left #ruby [#ruby]
<bovis> adam12: What did you want the current version of? Error for 'install mapnik' with rice 3 is https://bpa.st/56L5M. The ruby-mapnik gem is old, circa 2015.
<adam12> bovis: ruby-mapnik has this listed in readme. Mapnik 2.3.x or 2.2.x (Currently available at github.com/mapnik/mapnik). https://pkgs.alpinelinux.org/packages?name=mapnik&branch=edge&repo=&arch=&maintainer= shows 3.1.0 as installed version.
<bovis> adam12: I figured the mapnik package would be updated. The initial error looked to be with rice, so I hadn't thought about interaction with the gem and mapnik.
jidar has joined #ruby
desnudopenguino has quit [Ping timeout: 255 seconds]
cahoots has joined #ruby
jidar has quit [Quit: Remote host closed the connection]
cahoots has quit [Ping timeout: 268 seconds]
<adam12> bovis: I suspect your new error is related to mapnik from Alpine being too new.
<bovis> adam12: Rolling back the package will be a little bit of work. I'll make the changes later. Thanks for all the help so far.
<adam12> bovis: cheers.
desnudopenguino has joined #ruby
teclator has joined #ruby
cahoots has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
teclator has quit [Ping timeout: 248 seconds]
ur5us has joined #ruby
cahoots has joined #ruby
cahoots has quit [Ping timeout: 248 seconds]
jidar has joined #ruby
cahoots has joined #ruby
cahoots has quit [Ping timeout: 255 seconds]
teclator has joined #ruby
teclator has quit [Ping timeout: 255 seconds]
hightower3 has joined #ruby
cahoots has joined #ruby
hightower4 has quit [Ping timeout: 252 seconds]
cahoots has quit [Ping timeout: 252 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 248 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
cahoots has joined #ruby
cahoots has quit [Ping timeout: 248 seconds]
cahoots has joined #ruby
tomtmym has quit [Quit: Gone.]
cahoots has quit [Ping timeout: 248 seconds]
moldorcoder7 has quit [Ping timeout: 246 seconds]
cahoots has joined #ruby
CrazyEddy has quit [Ping timeout: 252 seconds]
Linux_Kerio has quit [Ping timeout: 252 seconds]
CrazyEddy has joined #ruby
cahoots has quit [Ping timeout: 248 seconds]