havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.3, 3.0.5, 2.7.7, 3.2.0-rc1: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ | Logs: https://libera.irclog.whitequark.org/ruby/
cognemo has quit [*.net *.split]
ollysmith_ has quit [*.net *.split]
coderpat- has quit [*.net *.split]
hrberg_ has quit [*.net *.split]
yosafbridge` has quit [*.net *.split]
cout has quit [*.net *.split]
leftylink has quit [*.net *.split]
EdwardIII has quit [*.net *.split]
splud has quit [*.net *.split]
kapil has quit [*.net *.split]
matoro has quit [*.net *.split]
ikonia has quit [*.net *.split]
depesz has quit [*.net *.split]
totoro has quit [*.net *.split]
bougyman has quit [*.net *.split]
Guest9768 has quit [*.net *.split]
rhe has quit [*.net *.split]
dka has quit [*.net *.split]
wmoxam has quit [*.net *.split]
rapha has quit [*.net *.split]
dac has quit [*.net *.split]
asio has quit [*.net *.split]
cout_ has joined #ruby
dka has joined #ruby
kapil has joined #ruby
hrberg has joined #ruby
wmoxam has joined #ruby
matoro has joined #ruby
Guest9768 has joined #ruby
coderpath has joined #ruby
depesz has joined #ruby
cognemo has joined #ruby
yosafbridge has joined #ruby
rapha has joined #ruby
rapha has joined #ruby
rapha has quit [Changing host]
totoro has joined #ruby
EdwardIII has joined #ruby
bougyman has joined #ruby
ollysmith has joined #ruby
dcx has joined #ruby
asio has joined #ruby
ikonia has joined #ruby
leftylink has joined #ruby
cartdrige has joined #ruby
agent_white has joined #ruby
_aeris_ has joined #ruby
aeris has quit [Ping timeout: 255 seconds]
_aeris_ is now known as aeris
wnd has quit [Quit: Disconnecting from stoned server.]
wnd has joined #ruby
neshpion has joined #ruby
reset has quit [Quit: reset]
caedmon has joined #ruby
caedmon has quit [Client Quit]
caedmon has joined #ruby
caedmon has quit [Client Quit]
caedmon has joined #ruby
cahoots_ has joined #ruby
cahoots has quit [Ping timeout: 256 seconds]
Rounin has quit [Ping timeout: 260 seconds]
zaben[m] has joined #ruby
caedmon has quit [Ping timeout: 268 seconds]
caedmon has joined #ruby
caedmon has quit [Ping timeout: 260 seconds]
caedmon has joined #ruby
splud has joined #ruby
caedmon has quit [Ping timeout: 268 seconds]
agent_white has quit [Remote host closed the connection]
ensyde has joined #ruby
moldorcoder7_ has joined #ruby
moldorcoder7 has quit [Ping timeout: 255 seconds]
work has quit [Quit: Connection closed for inactivity]
neshpion has quit [Quit: neshpion]
cahoots_ has quit [Ping timeout: 268 seconds]
cryptkeeper has quit [Quit: Connection closed for inactivity]
lesihctej has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
jetchisel has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
moldorcoder7_ has quit [Ping timeout: 265 seconds]
moldorcoder7 has joined #ruby
caedmon has joined #ruby
caedmon has quit [Ping timeout: 255 seconds]
caedmon has joined #ruby
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
Linux_Kerio has joined #ruby
caedmon has quit [Remote host closed the connection]
otisolsen70 has joined #ruby
introom has joined #ruby
<introom> Hi. I saw this piece of code "class ApplicationController < ActionController::Base". I wonder how ruby searches for "ActionController".
<introom> THere is no explicit "from somewhere import ActionController" stuff.
<zaben[m]> Rails is a little bit "magic", it uses Zeitwerk (https://github.com/fxn/zeitwerk) to autoload Classes and Modules
<zaben[m]> this allows it to load things like the ActionController::Base Class without needing to do something like require 'rails/action_controller/base'
<zaben[m]> Otherwise you are typically calling `require` somewhere in your code (doesn't have to be the same file the class is used) to load classes into Ruby. Where `require` points to something like '<gem_name>/file_to_load' or `require_relative '/some/path/to/ruby_file'`
<zaben[m]> unlike in Python (looks like your example comes from) you don't need to explicitly import Classes or Modules to be able to use them
crax23 has quit [Ping timeout: 256 seconds]
cartdrige has joined #ruby
ur5us has joined #ruby
moldorcoder7 has quit [Ping timeout: 272 seconds]
Sankalp has quit [Ping timeout: 256 seconds]
Sankalp has joined #ruby
ur5us has quit [Ping timeout: 246 seconds]
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 256 seconds]
Y05hito__ has joined #ruby
tomtmym has joined #ruby
tomtmym has quit [Changing host]
tomtmym has joined #ruby
crax23 has quit [Ping timeout: 260 seconds]
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
Linux_Kerio has quit [Quit: Konversation terminated!]
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Ping timeout: 256 seconds]
Rounin has joined #ruby
Rounin has joined #ruby
Rounin has quit [Changing host]
hightower2 has joined #ruby
Linux_Kerio has joined #ruby
teclator has joined #ruby
teclator has quit [Remote host closed the connection]
ur5us has joined #ruby
<introom> zaben[m]:when hovering on ActionController (in rubymine) and go to defintion, it pops up several of them: https://i.imgur.com/Uu41b8B.png
FullMetalStacker has joined #ruby
<introom> I wonder how ruby selects among them
TomyWork has joined #ruby
<zaben[m]> When Ruby finds the same class defined, it will merge them in the order it loads them in (monkey patching), this allows us to continue to add functionality to a Class as required. When you are using something like RubyMine which shows all files that references the class ActionController definition, all those files are continuing to add functionality, but due to how Ruby loads files, it doesn't need to match the name of the file. For example:
<zaben[m]> In that gist, I am loading 2 seperate classes with the same "require" call.
<zaben[m]> If you substitute "Othername" with "Somename" what you will see, is the second time the class is defined `self.example` will be re-defined
teclator has joined #ruby
ensyde has quit [Quit: Leaving]
<ox1eef_> Is RubyMine written in Java?
<ox1eef_> It is remarkable how good it is at debugging Ruby if so.
ur5us_ has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
ur5us_ has quit [Remote host closed the connection]
jvalleroy has joined #ruby
ur5us_ has joined #ruby
Linux_Kerio has quit [Ping timeout: 255 seconds]
dionysus69 has joined #ruby
<jhass[m]> It's IntelliJ, so I'd guess a fair mix between Java and Kotlin these days
<introom> zaben[m]:thanks for the expalation. back into my picture: https://i.imgur.com/Uu41b8B.png there are lots of files containing ActionController. I wonder *WHICH* files are required.
<introom> there must be some place to define what files to require.
FullMetalStacker has quit [Read error: Connection reset by peer]
FullMetalStacker has joined #ruby
ur5us_ has quit [Ping timeout: 246 seconds]
<ox1eef_> Thanks jhass[m]
dionysus69 has quit [Quit: dionysus69]
dionysus69 has joined #ruby
FullMetalStacker has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<ox1eef_> introom: That probably happens in ActiveSupport, and ultimately it will be using zeitwork: https://github.com/fxn/zeitwerk
<ox1eef_> zeitwerk.*
willfish has joined #ruby
FullMetalStacker has joined #ruby
FullMetalStacker has quit [Client Quit]
EdwardIII has left #ruby [Bye!]
IsoLnCHiP has quit [Ping timeout: 260 seconds]
Sankalp has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Sankalp has joined #ruby
smp has quit [Ping timeout: 248 seconds]
darkstardevx has quit [Remote host closed the connection]
darkstardevx has joined #ruby
smp has joined #ruby
reset has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.7.1]
axisys has quit [Remote host closed the connection]
moldorcoder7 has joined #ruby
niv has quit [Ping timeout: 246 seconds]
niv has joined #ruby
eron has joined #ruby
eron has quit [Quit: Client closed]
caedmon has joined #ruby
hightower2 has quit [Ping timeout: 268 seconds]
crax23 has joined #ruby
Y05hito__ has quit [Ping timeout: 272 seconds]
Y05hito__ has joined #ruby
crax23 has quit [Ping timeout: 246 seconds]
introom has quit [Quit: WeeChat 3.7.1]
introom has joined #ruby
introom has quit [Client Quit]
introom has joined #ruby
introom has quit [Client Quit]
Rounin has quit [Ping timeout: 255 seconds]
introom has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
yxhuvud has quit [Read error: Connection reset by peer]
c10l has quit [Quit: Ping timeout (120 seconds)]
c10l has joined #ruby
yxhuvud has joined #ruby
FullMetalStacker has joined #ruby
FullMetalStacker has quit [Client Quit]
Sheilong has joined #ruby
sixecho has left #ruby [#ruby]
John_Ivan_ has quit [Read error: Connection reset by peer]
hightower2 has joined #ruby
CalimeroTeknik has joined #ruby
CalimeroTeknik has quit [Changing host]
CoolerX has joined #ruby
<CoolerX> Hi
<CoolerX> #12 15.40 ERROR: Error installing jekyll:
<CoolerX> #12 15.40 public_suffix requires Ruby version >= 2.6. The current ruby version is 2.5.0.
<CoolerX> what does that mean?
<CoolerX> searching online there are threads saying you need different versions of ruby https://stackoverflow.com/questions/67581503/public-suffix-requires-ruby-version-2-3-while-installing-fastlane
<CoolerX> public_suffix requires Ruby version >= 2.3
M1ll173r47[m]1 has joined #ruby
shokohsc6 has joined #ruby
hightower2 has quit [Remote host closed the connection]
hightower2 has joined #ruby
dostoyev1ky2 has joined #ruby
mattf_ has joined #ruby
Sheilong_ has joined #ruby
dannyAAM_ has joined #ruby
zaben[m]1 has joined #ruby
Sheilong has quit [Ping timeout: 252 seconds]
Sheilong_ is now known as Sheilong
M1ll173r47[m] has quit [Ping timeout: 252 seconds]
dostoyevsky2 has quit [Ping timeout: 252 seconds]
Starfoxxes has quit [Ping timeout: 252 seconds]
hansolo has quit [Ping timeout: 252 seconds]
shokohsc has quit [Ping timeout: 252 seconds]
dannyAAM has quit [Ping timeout: 252 seconds]
zaben[m] has quit [Ping timeout: 252 seconds]
clemens3 has quit [Ping timeout: 252 seconds]
mattf has quit [Ping timeout: 252 seconds]
Cata[m]1 has quit [Ping timeout: 252 seconds]
dannyAAM_ is now known as dannyAAM
shokohsc6 is now known as shokohsc
hansolo has joined #ruby
Cata[m]1 has joined #ruby
clemens3 has joined #ruby
<jhass[m]> You wanna run with software from 2015? :)
<jhass[m]> Why don't you just get a maintained and supported Ruby version
Starfoxxes has joined #ruby
TomyWork has quit [Remote host closed the connection]
dostoyev1ky2 has quit [Quit: leaving]
dostoyevsky2 has joined #ruby
<adam12> Tempted to drop the CDN from gemdocs.org. I'm getting abysmal cache hit rates. I think it might be quicker just serving it directly.
dostoyevsky2 has quit [Client Quit]
dostoyevsky2 has joined #ruby
<caleb> is there a community standard for command line options?
<caleb> I think 10 years ago I remember a lib called trollop
reset has quit [Ping timeout: 256 seconds]
crax23 has joined #ruby
Y05hito__ has quit [Ping timeout: 246 seconds]
<adam12> OptionParser is exceptional.
Pixi has quit [Quit: Leaving]
Pixi has joined #ruby
Linux_Kerio has joined #ruby
crax23 has quit [Ping timeout: 272 seconds]
konsolebox has joined #ruby
John_Ivan has joined #ruby
hightower3 has joined #ruby
hightower2 has quit [Ping timeout: 272 seconds]
teclator has quit [Ping timeout: 272 seconds]
nemesit has quit [Read error: Connection reset by peer]
hrberg has quit [Ping timeout: 256 seconds]
nemesit has joined #ruby
hrberg has joined #ruby
konsolebox has quit [Remote host closed the connection]
cartdrige has joined #ruby
willfish has quit [Ping timeout: 265 seconds]
crax23 has joined #ruby
ur5us_ has joined #ruby
cartdrige has quit [Ping timeout: 252 seconds]
caedmon has quit [Remote host closed the connection]
caedmon has joined #ruby
<isene> ox1eef_: So, I moved all my lib files to a new directory, xlib. I added xrpn_load.rb in lib with a simple command; `Dir[__dir__ + "/../xlib/*"].each { |file| load file }` I included the file in the gemspec. Now how do I ensure that this is run when the main file runs `require xrpn`?
<isene> adam12:^^^
<adam12> isene: Make a file called `xrpn.rb` in lib, and have it `require_relative "xrpn_load"`.
<adam12> isene: require "xrpn" is essentially `$LOAD_PATH.each { |path| require File.join(path, "xrpn.rb") rescue LoadError nil }`. Since `$LOAD_PATH` will include your gem `lib`, it will eventually come across xrpn-1.2.3/lib and try to require `xrpn.rb` from it.
<isene> Why not just put the load comman directly into the xrpn.rb?
<isene> adam12: Basically rename my xrpn_load.rb to xrpn.rb?
<adam12> isene: Sure, that's fine too.
FullMetalStacker has joined #ruby
FullMetalStacker has quit [Client Quit]
cryptkeeper has joined #ruby
matoro has joined #ruby
matoro has quit [Changing host]
Laplace has joined #ruby
stirl has joined #ruby
stirl has quit [Remote host closed the connection]
stirl has joined #ruby
dionysus69 has joined #ruby
otisolsen70 has quit [Quit: Leaving]
mahler is now known as mahler|away
___nick___ has joined #ruby
<isene> adam12: Damn, can't get it to work... do I have to specify lib/xrpn.rb as executable in the gemspec also (in addition to the main program `xrpn`)?
<adam12> isene: No. Can you make sure your changes are on GitHub in a branch? I'll check them out and look.
Y05hito__ has joined #ruby
<isene> adam12: OK, I'll do that tomorrow. Need to go horizontal now and get some sleep. And, btw; Thanks for all the help you're offering here. It's highly appreciated.
<adam12> isene: you're welcome! cheers.
crax23 has quit [Ping timeout: 256 seconds]
caedmon has quit [Ping timeout: 252 seconds]
Linux_Kerio has quit [Ping timeout: 252 seconds]
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
CoolerX has quit [Quit: leaving]
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
szkl has joined #ruby
Linux_Kerio has joined #ruby
cartdrige has joined #ruby
Y05hito__ has quit [Ping timeout: 256 seconds]
henk has joined #ruby
<henk> does https://rdoc.info/ seem broken for anyone else? does anyone know about that page?
tomtmym has quit [Quit: Gone.]
Linux_Kerio has quit [Quit: Konversation terminated!]
Rounin has joined #ruby
John_Ivan has quit [Read error: Connection reset by peer]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
cartdrige has quit [Ping timeout: 256 seconds]
moldorcoder7 has quit [Ping timeout: 272 seconds]
dionysus69 has quit [Ping timeout: 272 seconds]
hansolo has quit [Remote host closed the connection]
aeris has quit [Ping timeout: 255 seconds]
aeris has joined #ruby
hansolo has joined #ruby