geminabox / geminabox Goto Github PK
View Code? Open in Web Editor NEWReally simple rubygem hosting
Home Page: https://tomlea.co.uk/p/gem-in-a-box
License: MIT License
Really simple rubygem hosting
Home Page: https://tomlea.co.uk/p/gem-in-a-box
License: MIT License
We have an internal gem that, when uploaded, doesn't create a spec under $DATA_DIRECTORY/quick/Marshal.4.8/
The .gem
file does exist under $DATA_DIRECTORY/gems/
and in $DATA_DIRECTORY/latest_specs.4.8
, however.
As a result, requesting the index of the geminabox server throws a undefined dependencies for nil error because getting the spec returns nil for this gem.
Any thoughts on why the spec is not getting uploaded?
Can gem-in-a-box generate the rdoc like gem server
does?
I tried to use the inabox command to push a gem to a secured gem server and it didn't work. I think the problem comes from the fact that the :use_ssl flag is not set when the HTTP::start method is called.
If I upload an existing gem the app 500's with
NameError - uninitialized constant Geminabox::Digest:
/usr/lib/rvm/gems/ruby-1.9.2-p180@geminabox/gems/geminabox-0.3.0/lib/geminabox.rb:63:in `block in <class:Geminabox>'
/usr/lib/rvm/gems/ruby-1.9.2-p180@geminabox/gems/sinatra-1.2.6/lib/sinatra/base.rb:1152:in `call'
/usr/lib/rvm/gems/ruby-1.9.2-p180@geminabox/gems/sinatra-1.2.6/lib/sinatra/base.rb:1152:in `block in compile!'
adding
require 'digest'
to lib/geminabox.rb seems to fix it.
I have a straight forward local install to play with (via thin, and a simple local thin start). I have the geminabox web site running at localhost:3000.
I use gem inabox pkg/spiffygem-0.1.0.gem
and there are no errors during the push.
I can see that everything seems to be in order in the geminabox/data folder, and the web site shows the gem.
I have done gem sources -a http://localhost:3000/
Whether I just gem install xxxx
or use the --source option, I get the error that the gem cannot be found.
Is it a valid gem, you ask? Well, I have already built the gem and installed it via the local build process, and it works just fine, AFAICT the gems themselves are valid in that they work in my applications.
What should I be checking?
BTW -- not cleaar to me at all what the Upload on the site is for. Upload what?
It'd be really cool to have an example capistrano script.
I would like to be able to push multiple gems to inabox in one command:
gem inabox *.gem
Pull request to come, re-jiggering inabox command to call get_all_gem_names when multiple gems are passed in.
Extend the client to let me push all the files referenced by a Gemfile.lock in one command, thus ensuring all my gems needed for an app are available.
When I upload a gem from my /pkg
directory, if the gem is named rb-gsms-0.1.0.gem
, things work great. If, however, I specify in my rb-gsms.gemspec
that the platform is java
, it will create a different .gem
file, namely rb-gsms-0.1.0-java.gem
, and I get a funny exception:
Errno::ENOENT - No such file or directory - ./quick/Marshal.4.8/rb-gsms-0.1.1.gemspec.rz:
C:/Ruby192/lib/ruby/gems/1.9.1/gems/geminabox-0.2.14/lib/geminabox.rb:87:in `read'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/geminabox-0.2.14/lib/geminabox.rb:87:in `spec_for'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/geminabox-0.2.14/lib/../views/index.erb:20:in `block in evaluate_source'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/geminabox-0.2.14/lib/geminabox/gem_version_collection.rb:23:in `each'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/geminabox-0.2.14/lib/geminabox/gem_version_collection.rb:23:in `each'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/geminabox-0.2.14/lib/../views/index.erb:8:in `evaluate_source'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/tilt-1.2.2/lib/tilt.rb:251:in `instance_eval'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/tilt-1.2.2/lib/tilt.rb:251:in `evaluate_source'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/tilt-1.2.2/lib/tilt.rb:186:in `cached_evaluate'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/tilt-1.2.2/lib/tilt.rb:169:in `evaluate'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/tilt-1.2.2/lib/tilt.rb:118:in `render'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:567:in `render'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:459:in `erb'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/geminabox-0.2.14/lib/geminabox.rb:23:in `block in <class:Geminabox>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:1165:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:1165:in `block in compile!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:738:in `instance_eval'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:738:in `route_eval'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:722:in `block (2 levels) in route!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:772:in `block in process_route'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:769:in `catch'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:769:in `process_route'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:721:in `block in route!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:720:in `each'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:720:in `route!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:857:in `dispatch!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:648:in `block in call!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `instance_eval'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `block in invoke'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `catch'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `invoke'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:648:in `call!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:633:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:703:in `forward'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:786:in `route_missing'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:733:in `route!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:729:in `route!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:857:in `dispatch!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:648:in `block in call!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `instance_eval'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `block in invoke'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `catch'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `invoke'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:648:in `call!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:633:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/showexceptions.rb:21:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/showexceptions.rb:21:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/methodoverride.rb:24:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:1284:in `block in call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:1315:in `synchronize'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:1284:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:48:in `_call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:36:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/showexceptions.rb:24:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/commonlogger.rb:18:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/content_length.rb:13:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/handler/webrick.rb:52:in `service'
C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
C:/Ruby192/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
Errno::ENOENT - No such file or directory - ./quick/Marshal.4.8/rb-gsms-0.1.1.gemspec.rz:
C:/Ruby192/lib/ruby/gems/1.9.1/gems/geminabox-0.2.14/lib/geminabox.rb:87:in `read'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/geminabox-0.2.14/lib/geminabox.rb:87:in `spec_for'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/geminabox-0.2.14/lib/../views/index.erb:20:in `block in evaluate_source'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/geminabox-0.2.14/lib/geminabox/gem_version_collection.rb:23:in `each'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/geminabox-0.2.14/lib/geminabox/gem_version_collection.rb:23:in `each'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/geminabox-0.2.14/lib/../views/index.erb:8:in `evaluate_source'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/tilt-1.2.2/lib/tilt.rb:251:in `instance_eval'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/tilt-1.2.2/lib/tilt.rb:251:in `evaluate_source'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/tilt-1.2.2/lib/tilt.rb:186:in `cached_evaluate'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/tilt-1.2.2/lib/tilt.rb:169:in `evaluate'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/tilt-1.2.2/lib/tilt.rb:118:in `render'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:567:in `render'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:459:in `erb'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/geminabox-0.2.14/lib/geminabox.rb:23:in `block in <class:Geminabox>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:1165:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:1165:in `block in compile!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:738:in `instance_eval'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:738:in `route_eval'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:722:in `block (2 levels) in route!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:772:in `block in process_route'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:769:in `catch'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:769:in `process_route'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:721:in `block in route!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:720:in `each'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:720:in `route!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:857:in `dispatch!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:648:in `block in call!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `instance_eval'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `block in invoke'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `catch'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `invoke'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:648:in `call!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:633:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:703:in `forward'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:786:in `route_missing'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:733:in `route!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:729:in `route!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:857:in `dispatch!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:648:in `block in call!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `instance_eval'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `block in invoke'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `catch'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `invoke'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:648:in `call!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:633:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/showexceptions.rb:21:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/showexceptions.rb:21:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/methodoverride.rb:24:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:1284:in `block in call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:1315:in `synchronize'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:1284:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:48:in `_call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:36:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/showexceptions.rb:24:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/commonlogger.rb:18:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/content_length.rb:13:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/handler/webrick.rb:52:in `service'
C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
C:/Ruby192/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
If I go into the quick/Marshal.4.8
folder, I find that I have a rb-gsms-0.1.1-java.gemspec.rz
, where it assumes the missing -java
part.
Hi,
I've been using Geminabox 0.3
, with this :
/var/www/geminabox/config.ru
:
require "rubygems"
require "geminabox"
Geminabox.data = "/var/www/geminabox/data"
run Geminabox
After the 0.10
upgrade, what is in the public folder of the gem is not picked up => 404
Do I need to copy the public folder's content over?
Thanks
It would be nice to have a way to rebuild the index for when you manually remove or add a gem or to just fix problems.
A command line tool or a URL that could be visited would be great.
Visiting /atom.xml shows the Sinatra 500 screen with an error of "undefined method `size' for nil:NilClass" and a stack trace pointing to line 10 of atom.erb. Perusal of the code suggests that this is pretty fundamentally broken:
@gems.each do |name, versions|
# call versions.size
end
...but since @gems.each
falls through to calling each on an array, the second parameter is nil, and so versions.size
(and other calls to methods on versions
) all asplode.
Has the atom functionality been abandoned? Am I misreading or misconfiguring something somehow? I'd be willing to re-implement the atom feed if that would be helpful; I just want to check that I'm not duplicating somebody else's efforts or misconfiguring something first.
views/index.erb
line #3 has a url()
method evidently that isn't defined. Any ideas?
I'm running ruby 1.9.3 on Ubuntu with RVM, get the same error whether I do a simple rackup
in the project folder, or configured via passenger & then view the apache error logs.
I'm not familiar with Sinatra to know if that's where this function should come from.
ruby-1.9.1
geminabox 0.8.0
Windows Server 2008 R2 SP1 (64bit)
After installing the geminabox server it is starting OK, presents an index page but every time a new gem is uploaded (either through the upload button or through gem inabox command) the indexing seems to fail with the following error:
ERROR: Unable to process ./data/gems/bundler-1.2.2.gem
no metadata found in ./data/gems/bundler-1.2.2.gem (Gem::Package::FormatError)
The same happens for any gem I tried. The index page does not list any installed gems (from the spec I suspect it should). However, gem install does seem to work for some of the gems.
Hello,
I successfully installed geminabox and started my server as specified at http://guides.rubygems.org/run-your-own-gem-server/
I am able to push gems using the web view, but not using the command line. Here is the result received :
$ gem inabox hola_nico-0.0.1.gem
Pushing hola_nico-0.0.1.gem to http://localhost:9292...
<HTML>
<HEAD><TITLE>Redirection</TITLE></HEAD>
<BODY><H1>Redirect</H1></BODY>
$
I have installed geminabox latest version and ran the config.ru file and started the server.
server is running on http://localhost:9292. When i am hitting http://localhost:9292 in IE, it is updating on command prompt where server is running with 200 code.
But when i try to use command-
C:\MyGems\rica-master>gem inabox ./rica-0.0.1.gem
Pushing rica-0.0.1.gem to http://localhost:9292/...
ERROR: Error (400 received)
I am using "USe automatic configuration script" and HTTP_PROXY variable is set to company provided address.
Please help me with solution.
Cloned a git repository (https://github.com/rodrigob/swf_fu) and built the gem, pushing it to my geminabox installation. The upload succeeded, but the gem never showed up in the listings, and was not installable from this source.
Saw that it was uploaded correctly, and present in my datadir. Worked fine with another, so figured it had to be this particular gem. When inspecting the gemspec, I saw that it had listed the authors as s.authors = ["Marc-Andr\303\251 Lafortune", "Marcus Wyatt", "Rodrigo Benenson"]
. Removed the \303\251 and replaced with "normal" characters, and all was well.
Running Ruby 1.9.2-p290 and geminabox 0.3.0 (I think, at least that's what gem list
tells me)
Unfortunately, geminabox upload does not work if you've got a normal connection and bigger gems:
ERROR: While executing gem ... (HTTPClient::SendTimeoutError)
execution expired```
I did a local fix in geminabox_client:
@http_client.receive_timeout = 600
@http_client.send_timeout = 600
Could you set a higher timeout with the next release aswell?
Found that running this under ruby 1.9.2p0 throws an error from the index view on line 29.
– <%= spec.authors.map do |author|
It doesn't seem to like the double dash that trails from the author span. I removed it and it seems to work great now. I would submit a patch but this seems easier for a current commiter to change.
This was done building from a downloaded version of master since it appears the version on github and that posted to rubygems.org is off.
Hi,
I've automated my gem building in a bash script.
At the beginning, I do "set -e" to break the script if any command returns with an error code.
Geminabox returns an error when it receives a non200
http status code, and when I push a gem I get a 302
.
https://github.com/cwninja/geminabox/blob/master/lib/geminabox_client.rb#L32-L36
Is it normal that I get a 302
instead of a 200
? if so, why is considered a reason to terminate the interaction with a 1
error code ?
Thanks.
I failed to install any gem in the geminabox, and I find gem to request /quick/Marshal.4.8/xxxx-0.4.2.gemspec.rz and geminabox return 404, and I can not find quick directory in the Geminabox.data directory. Any plan to fix this problem.
Doing this:
gem inabox pkg/debug_me-0.3.0.gem --host http://c2c245alp-s030:9292
Pushing debug_me-0.3.0.gem to http://c2c245alp-s030:9292/upload...
ERROR: While executing gem ... (Net::HTTPFatalError)
500 "Internal Server Error"
Started up like this:
rackup --port 9292 --server thin --daemonize --pid /root/geminabox/geminabox.pid /root/geminabox/config.ru
config.ru looks like this:
require "geminabox"
Geminabox.data = "/repos/gems" # The location of the C2C gem repo data
run Geminabox
Uploads to boxes with a large number of gems (200 or more) take ages while the rebuild happens.
Possible Solutions:
Geminabox doesn't seem to work with the current version of bundler.
I've added my gem server into my Gemfile, something along the lines of:
source 'http://mygems:9292'
gem 'thing'
but when I run bundle install, I get the following error message:
$ bundle install
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://mygems:9292/.
Fetching full source index from http://mygems:9292/
Bundler::HTTPError
Running bundle install with DEBUG=true, gives this:
Fetching full source index from http://mygems:9292/
Fetching from: http://mygems:9292/quick/Marshal.4.8/thing-1.0.0.gemspec.rz
HTTP Error
Bundler::HTTPError
.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/fetcher.rb:154:in `fetch'
.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/fetcher.rb:56:in `fetch_spec'
...
Am I doing something wrong, or is this a genuine issue? Is there any way I can work around it?
Thanks.
Hi there,
it would be really cool if gem in a box could "inject itself" into the normal bundler task/replace it.
i guess most people are used to it and it would make you actually type less :-)
Best,
Tobias
Took me about 10 minutes to figure on my own so to save the pain to other people:
If you define your gems directory as:
Geminabox.data = "/var/geminabox"
Run the following:
mkdir -p /var/geminabox/gems
chown a+rw /var/geminabox/gems -R
Other than that.... freakingly amazingly useful project... thanks a lot for making this :)
I am adding a post to my blog about this to try to spread the word
Any specific license attached to this?
The 'geminabox' gem command blows up if mime-types gem isn't present on the box. Geminabox should add this as a dependency to ensure it's present.
The installation command on the web interface for prerelease gems doesn't include the --prerelease flag.
After I upload a gem, the gem index is being updated to include system gems while ignoring the gems I have uploaded. I can confirm that the gems exist in the Geminabox.data path after I upload them and if i run "gem generate_index -d /path/to/gems" using the same path I have set in Geminabox.data, the gem index is properly updated with the gems I have uploaded.
would be good if there was a version that only added the gem inabox command, rather than all the other server-y bits. That way I can install geminabox in my global gemset (rvm) without worrying about version conflicts (rack etc).
Hi,
any plans to support the Rubygems API that Bundler 1.1 will take advantage of?
Thanks!
We moved our gem server from http://example.com/gems/
to https://gems.example.com/
and setup 301 redirects to so that old gem setups would continue to work.
However, doing gem inabox foobar-1.2.3.gem
fails because it won't follow the 301 redirect from http://example.com/gems/
to https://gems.example.com/
.
I expected it to work, like gem pull
continued to work with the old URL.
I'm using version 0.8.0
Hi Tom,
We've been using Geminabox at my company for awhile now, and first and for most thanks for putting this out there. It has been incredibly helpful.
Our issue however is that gems seem to not appear to be properly indexed upon loading them with the gem inabox command. They show up on the page, and they even show up when one does gem search $NAME --source=http://private.server --both.
However, gem install $NAME always fails unless we hit the reindex URL on the private server. However over time that indexing has become slower and slower, to the point where we can't increase the timeout anymore on the request to allow it to succeed (it's currently at 2 minutes).
I tried setting incremental updates to true to see if that would help. Our config.ru looks like this:
require "rubygems"
require "geminabox"
Geminabox.data = "/var/www/geminabox/data" # …or wherever
Geminabox.configure do |config|
config.set(:incremental_updates, true)
end
run Geminabox
But it seems to not help at all. Any ideas as to what could be wrong? We are currently hosting 789 gems on our gem server.
How to reproduce:
/reindex
What I expect:
It should take less than a second.
Notes:
I can reproduce with some proprietary indexes. Running gem generate_index
is nearly instantaneous. But /reindex
is painfully slow and causes problems with uploading and deleting gems.
I suspect that geminbox is opening the gems and reading through the whole file for some reason. I notice in the logs, that the output from generate_index
doesn't show up till very late... So I suspect geminabox is doing something before running the generate_index
that is causing the slowup.
This is with geminabox 0.10.1 and rubygems 1.8.24
I've setup geminabox to respond on a subpath, http://host/gems/, I needed an extra Rack layer to do this and my reverse proxy is mapping onto the service.
This works fine with gem, but the gem plugin for uploading breaks since it is uploading to http://host/upload, throwing away the path element.
I believe it should be ok to keep the path element since the gem command can handle it for downloading.
When first prompted to enter a host, I entered 127.0.0.1 -- now trying use inabox generates an error:
Pushing my.1-0-0.gem to 127.0.0.1...
ERROR: While executing gem ... (NoMethodError)
undefined method `+' for nil:NilClass
I can't figure out how to update the host name to something else.
For the same reasons than rubygems.org, Geminabox is vulnerable because rubygems is vulnerable in in the first place.
I haven't see anything moving here. This is a kind reminder.
It seems like the .gemspec.rz files stopped being generated in 0.5.1 which makes commands like "gem update " fail miserably with 404 error.
The Ruby 1.8.7 Tempfile
constructor has this signature:
def initialize(basename, tmpdir=Dir::tmpdir)
Geminabox however calls it like this (in incoming_gem.rb
, line 8):
@tempfile = Tempfile.new("gem", :encoding => 'binary')
The options argument here is not present in Ruby 1.8.7 (http://www.ruby-doc.org/stdlib-1.8.7/libdoc/tempfile/rdoc/Tempfile.html#method-c-new), though it is in 1.9 (http://www.ruby-doc.org/stdlib-1.9.3/libdoc/tempfile/rdoc/Tempfile.html#method-c-new), and so this leads to this error:
RuntimeError - cannot generate tempfile `':
/opt/vagrant_ruby/lib/ruby/1.8/tempfile.rb:52:in `initialize'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/geminabox-0.10.0/lib/geminabox/incoming_gem.rb:8:in `new'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/geminabox-0.10.0/lib/geminabox/incoming_gem.rb:8:in `initialize'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/geminabox-0.10.0/lib/geminabox.rb:105:in `new'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/geminabox-0.10.0/lib/geminabox.rb:105:in `POST /upload'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.3.3/lib/sinatra/base.rb:1264:in `call'
e.g.
curl -F file=@pkg/mygem-0.1.0.gem http://gems.example.com/upload
It would be nice to be able to use a different storage other then filesystem, for instance Amazon S3.
This is a pretty massive feature request but in light of recent events I think it would be very useful.
Basically make geminabox download and cache any gems that it needs to to satisfy requests made of it.
The scenario is that Company A can have its own geminabox server and all application gemfiles use ONLY that server as a source.
Any time a bundle command is issued bundler tries to download the gems from geminabox, if geminabox does not currently have that gem then it downloads from rubygems and adds it to its inventory as well as sending it on to bundler.
This has a few advantages.
Naturally this cache may take up quite a bit of space so this feature should be optional (default off)
I'm trying to push my gem to a local server, and I get the following error:
C:\dev\repos\gems\my-gem> gem inabox .\pkg\my-gem-0.1.0.gem --verbose --backtrace
Pushing my-gem-0.1.0.gem to http://localhost:9292/...
ERROR: While executing gem ... (SystemCallError)
Unknown error - Unknown Error (20047) - -1
org/jruby/RubyFile.java:1834:in `size'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/gems/1.8/gems/httpclient-2.2.4/lib/httpclient/http.rb:592:in `add'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/gems/1.8/gems/httpclient-2.2.4/lib/httpclient/http.rb:652:in `build_query_multipart_str'
org/jruby/RubyHash.java:1186:in `each'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/gems/1.8/gems/httpclient-2.2.4/lib/httpclient/http.rb:623:in `build_query_multipart_str'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/gems/1.8/gems/httpclient-2.2.4/lib/httpclient/http.rb:535:in `set_content'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/gems/1.8/gems/httpclient-2.2.4/lib/httpclient/http.rb:447:in `init_request'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/gems/1.8/gems/httpclient-2.2.4/lib/httpclient/http.rb:705:in `new_request'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/gems/1.8/gems/httpclient-2.2.4/lib/httpclient.rb:997:in `create_request'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/gems/1.8/gems/httpclient-2.2.4/lib/httpclient.rb:866:in `do_request'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/gems/1.8/gems/httpclient-2.2.4/lib/httpclient.rb:756:in `request'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/gems/1.8/gems/httpclient-2.2.4/lib/httpclient.rb:666:in `post'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/gems/1.8/gems/geminabox-0.6.1/lib/geminabox_client.rb:28:in `push'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/gems/1.8/gems/geminabox-0.6.1/lib/rubygems/commands/inabox_command.rb:54:in `send_gems'
org/jruby/RubyArray.java:1615:in `each'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/gems/1.8/gems/geminabox-0.6.1/lib/rubygems/commands/inabox_command.rb:51:in `send_gems'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/gems/1.8/gems/geminabox-0.6.1/lib/rubygems/commands/inabox_command.rb:45:in `execute'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/command.rb:278:in `invoke'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:147:in `process_args'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:117:in `run'
C:/dev/torquebox/torquebox-2.x/jruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:65:in `run'
C:\dev\torquebox\torquebox-2.x\jruby\bin\gem:21:in `(root)'
I using jruby 1.6.7 (ruby-1.9.2-p312) on Windows 7.
*** LOCAL GEMS ***
blankslate (2.1.2.4)
bouncy-castle-java (1.5.0146.1)
builder (3.0.0)
bundler (1.1.3)
clj (0.0.5.6)
geminabox (0.6.1)
httpclient (2.2.4)
jruby-openssl (0.7.6.1)
jruby-win32ole (0.8.5)
rack (1.4.1)
rack-protection (1.2.0)
rake (0.8.7)
sinatra (1.3.2)
sources (0.0.1)
thor (0.14.6)
tilt (1.3.3)
torquebox (2.0.0)
torquebox-cache (2.0.0 java)
torquebox-capistrano-support (2.0.0)
torquebox-configure (2.0.0 java)
torquebox-core (2.0.0 java)
torquebox-messaging (2.0.0 java)
torquebox-naming (2.0.0 java)
torquebox-no-op (2.0.0)
torquebox-rake-support (2.0.0)
torquebox-security (2.0.0 java)
torquebox-stomp (2.0.0)
torquebox-transactions (2.0.0)
torquebox-web (2.0.0 java)
Any ideas how I might fix or work-around this?
I'm involved with a gem server for internal gems, and GemInABox rocks for uploading and serving them. However, we'd also like to have an associated server for their documentation. gem server
can do that, but not with the information GiaB currently puts on the filesystem. It would be nice if GiaB's on-disk repo was usable by gem server
.
Stock OSX 10.7.3 Ruby 1.8.7 and RubyGems (v1.3.6), did sudo gem install geminabox
and getting the above error whenever I invoke gem
ever since. Is this a RubyGems compatibility problem?
This looks like it may have the same root as #16.
I cannot download, delete or gem install
a JRuby gem I have uploaded to geminabox.
The problem appears to be that the files are stored as geminabox/data/gems/my_gem-0.0.1.gem
not geminabox/data/gems/my_gem-0.0.1-java.gem
, as renaming them fixes the issue.
If you fire up a fresh geminabox server and then attempt to add it to your gem sources it fails:
jheiss@sleet:~/junk> gem sources -a http://localhost:8080/
Error fetching http://localhost:8080/:
bad response Not Found 404 (http://localhost:8080/specs.4.8.gz)
As soon as you upload a gem it starts working.
There hasn't been a version bump in months, even though there appear to be many small fixes since v0.6.1. Can you bump the version and release to RubyGems?
In particular, the insecure content warning appears to be fixed in master, but is still in v0.6.1 (i.e. loading Google Web Fonts over http generates warnings when serving the site over SSL).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.