aeris has quit [Remote host closed the connection]
_ht has joined #ruby
aeris has joined #ruby
proportions has quit [Remote host closed the connection]
proportions has joined #ruby
Jonopoly has quit [Quit: WeeChat 3.0]
rvalue has quit [Ping timeout: 252 seconds]
Sankalp has quit [Ping timeout: 252 seconds]
rvalue has joined #ruby
Bish has joined #ruby
<Bish>
is there anything i'll have to keep in mind when migrating to 3.0?
proportions has left #ruby [#ruby]
Sankalp has joined #ruby
<adam12>
Bish: Keyword argument separation is the biggest. Run 2.7 with deprecated warnings enabled (see the Warning module). Fix all the issues before upgrading.
Al2O3 has joined #ruby
Al2O3 has quit [Excess Flood]
<havenwood>
+1 Ruby 3 kwargs warning check. It's relatively compatible along the lines of a MINOR version update. The one big breaking change Ruby will probably ever have was 1.8 to 1.9.
Al2O3 has joined #ruby
EO has joined #ruby
gr33n7007h has quit [Ping timeout: 248 seconds]
<adam12>
I wonder how much non-bot traffic gemdocs.org gets. Because of the number of pages, it sees an _insane_ amount of crawlers, but I am curious how many flesh and blood use it.
<EO>
New to Ruby. Trying to build / package a Vagrant plugin. Having a hell of a time managing gems. Any tips on how to deal with gems with extensions? https://dpaste.com/FDMKFHNZQ
<adam12>
EO: Something is strange with your setup. I think `date` is a standard gem. You shouldn't need to pristine it.
<adam12>
EO: How'd you install Ruby? What platform? if Linux, what distro?
<EO>
Fedora. The package "rubygems-date" is not installed, so it came in via bundle not dnf.
<EO>
But if I try to pristine within the bundle context (wherever that may be), I still get errors: https://dpaste.com/ES2TM4R9F
<adam12>
EO: Have you ran `bundle install` before? or just `bundle`? And more importantly, have you used sudo to run bundle?
<adam12>
EO: is this a project? and does it have a Gemfile? I'm assuming yes.
<EO>
yes, lemme link you
<adam12>
Don't match bundle with gem. It doesnt' do what you expect it to do.
<EO>
that's what I ws trying...but noticed it wasn't using any of the already-DNF-installed gems, so I've now removed the "bundle config" and added "--prefer-local" to the "bundle install" step
<adam12>
EO: Ah. In this case, I might suggest that you don't do that.
<EO>
and no, on this VM I haven't run sudo bundle. On others, that did fix the permission issues.
<EO>
Which part(s) shouldn't I be doing?
<adam12>
Bundler is for managing specific versions of gems for applications. Forcing it to use DNF-installed deps goes against it in some ways.
<adam12>
I'd leave the bundle config option enabled, and stop using --prefer-local.
<EO>
OK so when I do that, it builds the vagrant plugin just fine. However, when going to INSTALL the plugin (vagrant plugin install vagrant-routeros) that's when gem conflicts arise.
<EO>
Cuz bundler for example grabs the latest version of excon (0.98.0) but rubygem-excon 0.91.0 is already present on the system as part of having vagrant installed.
<adam12>
How did you install vagrant?
<adam12>
I'm not sure there's an elegant solution out of this.
<EO>
sudo dnf install vagrant
<EO>
(which does NOT use rubygems.org, but instead installs other prebuilt older-version RPMs)
<EO>
But they are cohesive.
<EO>
I think I see the problem, but have no idea how to solve it. To me it looks like the fully build plugin (essentially a gem), contains a Gemfile with a "~> 0.90.0 excon" requirement, and at plugin install time it goes to rubygems to get it, instead of recognizing the 0.91.0 already present on the system.
<EO>
Is there a way to tell that Gemfile to prefer installed gems?
<adam12>
EO: My less elegant solution is dnf uninstall vagrant, and then download vagrant binary from vagrant.io
<adam12>
I'm not sure you can --config path and --prefer-local at the same time. They are opposites of each other.
<adam12>
You have two version managers competing. I generally avoid this, so I'm not sure much more what I can suggest.
<EO>
Yeah, I can't expect users to not use their package managers to install vagrant.
<adam12>
EO: Oh. Are you the maintainer of this plugin?
<EO>
contributor, but yeah. So from my perspective, somebody does "apt install vagrant", and then tries to "vagrant up" their VM. Vagrant is then supposed to auto-download my plugin as part of the bring-up process.
<EO>
Could be various versionf of fedora, ubuntu, etc.
<EO>
actaully, my bad. htat's a bit misleading. this is part of a published vagrant box. the plugin is bundled with the box, not downloaded. but the story is the same. the targets can be various vagrant versions, with ever-evolving gem versions.
<adam12>
Unfortunately I'm not sure of a solution. Bundler kind of expects to own everything related to the dependencies for that project.
<EO>
adam12: if you've no idea how to manage this version problem, perhaps you have an idea about why I can't seem to build gem extensions without sudo?
<EO>
actually, it also works when I tell bundler to "--config path" so it has a pristine empty environment. It seems to build extensions then just fine.
<adam12>
EO: Those must have installed via dnf, if you didn't run sudo before.
<adam12>
I'm not sure why they are complaining about not being pristine. Maybe force dnf to reinstall them and see if it helps.
<adam12>
Instead of using bundler, you could _try_ using `gem install -g Gemfile`. But because you're not superuser, I bet it won't work.
<EO>
You appear to be correct. I do see entries for one of the problem ones, like "ruby-prof" in /usr/share/gems/gems/. There is NO corresponding installed RPM. WTF.
<adam12>
It would avoid bundler, but you need write permissions to GEM_DIR which I bet you won't have with dnf installed ruby.
<adam12>
I'd presume that `vagrant` is available by default.
<EO>
If you look at that, it works in the "VagrantPlugins" module, which is owned by Vagrant
<adam12>
When running under Vagrant. Maybe I'm wrong...
<EO>
Also, if those deps are in the :development group only, why are they colliding on plugin install :/
<EO>
shouldn't vagrant be ignoring :development requirements?
<adam12>
EO: Your bundle install isn't ignoring development.
<adam12>
bundle config --without development
<adam12>
You can add that to your .py script maybe.
<EO>
oh....so all groups get installed by default?
<adam12>
Yes.
<EO>
This proposal has merit. If I add a development_dependency to the gemspec, and erase vagrant entirely from the Gemfile, that might get over these collisions.
<EO>
Although that does go against how Vagrant tells you to write plugins
ccapndave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
caedmon has joined #ruby
jidar has quit [Remote host closed the connection]
caedmon has quit [Ping timeout: 268 seconds]
dionysus69 has quit [Ping timeout: 252 seconds]
ccapndave has joined #ruby
ccapndave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hightower3 has quit [Ping timeout: 268 seconds]
szkl has quit [Quit: Connection closed for inactivity]
<ox1eef_>
adam12: I run a little website for reading The Quran. I would guess 99.9% of the traffic comes from sort of a bot, more often than not it is a bot looking for a vulnerability of some sort, or an info leak - not legit traffic like say a crawler.
<ox1eef_>
Trying to use the server as a HTTPS proxy is another common one.
<adam12>
I might add some telemetry, but I've intentionally avoided something like Google Analytics.
<adam12>
Unfortunately I'd need to log UA there, and I am not sure I want to do that just yet.
<adam12>
Logs are already super noisy because I have LOG_LEVEL=debug, since someone keeps yanking gems and I needed to debug it :P
<ox1eef_>
It's probably the least intrusive option.
<ox1eef_>
It can be expected that every site on earth has one.
<adam12>
Indeed.
hightower2 has joined #ruby
factor has quit [Read error: Connection reset by peer]
factor has joined #ruby
otisolsen70 has quit [Quit: Leaving]
jmcgnh has quit [Excess Flood]
<ox1eef_>
I had thought of writing an event-based parser of access.log that yield a block on certain criteria. If you're using CONNECT, I should probably block you. Same if you're sending a response body of unprintable bytes, etc. fail2ban probably covers it, but I think it could be a fun side project.
<adam12>
I was looking into building something _kind_ of similar, but more for detection and then network-wide blocking of that traffic. A distributed fail2ban like CrowdSec.
<ox1eef_>
Nice.
<adam12>
Too many things to build, not enough time.
<ox1eef_>
Yep, exactly my problem too.
<adam12>
I'm revamping one of my oldest side projects currently, a monitoring service that I built in 2009.
jmcgnh has joined #ruby
<adam12>
Which was originally a status page site, but I couldn't get anybody to buy (why, we have Twitter which is free?). I've been using it internally since 2009 to monitor my network and client sites/services.
stirl has quit [Quit: stirl]
moldorcoder7 has quit [Ping timeout: 252 seconds]
otisolsen70 has joined #ruby
teclator has quit [Ping timeout: 252 seconds]
Petruchio has quit [Quit: Konversation terminated!]
Petruchio has joined #ruby
dionysus69 has joined #ruby
<ox1eef_>
Probably a hard service to sell. Status updates are usually in-house solutions.
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
<Shell>
there's several services which already host a status page for you, it's a weirdly over-serviced market.
<ox1eef_>
I would be a bit iffy about it. Beyond HTTP at least.
donofrio has joined #ruby
<adam12>
Shell: I know. This was in 2009 :)
_ht has quit [Quit: _ht]
__ht has joined #ruby
polishdub has quit [Remote host closed the connection]
__ht is now known as _ht
polishdub has joined #ruby
teclator has joined #ruby
ur5us has joined #ruby
c10l has quit [Quit: See ya! o/]
teclator has quit [Ping timeout: 255 seconds]
c10l has joined #ruby
teclator has joined #ruby
TomyWork has quit [Remote host closed the connection]
agent_white has joined #ruby
___nick___ has quit [Ping timeout: 252 seconds]
teclator has quit [Ping timeout: 248 seconds]
stirl has joined #ruby
_ht has quit [Quit: _ht]
hightower2 has quit [Ping timeout: 252 seconds]
___nick___ has joined #ruby
otisolsen70 has quit [Quit: Leaving]
hightower2 has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
Linux_Kerio has quit [Ping timeout: 246 seconds]
moldorcoder7 has joined #ruby
quazimodo has joined #ruby
infinityfye has quit [Quit: Leaving]
snonux has joined #ruby
snonux has quit [Ping timeout: 252 seconds]
ruby[bot] has quit [Remote host closed the connection]