Need help with gemirro?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

PierreRambaud
129 Stars 24 Forks GNU General Public License v3.0 208 Commits 8 Opened issues

Description

Gem to automatically make a rubygems mirror.

Services available

!
?

Need anything else?

Contributors list

# 21,281
PHP
Git
vuex
ecommer...
100 commits
# 24,436
Ansible
tempera...
thinkpa...
Symfony
2 commits
# 692,483
puppet
Ruby
HTML
Shell
1 commit
# 597,312
HTML
Python
paralle...
Shell
1 commit
# 760,066
HTML
Ruby
1 commit
# 544,301
puppet
HTML
Groovy
Shell
1 commit
# 181,937
C
diy
oculus
GraphQL
1 commit
# 73,774
Google
Firebas...
HTML
CSS
1 commit

Gemirro | Build Status Gem Version

Gemirro is a Ruby application that makes it easy way to create your own RubyGems mirror without having to push or write all gem you wanted in a configuration file. It does mirroring without any authentication and you can add your private gems in the

gems
directory. More, to mirroring a source, you only need to start the server, and gems will automaticly be downloaded when needed.

Requirements

  • Ruby 2.2 or newer
  • Enough space to store Gems
  • A recent version of Rubygems (
    gem update --system
    )

Installation

Assuming RubyGems isn't down you can install the Gem as following:

$ gem install gemirro

Usage

The process of setting up a mirror is fairly easy and can be done in few seconds.

The first step is to set up a new, empty mirror directory. This is done by running the

gemirro init
command.
$ gemirro init /srv/http/mirror.com/

Once created you can edit the main configuration file called config.rb. This configuration file specifies what source to mirror, destination directory, server host and port, etc.

Once configured and if you add gem in the

define_source
, you can pull them by running the following command:
$ gemirro update

Once all the Gems have been downloaded you'll need to generate an index of all the installed files. This can be done as following:

$ gemirro index
$ gemirro index --update # Or only update new files

Last, launch the server, and all requests will check if gems are detected, and download them if necessary and generate index immediately.

$ gemirro server --start
$ gemirro server --status
$ gemirro server --restart
$ gemirro server --stop

If you want to use a custom configuration file not located in the current directory, use the

-c
or
--config
option.

Available commands

Usage: gemirro [COMMAND] [OPTIONS]

Options:

-v, --version      Shows the current version
-h, --help         Display this help message.

Available commands:

index Retrieve specs list from source. init Sets up a new mirror list List available gems. server Manage web server update Updates the list of Gems

See <command> --help for more information on a specific command.

Apache configuration

You must activate the apache

proxy
module.
$ sudo a2enmod proxy
$ sudo a2enmod proxy_http

Create your VirtualHost and replace following

http://localhost:2000
with your custom server configuration located in your
config.rb
file and restart Apache.
  ServerName mirror.gemirro
  ProxyPreserveHost On
  ProxyRequests off
  ProxyPass / http://localhost:2000/
  ProxyPassReverse / http://localhost:2000/

Nginx configuration

Replace

localhost:2000
with your custom server configuration located in your
config.rb
file and restart Nginx.
upstream gemirro {
  server localhost:2000;
}

server { server_name rbgems;

location / { proxy_pass http://gemirro; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }

Known issues

could not find a temporary directory

If you use ruby >= 2.0, some urls in the server throwing errors telling

could not find a temporary directory
. You only need to do a
chmod o+t /tmp

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.