Skip to content

Instantly share code, notes, and snippets.

@junaruga
Last active October 19, 2021 15:28
Show Gist options
  • Save junaruga/5cb4a88e4daf16b4d4d14380ba30304c to your computer and use it in GitHub Desktop.
Save junaruga/5cb4a88e4daf16b4d4d14380ba30304c to your computer and use it in GitHub Desktop.
$ git diff
diff --git a/config.rb b/config.rb
index eef824a..d7f8fe0 100644
--- a/config.rb
+++ b/config.rb
@@ -40,7 +40,7 @@ Gemirro.configuration.configure do
gem 'gem2rpm', '>= 1.0.1'
end
- # define_source 'private-repo', 'http://127.0.0.1:8801' do
- # gem 'a', '>= 0.0.1'
- # end
+ define_source 'private-repo', 'http://127.0.0.1:8801' do
+ gem 'a', '>= 0.0.1'
+ end
end
$ cat config.rb
# This is the main configuration file for your RubyGems mirror. Here you can
# change settings such as the location to store Gem files in and what source
# and Gems you'd like to mirror at start.
Gemirro.configuration.configure do
# Define sinatra environment
environment :production
# The directory to store indexing information as well as the Gem files in.
destination File.expand_path('../public', __FILE__)
# If you're in development mode your probably want to switch to a debug
# logging level.
logger.level = Logger::INFO
# If you want to run your server on a specific host and port, you must
# change the following parameters (server_host and server_port).
#
# server.host 'localhost'
# server.host '127.0.0.1'
server.port '8801'
# If you don't want the server to run daemonized, uncomment the following
# server.daemonize false
server.access_log File.expand_path('../logs/access.log', __FILE__)
server.error_log File.expand_path('../logs/error.log', __FILE__)
# If you don't want to generate indexes after each fetched gem.
#
# update_on_fetch false
# If you don't want to fetch gem if file does not exists when
# running gemirro server.
#
# fetch_gem false
# You must define a source which where gems will be downloaded.
# All gem in the block will be downloaded with the update command.
# Other gems will be downloaded with the server.
define_source 'rubygems', 'https://rubygems.org' do
gem 'gem2rpm', '>= 1.0.1'
end
define_source 'private-repo', 'http://127.0.0.1:8801' do
gem 'a', '>= 0.0.1'
end
end
$ git clean -fdx
$ ./test.sh
++ command -v ruby
/usr/local/ruby-2.7.4/bin/ruby
++ ruby -v
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux]
++ command -v gemirro
/home/jaruga/.gem/ruby/2.7.0/bin/gemirro
++ gemirro --version
gemirro v1.3.0 on ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux]
+++ pwd
++ gemirro init /home/jaruga/git/report-gemirro-bundler-error
Initialized empty mirror in /home/jaruga/git/report-gemirro-bundler-error
++ cp -p fixtures/gems/a/a-0.0.1.gem public/gems/
++ sleep 1
++ gemirro update
I, [2021-10-19T17:26:49.162182 #116314] INFO -- : Fetching specs.4.8.gz on private-repo (http://127.0.0.1:8801)
I, [2021-10-19T17:26:49.164595 #116314] INFO -- : Fetching prerelease_specs.4.8.gz on private-repo (http://127.0.0.1:8801)
Traceback (most recent call last):
13: from /home/jaruga/.gem/ruby/2.7.0/bin/gemirro:23:in `<main>'
12: from /home/jaruga/.gem/ruby/2.7.0/bin/gemirro:23:in `load'
11: from /home/jaruga/.gem/ruby/2.7.0/gems/gemirro-1.3.0/bin/gemirro:7:in `<top (required)>'
10: from /home/jaruga/.gem/ruby/2.7.0/gems/slop-3.6.0/lib/slop.rb:211:in `parse'
9: from /home/jaruga/.gem/ruby/2.7.0/gems/slop-3.6.0/lib/slop.rb:235:in `parse!'
8: from /home/jaruga/.gem/ruby/2.7.0/gems/slop-3.6.0/lib/slop.rb:260:in `parse!'
7: from /home/jaruga/.gem/ruby/2.7.0/gems/gemirro-1.3.0/lib/gemirro/cli/update.rb:19:in `block (2 levels) in <top (required)>'
6: from /home/jaruga/.gem/ruby/2.7.0/gems/gemirro-1.3.0/lib/gemirro/gems_fetcher.rb:29:in `fetch'
5: from /home/jaruga/.gem/ruby/2.7.0/gems/gemirro-1.3.0/lib/gemirro/gems_fetcher.rb:29:in `each'
4: from /home/jaruga/.gem/ruby/2.7.0/gems/gemirro-1.3.0/lib/gemirro/gems_fetcher.rb:30:in `block in fetch'
3: from /home/jaruga/.gem/ruby/2.7.0/gems/gemirro-1.3.0/lib/gemirro/gems_fetcher.rb:30:in `each'
2: from /home/jaruga/.gem/ruby/2.7.0/gems/gemirro-1.3.0/lib/gemirro/gems_fetcher.rb:40:in `block (2 levels) in fetch'
1: from /home/jaruga/.gem/ruby/2.7.0/gems/gemirro-1.3.0/lib/gemirro/gems_fetcher.rb:106:in `fetch_gem'
/usr/local/ruby-2.7.4/lib/ruby/2.7.0/rubygems/requirement.rb:249:in `satisfied_by?': Need a Gem::Version: nil (ArgumentError)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment