<ville>
could someone point me to a resource that explains how to handle ruby libraries/dependencies? i've a ruby script, a .rb file, which i'm supposed to run, and it depends on some other libraries. i can't install anything system wide on these machines however, it would have to all be installed in my user's home
xco has joined #ruby
roadie has quit [Read error: Connection reset by peer]
howdoi has quit [Quit: Connection closed for inactivity]
roadie has joined #ruby
BTRE has quit [Ping timeout: 240 seconds]
roadie has quit [Ping timeout: 246 seconds]
BTRE has joined #ruby
<jhass>
ville: you may just be able to gem install --user-install ...
<jhass>
ville: if you see a Gemfile, https://bundler.io/ has a --path option to install stuff into a site-dir
<tranch[m]>
<ville "could someone point me to a reso"> or use rvm (https://rvm.io/) to manage ruby environment under your user path.
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has joined #ruby
<ville>
ok thanks i'll have a look at those options.
roadie has joined #ruby
<jhass>
(writing your own Gemfile and using bundle exec is an option too)
roadie has quit [Ping timeout: 272 seconds]
<ville>
never done ruby so the whole ecosystem is alien to me. ok i did a "hello world"-level scripts in early 2000s.
<ville>
ok there appears to be a Gemfile available, but at "bundle --help" doesn't seem to list --path as an option
teclator has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schne1der has joined #ruby
<ville>
alright, looks like 'bundle --path=<dir>' worked and fetched the dependencies, but now running the script still fails to find the libraries. that's what i presume "/usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- parseconfig (LoadError)" means
<jhass>
ville: try prepending bundle exec to the command
jenrzzz has joined #ruby
alexherbo2 has joined #ruby
<ville>
ok that does the trick. thanks a lot. looks like I also had couple other options: "ruby -I..." or edit the .rb file to add to $LOAD_PATH.
alexherbo2 has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 258 seconds]
<ville>
can i tell `bundle exec` a path where to look for the .bundle dir?
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<ville>
setting BUNDLE_GEMFILE=/path/to/Gemfile bundle exec /path/to/exe.rb does it. is there a more legit way?
comet23 has joined #ruby
<jhass>
ville: it's legit, we generally make sure to run stuff in the right working directory though. If it's a cli tool to run in the context of other directories, the --user-install option might actually be a little bit better
<comet23>
what features will you like to see in ruby 3?
roadie has joined #ruby
<ville>
jhass: i made a shell script that sits in my ~/bin that sets all the stuff up so it works for now. would this "gem install --user-install..." retrieved the dependencies as well?
TheBrayn2 is now known as TheBrayn
<jhass>
--user install sets the install location to somehwere in $HOME
<jhass>
you still have to explicitly give it what to install
<ville>
jhass: so it doesn't understand a Gemfile?
<jhass>
mh, actually it does but I neverr used that so I don't know from the top of my head :D
<ville>
thanks for the help. i got it to work and can move on with the actual task i was meant to do
roadie has quit [Ping timeout: 246 seconds]
<comet23>
will ruby 3 become the next javascript?
ville has left #ruby [#ruby]
<jhass>
aww, they left. for any bystanders, the gem install command would have been gem install --user-install -g Gemfile
Technodrome has quit [Ping timeout: 256 seconds]
cnsvc_ has joined #ruby
teclator has quit [Ping timeout: 260 seconds]
imode has quit [Ping timeout: 246 seconds]
cnsvc_ has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
roadie has joined #ruby
cnsvc_ has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
conta has quit [Quit: conta]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
roadie has quit [Ping timeout: 272 seconds]
jinmiaoluo has quit [Ping timeout: 260 seconds]
jinmiaoluo has joined #ruby
roadie has joined #ruby
jinmiaoluo has quit [Read error: Connection reset by peer]
cnsvc_ has joined #ruby
jinmiaoluo has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
miskatonic has joined #ruby
jinmiaoluo has quit [Ping timeout: 256 seconds]
jinmiaoluo has joined #ruby
teclator has joined #ruby
jinmiaol1 has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
drincruz_ has joined #ruby
jinmiaoluo has quit [Ping timeout: 260 seconds]
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
drincruz_ has quit [Ping timeout: 256 seconds]
jinmiaol1 has quit [Ping timeout: 256 seconds]
TCZ has joined #ruby
jinmiaol1 has joined #ruby
sylario has joined #ruby
conta has joined #ruby
feather has joined #ruby
feather has left #ruby [#ruby]
cliluw has quit [Ping timeout: 272 seconds]
ur5us has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.8]
jenrzzz has joined #ruby
al2o3-cr has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
giorgian has quit [Quit: restart computer]
vondruch_ has joined #ruby
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
vondruch has quit [Ping timeout: 260 seconds]
vondruch_ is now known as vondruch
comet23 has quit [Quit: Connection closed for inactivity]
ur5us has quit [Ping timeout: 260 seconds]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
cliluw has joined #ruby
TCZ has quit [Quit: Leaving]
sarna has joined #ruby
drincruz_ has joined #ruby
chalkmonster has joined #ruby
venmx has joined #ruby
drincruz_ has quit [Ping timeout: 246 seconds]
_vircung_ has quit [Ping timeout: 258 seconds]
drincruz_ has joined #ruby
vircung has joined #ruby
cgfbee has joined #ruby
jinmiaol1 has quit [Remote host closed the connection]
drincruz_ has quit [Ping timeout: 264 seconds]
cliluw has quit [Ping timeout: 260 seconds]
cliluw has joined #ruby
burningserenity has joined #ruby
jinmiaol1 has joined #ruby
drincruz_ has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
TCZ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
akem has quit [Quit: Leaving]
akem has joined #ruby
cnsvc_ has joined #ruby
alexherbo2 has joined #ruby
xco has joined #ruby
akem has quit [Quit: Leaving]
conta has quit [Quit: conta]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akem has joined #ruby
xco has joined #ruby
leitz has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fabio_ has quit [Remote host closed the connection]
sarna has quit [Quit: Connection closed]
cnsvc_ has quit [Ping timeout: 240 seconds]
stan has left #ruby ["Kicked by @appservice-irc:matrix.org : Idle for 30+ days"]
dretnx has joined #ruby
bvdw has quit [Remote host closed the connection]
bvdw has joined #ruby
xco has joined #ruby
cnsvc_ has joined #ruby
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
lurkless has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
gitter1234 has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
bvdw has quit [Remote host closed the connection]
cnsvc_ has joined #ruby
bvdw has joined #ruby
lucasb has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
SeepingN has joined #ruby
cnsvc_ has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
<dretnx>
Is it possible with Ruby, when waiting for database entries to be returned to app, that Ruby does other things and doesn't blocks on this waiting for data operation?
<dretnx>
Of course using Rails
<havenwood>
dretnx: You can use Falcon with an Async DB adapter like async-postgres.
<dretnx>
havenwood: So, if I have infinite loop, triggered in my custom url /my_ruby_block_test , it will block entire server, when using Falcon, just like infinite block would block node.js app?
<jhass>
IO operations block the thread but not the VM in Ruby
<jhass>
other threads can continue
<dretnx>
But in practise, does Falcon allows thousands of requests per second, just like node.js does?
<havenwood>
dretnx: Pretty much any language can do thousands of web requests per second these days. Node.js evented I/O was inspired by Ruby's EventMachine IIR. Falcon is more sophisticated but newer.
rippa has joined #ruby
<havenwood>
dretnx: In Falcon's case, there can be multiple processes, multiple threads, and multiple fibers, along with evented I/O.
rfb has joined #ruby
<dretnx>
So I can use async database access and at the same time I don't have to worry if something will block for too long?
<havenwood>
dretnx: Right.
TCZ has quit [Quit: Leaving]
jinmiaol1 has quit [Quit: WeeChat 2.8]
<havenwood>
dretnx: Can you name a language that can't handle thousands of requests per second? I'm confused what you meant by that.
<dretnx>
I have in my mind apps, that are database intensive, thus I get benefit when using async architecture
<adam12>
Lachezar: I'd just try to pin bigdecimal to an older version. Maybe something like `bundle add bigdecimal -v '1.4.4' && bundle`.
<havenwood>
Lachezar: That seems too new of a Ruby for Rails 4.2.
<adam12>
Yeah. Downgrading Ruby _might_ have to happen..
<Lachezar>
havenwood: How to tell what version to use?
<havenwood>
Or upgrading the Rails version. :)
<havenwood>
Lachezar: Typically, you look at the `ruby` directive in the Gemfile.
<havenwood>
Lachezar: Which tends to correspond to the same version in the .ruby-version file.
<havenwood>
Lachezar: What does the Gemfile say?
<Lachezar>
havenwood: Don't see any `ruby` directives in Gemfile
<Lachezar>
... also no .ruby-version
<havenwood>
Lachezar: What Ruby version was the Gemfile.lock resolved with? You might be able to see with: tail -n5 Gemfile.lock
<havenwood>
Lachezar: You'll probably want to check what version of Ruby was recommended for Rails 4.2. Note that Rails 4.2 and the corresponding old Ruby are both past end of life with known security vulnerabilities.
<Lachezar>
OK. Next try: how do I limit the bigdecimal version?
jinmiaoluo has quit [Remote host closed the connection]
<havenwood>
Lachezar: You'll just have cascading issues with a Rails that old on Ruby 2.7.
<havenwood>
Lachezar: Ruby 2.0.
Garb0 has quit [Remote host closed the connection]
<Lachezar>
I'm wondering how does this actually work (currently it is in production, or so I'm being told).
bga57 has joined #ruby
<havenwood>
Lachezar: CentOS 7 ships with Ruby 2.0. Similarly old operating systems do as well. Alternatively, use something like asdf, chruby, RVM or rbenv to switch Rubies to 2.0, if you can get such an old Ruby installed.
<havenwood>
Lachezar: Maybe they're using CentOS 7?
<havenwood>
It has a silly-long support cycle.
<Lachezar>
Q: if I `export BUDNLER_VERSION=1` will it use the 1.17.3 available, or will it get 1.0.0?
<Lachezar>
So how do I fix the bigdecimal version?
cliluw has quit [Ping timeout: 246 seconds]
<havenwood>
Lachezar: Use Ruby 2.0.
cliluw has joined #ruby
<havenwood>
Lachezar: Are you using Ruby 2.0?
ellcs1 has quit [Ping timeout: 260 seconds]
<Lachezar>
havenwood: Would 2.1 work?
<havenwood>
Lachezar: Yup, should.
<havenwood>
Lachezar: Once you have it installed: gem install bundler --version="~> 1.0"
<havenwood>
Lachezar: Then: bundle
<Lachezar>
I am using `gem install 'bundler:~>1'` which is better?
<havenwood>
Lachezar: Doesn't matter.
<havenwood>
Lachezar: I prefer the --version flag, since it's slightly less cryptic.
<Lachezar>
Had to also touch json from 1.8.3 to 1.8.5 'cause it would not compile :-/
cliluw has quit [Ping timeout: 240 seconds]
Arkantos has quit [Ping timeout: 272 seconds]
cliluw has joined #ruby
* Lachezar
owes havenwood a beer: `bundle exec rails server` and it actually runs :D
Arkantos has joined #ruby
jenrzzz has joined #ruby
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
plutes has quit [Remote host closed the connection]
plutes has joined #ruby
orbyt_ has joined #ruby
xco has joined #ruby
Arkantos has joined #ruby
fercell has quit [Quit: WeeChat 2.8]
akem has quit [Quit: Leaving]
fercell has joined #ruby
Manchotix[m] has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
cliluw has quit [Ping timeout: 256 seconds]
schne1der has joined #ruby
akem has joined #ruby
akem has quit [Max SendQ exceeded]
akem has joined #ruby
imode has joined #ruby
linetrace has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<linetrace>
is anyone else running into issues due to an expired AddTrustExternalCARoot.pem certificate?
xco has joined #ruby
vondruch_ has joined #ruby
Arkantos_ has quit [Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in]
<havenwood>
linetrace What OS/distro?
LaylaKitten has joined #ruby
LaylaKitten has quit [Client Quit]
vondruch has quit [Ping timeout: 258 seconds]
vondruch_ is now known as vondruch
<havenwood>
linetrace: Typically you can install a ca-certificates packages to keep updated. No, I haven't seen folk running into expired cert issues lately.
meimeix has joined #ruby
<linetrace>
havenwood: thanks, I'm seeing this on Ubuntu and OpenBSD
ellcs1 has joined #ruby
<linetrace>
I get "OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed (certificate has expired)" when calling Net::HTTP.start
<Lachezar>
linetrace: Yes, I have.
<Lachezar>
A high level intermediate cert expired on the weekend.
<Lachezar>
Comodo
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<Lachezar>
For some absurd reason Comodo has issued lots of certificates that have longer life-span than their intermediates.
<linetrace>
Lachezar: ah, okay
<linetrace>
Is there any documentation of this that I can look at or any fix at this point?
<Lachezar>
Browsers (and OpenSSL) seem to be working this around, but gnutls (to name one) does not.
leah2 has quit [Ping timeout: 260 seconds]
naught-fowl has joined #ruby
teej has quit []
<Lachezar>
linetrace: Do you manage the server that you're connecting to?
<Lachezar>
linetrace: I should note, that fixing roots did not work for me, as the Web Server still provides the expired Intermediary, so gnutls (git for example) does not connect to such servers, and the chain will have to be modified.
<Lachezar>
linetrace: Maybe ask in #security?
<linetrace>
Lachezar: okay, good to know. will likely do, thanks for confirming and explaining the issue
* Lachezar
bids everyone good night.
Lachezar has quit [Quit: Going home...]
Tempesta has joined #ruby
DTZUZU has joined #ruby
Arkantos has quit [Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in]