Gem In A Box is a simple Sinatra app that allow you to host your own in-house gems
Has a web interface and support a command line to remotely publish new gem
Its smooth, fast, easy to set up and it just works
Cool links for setting up Gem in a Box
http://guides.rubygems.org/run-your-own-gem-server/
https://github.com/geminabox/geminabox
http://www.jamesrobertson.eu/blog/2015/jan/20/running-your-own-gem-server.html
First thing first, make sure your environment is set up and updated if you haven’t already
Install or update Ruby, below are a few ways to go about it
If your having issues with using RVM (updating or switch your Ruby version)
“ RVM is not a function, selecting rubies with ‘rvm use ..’ will not work”.
Try this from stackoverflow:
“[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
Update or Download RubyGems v2.4.8
Once you have your environment set up, just follow the simple direction provided from the guilds.
1. Install the gem geminabox
[~/dev/geminabox] gem install geminabox
2. Create a file directory to place your gems
[~/dev/geminabox] mkdir data
3. Within the geminabox directory create the following config.ru file
Make sure this is added within the config.ru file
[~/dev/geminabox] cat config.ru require
Geminabox.data = "./data"
run Geminabox::Server
4. Within your directory run the server with rackup
Use config.ru –o to add your own IP or HHTP address
e.g. rackup config.ru -o 190.163.4.193
5. You can use the web interface available on http://localhost:9292 to push your gem or use the command gem inabox
The first time you do this, you’ll be prompted for the location of your gem server.
type in the URL e.g. http://192.168.4.190:9292/. After that it will return with something similar to the following error:
Host: You didn't specify a gem, looking for one in . and in ./pkg/... ERROR: While executing gem ... (Gem::CommandLineError)
Couldn't find a gem in pkg, please specify a gem name on the command line (e.g. gem inabox GEMNAME)
Change into the file directory where the gem file is stored and run inabox again this time supplying the gem to be pushed e.g.
james@mia:~/gem_src/xes$ gem inabox ./secretgem-0.0.1.gem
[~/dev/secretgem] gem build secretgem.gemspec
Successfully built RubyGem Name: secretgem
Version: 0.0.1
File: secretgem-0.0.1.gem
[~/dev/secretgem] gem inabox ./secretgem-0.0.1.gem
Enter the root url for your personal geminabox instance. (E.g. http://gems/)
Host: http://localhost:9292
Pushing secretgem-0.0.1.gem to http://localhost:9292/..