Tinderbox with unpublished gem

How can I run an unpublished gem in tinderbox?

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.

On 2/22/07, Ryan D. [email protected] 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:inopen_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:inwrite_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:inrefresh’
/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:incache_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:inspecs_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:ininstall’
/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:inrun’
/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:inrun’
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

On 2/27/07, Eric H. [email protected] 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
[[email protected] 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:inload’
from /usr/local/bin/tinderbox_gem_build:16
[[email protected] 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 …

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.

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

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs