# Tinderbox with unpublished gem

**URL:** <https://www.ruby-forum.com/t/tinderbox-with-unpublished-gem/86479>\
**Category:** Ruby\
**Created:** [February 22, 2007, 4:47pm UTC](https://www.ruby-forum.com/t/tinderbox-with-unpublished-gem/86479 "2007-02-22T16:47:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![crucoba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Post date:** [February 22, 2007, 4:47pm UTC](https://www.ruby-forum.com/t/tinderbox-with-unpublished-gem/86479/1 "2007-02-22T16:47:01Z")

</div>

How can I run an unpublished gem in tinderbox?

---

<div class="post-metadata">

**Author:** ![crucoba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Post date:** [February 22, 2007, 6:06pm UTC](https://www.ruby-forum.com/t/tinderbox-with-unpublished-gem/86479/2 "2007-02-22T18:06:21Z")

</div>

On Feb 22, 2007, at 10:46 AM, David C. wrote:

> How can I run an unpublished gem in tinderbox?

Untested: Create a tinderbox/cache directory and drop your gem in  
there. Run tinderbox\_gem\_build.

---

<div class="post-metadata">

**Author:** ![crucoba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Post date:** [February 22, 2007, 6:34pm UTC](https://www.ruby-forum.com/t/tinderbox-with-unpublished-gem/86479/3 "2007-02-22T18:34:25Z")

</div>

On 2/22/07, Ryan D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Feb 22, 2007, at 10:46 AM, David C. wrote:
> 
> > How can I run an unpublished gem in tinderbox?
> 
> Untested: Create a tinderbox/cache directory and drop your gem in  
> there. Run tinderbox\_gem\_build.

Thanks Ryan - I had tried that, but I get into an infinite loop  
(output below), so I thought perhaps I was on the wrong path.

I’m on mac os 10.4, ruby 1.8.5,

Here’s the output. If anything strikes you off the bat, please help.  
If not, I’ll keep digging.

Thanks,  
David

$ ls -al tinderbox/cache/  
total 440  
drwxr-xr-x 5 david david 170 Feb 22 17:22 .  
drwxr-xr-x 4 david david 136 Feb 22 17:25 …  
-rw-r–r-- 1 david david 76800 Feb 22 15:43 rake-0.7.1.gem  
-rw-r–r-- 1 david david 46082 Feb 22 15:43 rspec-0.7.5.1.gem  
-rw-r–r-- 1 david david 95744 Feb 22 17:22 rspec-0.8.0.gem

$ tinderbox\_gem\_build rspec 0.8.0  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:7: warning:  
discarding old open\_uri\_original\_open  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:100: warning:  
already initialized constant Options  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:103: warning:  
redefine check\_options  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:112: warning:  
redefine scan\_open\_optional\_arguments  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:122: warning:  
redefine open\_uri  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:148: warning:  
redefine open\_loop  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:221: warning:  
redefine redirectable?  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:229: warning:  
redefine open\_http  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:340: warning:  
method redefined; discarding old initialize  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:348: warning:  
method redefined; discarding old initialize  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:354: warning:  
already initialized constant StringMax  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:355: warning:  
method redefined; discarding old \<\<  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:368: warning:  
method redefined; discarding old io  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:376: warning:  
redefine init  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:402: warning:  
method redefined; discarding old meta\_add\_field  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:407: warning:  
method redefined; discarding old last\_modified  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:415: warning:  
already initialized constant RE\_LWS  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:416: warning:  
already initialized constant RE\_TOKEN  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:417: warning:  
already initialized constant RE\_QUOTED\_STRING  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:418: warning:  
already initialized constant RE\_PARAMETERS  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:420: warning:  
method redefined; discarding old content\_type\_parse  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:440: warning:  
method redefined; discarding old content\_type  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:455: warning:  
method redefined; discarding old charset  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:472: warning:  
method redefined; discarding old content\_encoding  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:610: warning:  
method redefined; discarding old open  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:618: warning:  
method redefined; discarding old read  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:643: warning:  
method redefined; discarding old find\_proxy  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:708: warning:  
method redefined; discarding old buffer\_open  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:716: warning:  
method redefined; discarding old buffer\_open  
/usr/local/lib/ruby/gems/1.8/gems/tinderbox-1.0.0/lib/tinderbox/gem\_runner.rb:124:in  
`install’: Installation of rspec-0.8.0 caused an infinite loop:  
(Tinderbox::InstallError)

```
    /usr/local/lib/ruby/1.8/open-uri.rb:27:in 

```

`open_uri_original_open' /usr/local/lib/ruby/1.8/open-uri.rb:32:in `open\_uri\_original\_open’  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:32:in  
`open' /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_info_cache.rb:131:in `write\_cache’  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/source\_info\_cache.rb:87:in  
`flush' /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_info_cache.rb:103:in `refresh’  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/source\_info\_cache.rb:39:in  
`cache' /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_info_cache.rb:44:in `cache\_data’  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/remote\_installer.rb:80:in  
`source_index_hash' /usr/local/lib/ruby/site_ruby/1.8/rubygems/remote_installer.rb:91:in `specs\_n\_sources\_matching’  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/remote\_installer.rb:114:in  
`find_gem_to_install' /usr/local/lib/ruby/site_ruby/1.8/rubygems/remote_installer.rb:57:in `install’  
/usr/local/lib/ruby/gems/1.8/gems/tinderbox-1.0.0/lib/tinderbox/gem\_runner.rb:103:in  
`install' /usr/local/lib/ruby/gems/1.8/gems/tinderbox-1.0.0/lib/tinderbox/gem_runner.rb:262:in `run’  
/usr/local/lib/ruby/gems/1.8/gems/tinderbox-1.0.0/bin/tinderbox\_gem\_build:9  
/usr/local/bin/tinderbox\_gem\_build:16:in `load' /usr/local/bin/tinderbox_gem_build:16 from /usr/local/lib/ruby/gems/1.8/gems/tinderbox-1.0.0/lib/tinderbox/gem_runner.rb:262:in `run’  
from  
/usr/local/lib/ruby/gems/1.8/gems/tinderbox-1.0.0/bin/tinderbox\_gem\_build:9  
from /usr/local/bin/tinderbox\_gem\_build:16:in `load’  
from /usr/local/bin/tinderbox\_gem\_build:16

---

<div class="post-metadata">

**Author:** ![crucoba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Post date:** [September 17, 2007, 1:20pm UTC](https://www.ruby-forum.com/t/tinderbox-with-unpublished-gem/86479/4 "2007-09-17T13:20:20Z")

</div>

On 2/27/07, Eric H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Thanks Ryan - I had tried that, but I get into an infinite loop
> 
> Revert to rubygems 0.9.1. 0.9.2 reintroduced breakage when open-uri  
> is required.

OK - I reverted to 0.9.1 and now I get something different. I placed  
the gem in tinderbox/cache, per Ryan’s suggestion. I ran  
“tinderbox\_gem\_build rspec ‘0.8.0’”, got an error AND discovered that  
the process had actually removed the gem from tinderbox/cache. Session  
below.

Looking at gem\_runner.rb, it uses a Gem::RemoteInstaller, which  
(logically) appears to only work from a remote location. So I think  
that this will need to be addressed explicitly to get it to work.  
Unless there’s a way I can trick rubygems into believing my local box  
is a remote repository. Can anybody help me to do that?

Thanks,  
David

$ ls -al tinderbox/cache/  
total 192  
drwxr-xr-x 3 david david 102 Feb 28 14:06 .  
drwxr-xr-x 4 david david 136 Feb 28 14:04 …  
-rw-r–r-- 1 david david 96768 Feb 28 14:06 rspec-0.8.0.gem  
[david@chelimac ruby]$ tinderbox\_gem\_build rspec ‘0.8.0’  
/usr/local/lib/ruby/gems/1.8/gems/tinderbox-1.0.0/lib/tinderbox/gem\_runner.rb:113:in  
`install’: Installation of rspec-0.8.0 failed  
(Gem::GemNotFoundException): (Tinderbox::InstallError)

Could not find rspec (= 0.8.0) in any repository from  
/usr/local/lib/ruby/gems/1.8/gems/tinderbox-1.0.0/lib/tinderbox/gem\_runner.rb:262:in  
`run' from /usr/local/lib/ruby/gems/1.8/gems/tinderbox-1.0.0/bin/tinderbox_gem_build:9 from /usr/local/bin/tinderbox_gem_build:16:in `load’  
from /usr/local/bin/tinderbox\_gem\_build:16  
[david@chelimac ruby]$ ls -al tinderbox/cache/  
total 0  
drwxr-xr-x 2 david david 68 Feb 28 14:06 .  
drwxr-xr-x 4 david david 136 Feb 28 14:06 …

---

<div class="post-metadata">

**Author:** ![crucoba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Post date:** [February 28, 2007, 12:13am UTC](https://www.ruby-forum.com/t/tinderbox-with-unpublished-gem/86479/5 "2007-02-28T00:13:51Z")

</div>

On Feb 22, 2007, at 09:31, David C. wrote:

> (output below), so I thought perhaps I was on the wrong path.
> 
> I’m on mac os 10.4, ruby 1.8.5,
> 
> Here’s the output. If anything strikes you off the bat, please help.  
> If not, I’ll keep digging.
> 
> $ tinderbox\_gem\_build rspec 0.8.0  
> /usr/local/lib/ruby/site\_ruby/1.8/rubygems/open-uri.rb:7: warning:  
> discarding old open\_uri\_original\_open

Revert to rubygems 0.9.1. 0.9.2 reintroduced breakage when open-uri  
is required.

---

<div class="post-metadata">

**Author:** ![crucoba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Post date:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/tinderbox-with-unpublished-gem/86479/6 "2007-09-25T23:10:46Z")

</div>

On Feb 28, 2007, at 06:14, David C. wrote:

> > is required.
> 
> OK - I reverted to 0.9.1 and now I get something different. I placed  
> the gem in tinderbox/cache, per Ryan’s suggestion. I ran  
> “tinderbox\_gem\_build rspec ‘0.8.0’”, got an error AND discovered that  
> the process had actually removed the gem from tinderbox/cache. Session  
> below.
> 
> Looking at gem\_runner.rb, it uses a Gem::RemoteInstaller, which  
> (logically) appears to only work from a remote location. So I think  
> that this will need to be addressed explicitly to get it to work.

Hrm, I probably punted on this since RubyGems doesn’t have a unified  
installer and I didn’t want to duplicate work. (The “install stuff”  
code is now three months old, so the details are hazy.)

> Unless there’s a way I can trick rubygems into believing my local box  
> is a remote repository. Can anybody help me to do that?

I think this will do it:

gem install my\_gem  
gem\_server  
gem sources --add [http://localhost:8808](http://localhost:8808)

tinderbox\_gem\_build my\_gem version

Of course, I aim to support all of this properly, but its a bit  
difficult to get there when I’m leaning on RubyGems so heavily.
