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/
cartdrige has quit [Ping timeout: 265 seconds]
cek has joined #ruby
<cek> where is the change in block passing documented? - `x ->{ } { 1 }` vs `x ->{ } do 1 end`
plantman2 has joined #ruby
plantman has joined #ruby
graywolf has quit [Ping timeout: 260 seconds]
plantman has quit [Ping timeout: 248 seconds]
plantman2 has quit [Ping timeout: 256 seconds]
caedmon has quit [Ping timeout: 272 seconds]
markong has quit [Ping timeout: 272 seconds]
<adam12> >> x ->{ } do 1 end
<ruby[bot]> adam12: # => undefined method `x' for main:Object (NoMethodError) (https://carc.in/#/r/ed1j)
caedmon has joined #ruby
<adam12> >> ->{ } do 1 end
<ruby[bot]> adam12: # => (https://carc.in/#/r/ed1k)
<adam12> cek: Need more context. Neither of those look like valid Ruby
<cek> they definitely do
<cek> there was a change b/w 2.4 and 2.6, but I can't pinpoint
caedmon has quit [Ping timeout: 252 seconds]
caedmon has joined #ruby
smp_ has joined #ruby
smp has quit [Ping timeout: 265 seconds]
smp_ is now known as smp
Na_Klar has joined #ruby
lucartc has quit [Remote host closed the connection]
moldorcoder7 has quit [Ping timeout: 272 seconds]
<leftylink> you wanna know what is valid ruby though
<leftylink> pandabot: rb ->{}[]{}
<pandabot> nil - https://carc.in/#/r/ed2d
cartdrige has joined #ruby
victori has quit [Quit: ZNC 1.8.2 - https://znc.in]
victori has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
Na_Klar has left #ruby [https://quassel-irc.org - Komfortabler Chat. Überall. ]
<apteryx> Gemfile are for Bundler, right?
<apteryx> what determine what gets registered in ::Gem.loaded_specs? it seems merely having a gem on my GEM_PATH is not enough
<apteryx> does bundler not only install, but also activate (load) dependencies in a project?
Synthead has quit [Quit: Leaving]
victori has quit [Quit: ZNC 1.8.2 - https://znc.in]
victori has joined #ruby
cek has quit [Quit: Connection closed for inactivity]
finsternis has quit [Remote host closed the connection]
<zaben[m]1> apteryx: Bundler is used to install dependancies and ensure they can be loaded by the project. Bundler can be used to require your dependancies for you as well (https://bundler.io/guides/bundler_setup.html#setting-up-your-application-to-use-bundler)
caedmon has quit [Ping timeout: 255 seconds]
otisolsen70 has joined #ruby
stirl has joined #ruby
razetime has joined #ruby
tomtmym has joined #ruby
tomtmym has quit [Changing host]
tomtmym has joined #ruby
stirl has quit [Read error: Connection reset by peer]
stirl has joined #ruby
stirl has left #ruby [#ruby]
jhawthorn_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
jhawthorn has joined #ruby
razetime has quit [Ping timeout: 260 seconds]
razetime has joined #ruby
mollerup has quit [Quit: Leaving]
ur5us has joined #ruby
nmollerup has joined #ruby
TomyWork has joined #ruby
Linux_Kerio has joined #ruby
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
ur5us has quit [Ping timeout: 252 seconds]
cartdrige has quit [Ping timeout: 268 seconds]
Linux_Kerio has quit [Ping timeout: 260 seconds]
FetidToot has quit [Ping timeout: 246 seconds]
Linux_Kerio has joined #ruby
FetidToot has joined #ruby
cartdrige has joined #ruby
justReddy is now known as justache
FullMetalStacker has joined #ruby
FullMetalStacker has quit [Client Quit]
mooff has quit [Remote host closed the connection]
mooff has joined #ruby
dionysus69 has joined #ruby
<ox1eef_> Bundler can install the dependencies specified by a Gemfile, but beyond that it creates a sandbox environment where anything not speciifed in your Gemfile is not available to require. It also locks dependencies to specific versions as well.
<ox1eef_> It is more or less a standard part of Ruby development nowadays.
moldorcoder7 has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
lucartc has joined #ruby
razetime has quit [Ping timeout: 272 seconds]
<apteryx> OK, thanks for the info. So bundler doesn't do anything special such as activating each dependency specified in a Gemfile, right?
<apteryx> it just makes them availabel as if they were on my GEM_PATH?
<apteryx> what differences are there between using Bundler and GEM_PATH, with regards to what ends up registered in the ::Gem.loaded_specs array?
<apteryx> I'm not seeing the same behavior, it seems: https://github.com/ioquatix/bake/issues/11
plantman2 has joined #ruby
plantman has joined #ruby
shiru has joined #ruby
plantman2 has quit [Ping timeout: 252 seconds]
plantman has quit [Ping timeout: 260 seconds]
razetime has joined #ruby
<ox1eef_> When you require "bundler/setup", you are now in the bundler sandbox, and only the dependencies in the Gemfile are available (and the versions of them specified in Gemfile.lock). Nothing is required. You can require groups with Bundler.require :group - eg, Bundler.require :default. Or you can require files the traditional way, require "lib".
<ox1eef_> I can't say for sure about GEM_(HOME|PATH), but I think Bundler will respect it, and look for its dependencies relative to it.
<ox1eef_> That's a long issue to read through. "gem.deps.rb" is not a Gemfile though, it is a list of gems you can install with "gem install -g gem.deps.rb", and those gems will be "system gems". I don't know where that's headed (eg gem.deps.rb, and Bundler) but they're not the same.
devz3ro has joined #ruby
tuxcrafter has quit [Quit: Client closed]
tuxcrafter has joined #ruby
cartdrige has joined #ruby
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
otisolsen70 has quit [Quit: Leaving]
caedmon has joined #ruby
<apteryx> ox1eef_: according to the code https://github.com/rubygems/bundler/blob/master/lib/bundler.rb#L461, gems.rb is another file name for Gemfile
<apteryx> err, it's used in preference of Gemfile when you have the 'init_gems_rb' setting on
<ox1eef_> +1 thanks!
<apteryx> which may be on by default (?) because I don't see that switch in the repo I'm using, yet bundler loads it
<apteryx> yep, it definitly uses gems.rb by default; if I 'touch Gemfile' and run 'bundle exec rate test', it prints: "Multiple gemfiles (gems.rb and Gemfile) detected. Make sure you remove Gemfile and Gemfile.lock since bundler is ignoring them in favor of gems.rb and gems.rb.locked."
<apteryx> and curiously 'bundle config set init_gems_rb false' doesn't change that
* apteryx is puzzled
shiru has quit [Remote host closed the connection]
jwr has joined #ruby
<jwr> I'm getting an error when I run `rails new blog` when I do it on a ruby 3.2 image, but the same steps work fine on ruby 3.0.2. Can anybody tell me what I'm doing wrong here? https://pastebin.com/raw/XaDtiGiy
<ruby[bot]> jwr: as I told you already, please use https://gist.github.com
<adam12> jwr: Ruby 3.2 removed `File.exists?` alias.
<adam12> jwr: One of your dependencies must still use it.
<jwr> adam12: That's fair, but I haven't really even specified any dependencies? I'm just doing `rails new blog`.
<adam12> Maybe try the latest in the rails 6.x dependency tree.
<adam12> jwr: gem install rails --version 6.1.7
<adam12> If not, you may have to go to Rails 7.
<ox1eef_> apeiros lives on in ruby[bot]
<adam12> ox1eef_: lol.
tuxcrafter has quit [Quit: Client closed]
tuxcrafter has joined #ruby
<jwr> hmm, rails 6.1.7 fails with the same error, but rails 7.0.4 works fine.
<adam12> I'm not sure of Rails backport policy. They may never support 3.2
<adam12> (for 6.x lineage that is)
dionysus69 has quit [Ping timeout: 260 seconds]
<lucartc> If I declare a gem inside my Gemfile, all my scripts in the same dir should use the version specified by 'gem "gem_name", "version"' right?
<lucartc> Of course after running 'bundle install'
<lucartc> And requiring the gem in the code
<adam12> lucartc: bundler has to be initialized somehow. Generally either `bundle exec`, or `require "bundle/setup"`
<adam12> Do this before requiring your gem.
<lucartc> Hmm, so that's what was missing. I'm gonna try it, ty adam12
<adam12> lucartc: yw
<jwr> adam12: thanks for the note about rails 6.1 possibly never supporting ruby 3.2. it looks like you are probably right: https://github.com/rails/rails/issues/46883#issuecomment-1371325906
FetidToot3 has joined #ruby
FetidToot has quit [Ping timeout: 265 seconds]
FetidToot3 is now known as FetidToot
yCrazyEdd has quit [Ping timeout: 256 seconds]
<adam12> jwr: Ah interesting.
razetime has quit [Ping timeout: 252 seconds]
Sankalp has quit [Ping timeout: 255 seconds]
Sankalp has joined #ruby
perrierjouet has quit [Ping timeout: 252 seconds]
perrierjouet has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.8]
markong has joined #ruby
dostoyevsky2 has quit [Ping timeout: 252 seconds]
perrierjouet has joined #ruby
victori has quit [Ping timeout: 268 seconds]
crax23 has quit [Ping timeout: 252 seconds]
victori has joined #ruby
_ht has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.8]
pgib has joined #ruby
yCrazyEdd has joined #ruby
dostoyevsky2 has joined #ruby
perrierjouet has joined #ruby
markong has quit [Ping timeout: 260 seconds]
perrierjouet has quit [Quit: WeeChat 3.8]
perrierjouet has joined #ruby
Sankalp has quit [Ping timeout: 252 seconds]
Sankalp has joined #ruby
FullMetalStacker has joined #ruby
FullMetalStacker has quit [Client Quit]
FullMetalStacker has joined #ruby
FullMetalStacker has quit [Client Quit]
TomyWork has quit [Remote host closed the connection]
ur5us has joined #ruby
Linux_Kerio has quit [Ping timeout: 265 seconds]
Sankalp has quit [Ping timeout: 272 seconds]
perrierjouet has quit [Quit: WeeChat 3.8]
graywolf has joined #ruby
perrierjouet has joined #ruby
plantman2 has joined #ruby
plantman has joined #ruby
FullMetalStacker has joined #ruby
lederle has joined #ruby
FullMetalStacker has quit [Client Quit]
lederle has quit [Client Quit]
dionysus69 has joined #ruby
jwr has quit [Remote host closed the connection]
Sankalp has joined #ruby
Sankalp has quit [Ping timeout: 252 seconds]
Sankalp- has joined #ruby
Sankalp- is now known as Sankalp
_ht has quit [Quit: _ht]
Shortstop has joined #ruby
plantman has quit [Ping timeout: 252 seconds]
plantman2 has quit [Ping timeout: 252 seconds]
hightower4 has joined #ruby
hightower3 has quit [Ping timeout: 246 seconds]
tomtmym has quit [Quit: Gone.]
markong has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
plantman has joined #ruby
plantman2 has joined #ruby
plantman has quit [Ping timeout: 252 seconds]
plantman2 has quit [Ping timeout: 260 seconds]
stirl has joined #ruby
graywolf has quit [Quit: WeeChat 3.5]
Na_Klar has joined #ruby