AndreYuhai has quit [Remote host closed the connection]
AndreYuhai has joined #ruby
ur5us has quit []
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AndreYuhai has quit [Remote host closed the connection]
AndreYuhai has joined #ruby
queip has quit [Ping timeout: 272 seconds]
fphilipe_ has quit [Ping timeout: 276 seconds]
queip has joined #ruby
ur5us has joined #ruby
fphilipe_ has joined #ruby
fphilipe has joined #ruby
fphilipe_ has quit [Ping timeout: 264 seconds]
sauvin has joined #ruby
conta has joined #ruby
Thenekofell has quit [Ping timeout: 245 seconds]
aither has joined #ruby
lightstalker has quit [Ping timeout: 258 seconds]
teardown has joined #ruby
Swyper has joined #ruby
ramfjord has joined #ruby
lightstalker has joined #ruby
conta has quit [Ping timeout: 272 seconds]
conta has joined #ruby
ramfjord has quit [Ping timeout: 258 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
schneider has joined #ruby
absolutejam has joined #ruby
ur5us has quit [Ping timeout: 272 seconds]
gix has quit [Ping timeout: 272 seconds]
ferhaty has joined #ruby
Swyper has quit [Remote host closed the connection]
absolutejam has quit [Ping timeout: 246 seconds]
Thenekofell has joined #ruby
sauvin has quit [Ping timeout: 248 seconds]
schneider has quit [Ping timeout: 248 seconds]
snickers has joined #ruby
snickers has quit [Remote host closed the connection]
andikr has joined #ruby
lxsameer has joined #ruby
drnerdius has joined #ruby
prestorium has joined #ruby
leah2 has joined #ruby
absolutejam has joined #ruby
priodev has quit [Ping timeout: 258 seconds]
TomyWork has joined #ruby
sauvin has joined #ruby
hope_canyon has quit [Quit: Leaving]
priodev has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aupadhye has joined #ruby
absolutejam1 has quit [Quit: WeeChat 2.5]
schneider has joined #ruby
bitwinery has joined #ruby
wopi has joined #ruby
ramfjord has joined #ruby
<wopi>
Hi, it's safe to upgrade from Puma 3.x to Puma 4.x? I can't see any related information. I mean is it a drop in replacement or are there changes I have to do in my application?
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snickers has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
<Lewix>
im lookin . for a public url . that . timeout
<Yxhuvud>
So why was the major number increased? less support of old rubies?
conta has joined #ruby
jenrzzz has joined #ruby
themsay has quit [Ping timeout: 245 seconds]
fphilipe has joined #ruby
dhollinger has joined #ruby
leitz has joined #ruby
<havenwood>
Yxhuvud: Not even old Rubies deprecated afaik. There was a commit that touches the tight loop portion of the thread pool, but it didn't change much.
<leitz>
I need to figure out why my rspec test fails sometimes.
arand has quit [Remote host closed the connection]
themsay has joined #ruby
dantey has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
queip has quit [Ping timeout: 258 seconds]
brahmana has joined #ruby
Nicmavr has joined #ruby
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
queip has joined #ruby
ramfjord has joined #ruby
ferhaty has quit [Quit: ferhaty]
fphilipe has quit [Ping timeout: 258 seconds]
<brahmana>
Hi.. I have libssl1.0 and libssl1.1 (both) installed on my Ubuntu 18.04 machine. I am trying to build Ruby 2.2.10 on this. The build and install are successful but require 'openssl' doesn't work
<leitz>
brahmana, "require 'openssl'" in your ruby code, or in the compile?
<leitz>
Usually it's operator error. Okay, it's always operator error. But in the data set, I'm using curl to pull a POST. The average "speed" reported by curl is in the 50,00 - 70,000 range. However, sometimes the speed is faster that 300K, and those times the output doesn't have what it's supposed to.
<leitz>
The machine I'm on is void linux, patched, and just me sitting here. No real apps running except Firefox and HexChat. OS load is less than 0.2.
<brahmana>
leitz : "require 'openssl'" in IRB.
<leitz>
brahmana, openssl is a gem. Have you installed it?
<brahmana>
Actually I encountered the error when I tried to install bundler with "gem install bundler"
<leitz>
brahmana, hmmm... does Ubuntu have an "openssl-dev" package? Often compilers need the development tools for the topic, like openssl.
<brahmana>
Yes, I have the libssl1.0-dev installed
<leitz>
How about for 1.1, since you have both installed? Did the compile show any errors?
<brahmana>
leitz : Btw, I did not know that I need to install the openssl gem separately. I thought it was a ruby extension installed along with ruby if not explicitly disabled during ./configure step
<leitz>
I usually remember the -devel packages *after* the compile logs tell me they missed something.
<brahmana>
make and make install worked without any issues.
<leitz>
brahmana, I'd try 'gem install openssl' to see.
dantey has quit [Quit: leaving]
bitwinery has quit [Quit: Leaving]
dantey has joined #ruby
DaRock has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 246 seconds]
Tuor has joined #ruby
<brahmana>
leitz : gem install openssl is not an option :
<brahmana>
ERROR: While executing gem ... (Gem::Exception) Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
<brahmana>
From the out of the "./configure" can I find out which openssl library / header files are being used
<brahmana>
Or whether ruby is being compiled with OpenSSL or not?
<leitz>
You should be able to. When I compile I usually make a separate log for configure, make, make install, etc.
<brahmana>
Ok, I ran ./configure and I now have the config.log but it does not mention ssl anywhere
sphenxes has joined #ruby
conta has quit [Ping timeout: 258 seconds]
fphilipe has joined #ruby
reber has joined #ruby
<leitz>
brahmana, can you post that log, and the make log, in a gist? I have a few minutes if you want me to look over it.
<brahmana>
leitz gem install is stuck because of a proxy issue. The machine is behind a proxy and gem tool doesn't seem to be picking up the http_proxy env var
<brahmana>
leitz it seems to be working...
<brahmana>
leitz : Worked... !!
<brahmana>
bundler was successfully installed
<brahmana>
leitz : Thank you
queip has joined #ruby
conta has joined #ruby
<leitz>
Yay!
<leitz>
My guess is that the configure was built before you had the ssl libraries installed. Running autoconf is probably what fixed that.
<brahmana>
I actually did not run autoconf.. your first part is correct I think
<brahmana>
I was running apt install to install a bunch of dev dependencies for compiling Ruby. I most likely started ./configure in parallel in a different shell
<brahmana>
I do not precisely remember.. but most likely that is the case
<brahmana>
So configure finished before apt install could install libssl1.0-dev
<leitz>
Does the current configure script include ssl?
<brahmana>
The configure output?
<brahmana>
or the configure script itself?
<leitz>
Either.
<leitz>
The first time it did not.
<leitz>
Hmm..mine doesn't either. False trail, I think.
<dionysus69>
I failed to point Gemfile gem path to point to my local gem
<dionysus69>
does anyone have example on how to import a local .gem file
<brahmana>
Yeah, configure does not have anything like ssl
<brahmana>
make and make install outputs have it though
<leitz>
dionysus69, you should just be able to "gem install <my-cool_gem>", if you're in the same directory as the gem file.
<leitz>
brahmana, then it looks like Ruby builds with SSL if you have it installed, without a specific configure command. Cool.
<brahmana>
yeah.. looks like it
<brahmana>
Since require 'openssl' is now working in irb, I believe we can say that gem install 'openssl' is not needed as it comes packages with Ruby itself
evdubs_ is now known as evdubs
<dionysus69>
leitz: and it will use locally installed gem and not fetch from rubygems? because I also have it on rubygems
<dionysus69>
ok I think I understood how it will work
<dionysus69>
I will bump minor version, rebuild install and then use it in another gemfile using different version
ixti has quit [Ping timeout: 245 seconds]
<leitz>
brahmana, openssl is a gem, but it may be a part of the core Ruby build or standard library. I'm not sure, thought.
<leitz>
though.
<leitz>
dionysus69, if you have one installed locally, and you 'require my_gem', then it should not try to fetch from rubygems.
<leitz>
I thought you meant "Install a gem from a file I have locally".
<leitz>
My coffee is wearing off...
mniip has quit [Quit: This page is intentionally left blank.]
mniip has joined #ruby
<dionysus69>
leitz: worked without require too :), just specified gem "", "version"
<dionysus69>
thanks!
<dionysus69>
that's what I did yes, I installed file locally
<leitz>
Ah, cool!
<dionysus69>
cause I dont wanna release a gem on every minor change
<dionysus69>
would be very taxing on rubygems.org too :D
<leitz>
Agreed! I'm re-doing stuff on one of my gems and will re-publish when it's at a usable state. You have to balance deployment and stability.
<dionysus69>
I am starting to like this gem ecosystem, turned out to be so simple, building my rails engine/plugin as a gem now ^.^
misterioso has quit [Quit: Connection closed for inactivity]
chalkmonster has quit [Quit: WeeChat 2.5]
mcspud has quit [Ping timeout: 268 seconds]
mcspud has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 268 seconds]
AJA4350 has joined #ruby
brahmana has quit [Ping timeout: 260 seconds]
lucasb has joined #ruby
absolutejam has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
Swyper has joined #ruby
Obats has joined #ruby
<Obats>
Hey guys, ruby newbie. Deep inside Mustache I get "Unknown error (class: Encoding::CompatibilityError): incompatible character encodings: UTF-8 and ASCII-8BIT", and then a stacktrace. Now, I get what the encodings part means, but how to find out which string(s) that are causing this error? Can I somehow enable extended error output, or something?
Swyper has quit [Remote host closed the connection]
<Obats>
It would probably solve the problem if I could just see the strings(it has to be something comparing two strings, right?)..
dantey has quit [Ping timeout: 272 seconds]
<leitz>
Obats, I'm not familiar with Mustache, but the stack trace should give you more. You can also put "$VERBOSE = true" at the top of your Ruby code, in some cases it gives more detail.
<leitz>
Maybe post a gist of the output?
absolutejam has joined #ruby
<Obats>
leitz: It's a template engine. I'll just give $VERBOSE a quick try
<Obats>
(thanks :))
za1b1tsu has quit [Remote host closed the connection]
<Obats>
leitz: https://pastebin.com/RK63A4QJ (I added linebreaks) If you - or anyone else - would feel like having a look.. It's just the stack though, no context or environment data of any kind =[
<ruby[bot]>
Obats: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
DaRock has joined #ruby
drnerdius has quit [Read error: Connection reset by peer]
drnerdius has joined #ruby
<Obats>
Ok, I just got a message from ruby about not using pastebin. Does that mean that you can't see my post with the pastebin link? (No harm intended, first time I'm here)
<leitz>
Obats, I'm a newbie, so when the smart folks show up, listen to them. I can see your paste, just just gist next time.
<leitz>
The errors go from most specific to parentage, so the first few lines are often where the issues are. The other bits are how you got there.
<adam12>
Obats: Is this your project? or something you've downloaded?
<adam12>
Obats: That mustache version is _ancient_.
brahmana has quit [Remote host closed the connection]
vondruch has quit [Ping timeout: 268 seconds]
<Obats>
adam12: I'm one of the grunts working on that project
deepreds1 has quit [Ping timeout: 245 seconds]
<Obats>
..and yes, I noticed there's 1.1.0 out now, not sure if that would help here, but it's perhaps worth a shot
<adam12>
Obats: I'd try updating Mustache. Also, in mail_renderer.rb, I'm presuming you're calling Mustache.render or something similar, perhaps with a locals hash. I'd start checking those variables for their encodings.
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
deepreds1 has joined #ruby
aupadhye has quit [Ping timeout: 272 seconds]
deepreds1 has quit [Ping timeout: 246 seconds]
drnerdius has quit [Ping timeout: 245 seconds]
<leitz>
Obats, adam12 is one of the "smart folks" I mentioned earlier. :)
Obats has joined #ruby
schneider has quit [Ping timeout: 245 seconds]
absolutejam has joined #ruby
drnerdius has joined #ruby
DTZUZO has joined #ruby
skryking has quit [Quit: WeeChat 2.4]
akem-lnvo has quit [Ping timeout: 244 seconds]
deepreds1 has joined #ruby
involans has joined #ruby
ZAJDAN has quit [Quit: Konversation terminated!]
aupadhye has joined #ruby
drnerdius has quit [Ping timeout: 248 seconds]
akem-lnvo has joined #ruby
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
ramfjord has joined #ruby
<Obats>
adam12: Yes, that's exactly what I am working on, checking the encoding of the variables. And yes, .render() is called :). I started using Ruby this morning though(sorry..). So I'm learning how to traverse an array with all kinds of types of data to print them, with the encoding if it's a string, etc..
jenrzzz has quit [Ping timeout: 244 seconds]
dantey has joined #ruby
conta has quit [Quit: conta]
ramfjord has quit [Ping timeout: 245 seconds]
za1b1tsu has joined #ruby
involans has quit [Remote host closed the connection]
Inline has joined #ruby
Esa_ has joined #ruby
Swyper has quit [Remote host closed the connection]
orbyt_ has joined #ruby
Snowy has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dbugger has quit [Ping timeout: 264 seconds]
dbugger has joined #ruby
madhatter has quit [Remote host closed the connection]
misterioso_ has joined #ruby
absolutejam has quit [Ping timeout: 244 seconds]
sgen has joined #ruby
jenrzzz has joined #ruby
orbyt_ has joined #ruby
ellcs has quit [Ping timeout: 246 seconds]
anjen has joined #ruby
TomyWork has quit [Ping timeout: 246 seconds]
DaRock has quit [Ping timeout: 258 seconds]
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
sgen has quit [Ping timeout: 276 seconds]
anjen has quit [Quit: anjen]
Technodrome has joined #ruby
ruby_student has joined #ruby
Technodrome has quit [Remote host closed the connection]
<ruby_student>
Hi! Day 3 programming student here, can anyone point out what's wrong with my interpolation syntax. The array items are not appearing. "<#{tag_name} #{attributes[0]}=\"#{attributes[1]}\">#{yield}</#{tag_name}>"
jenrzzz has quit [Ping timeout: 244 seconds]
deepreds1 has quit [Ping timeout: 272 seconds]
ixti has joined #ruby
Obats has quit [Ping timeout: 260 seconds]
deepreds1 has joined #ruby
prestorium has quit [Ping timeout: 248 seconds]
codefriar has joined #ruby
deepreds1 has quit [Ping timeout: 272 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
ruby_student: Hi!
<havenwood>
ruby_student: The interpolation looks good. Sanity check what `attributes` is?: p attributes
<havenwood>
ruby_student: Is attributes an Array, for sure?: puts attributes.class
<havenwood>
ruby_student: If it is, double check its size: puts attributes.size
<havenwood>
ruby_student: (I'm suspicious it's a Hash, but just a wild guess.)
Exuma has joined #ruby
<ruby_student>
yep, attributes is an array. I'm tinkering around with the code, something else should be causing the arrays to not return correctly. At least I now know the interpolation is correct, thanks havenwood!
ruby_student has left #ruby [#ruby]
AndreYuhai has quit [Remote host closed the connection]
AndreYuhai has joined #ruby
AndreYuhai has quit [Client Quit]
alem0lars has joined #ruby
alem0lars has quit [Max SendQ exceeded]
alem0lars has joined #ruby
SanguineAnomaly has quit [Ping timeout: 272 seconds]
reber has quit [Remote host closed the connection]
jcalla has quit [Quit: Leaving]
involans has quit [Quit: involans]
deepreds1 has joined #ruby
sameerynho has joined #ruby
Snowy has joined #ruby
AndreYuhai has joined #ruby
schneider has quit [Ping timeout: 246 seconds]
<AndreYuhai>
Hey there, how do I throw an exception out of my function? Just like in Java like public int foo () throws ...
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tvw has joined #ruby
<leftylink>
is the question just about using the keyword `raise` ? or is it about signalling to some static analysis sytem that a function might raise? (answer to second question will depend on exactly what static analysis system)
queip has quit [Ping timeout: 245 seconds]
<AndreYuhai>
leftylink: Nope, to be more clear, I have a class called "Database" using the gem "Mysql2" and in that class I have a function called insert_into_table. So I am using this "Database" class in another class to insert some data into my table.
<AndreYuhai>
But when the data is duplicate I get an exception. I want to pass this exception to the calling class
<leftylink>
then doesn't that mean your question is in fact about the `raise` keyword?
<AndreYuhai>
leftylink: So do I just rescue StandardError => e; raise e; end ?
<AndreYuhai>
I mean inside the begin block of course