These are a collection of small thoughts or ideas that don't (yet) merit a larger post.
path/on/disk/gemdir:/app/path/vendor/gems/my_gem
and then set your Gemfile to gem "my_gem", path: "vendor/gems/my_gem"
.def local_gem_exists?(name)
File.directory?("vendor/gems/#{name}")
end
def maybe_local_gem(name, env: ENV.fetch("RACK_ENV", production), **opts)
return gem name, **opts if env == "production" || !local_gem_exists?
gem name, opts.merge(path: "vendor/gems/#{name}")
end
# and use like:
maybe_local_gem "my_gem" # if you've mounted the gem, loads from path, otherwise declares remote gem
gem()
.