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?
<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.
<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