bundling problem with rubygems 1.3.2

1 view
Skip to first unread message

MarkMT

unread,
Apr 30, 2009, 9:51:34 AM4/30/09
to merb
Hi

I have run into a problem with bundling gems using 'thor
merb:gem:install' that seems to be related to rubygems 1.3.2. I get
the following error -

-----
$ thor merb:gem:install
Beginning transaction
wrong number of arguments (4 for 3)
/usr/local/lib/site_ruby/1.8/rubygems/dependency_installer.rb:99:in
`fetch'
/usr/local/lib/site_ruby/1.8/rubygems/dependency_installer.rb:99:in
`old_fg'
/home/mark/Code/merb/crawsailing/tasks/merb.thor/gem_ext.rb:75:in
`find_gems_with_sources'
/usr/local/lib/site_ruby/1.8/rubygems/dependency_installer.rb:192:in
`find_spec_by_name_and_version'
/usr/local/lib/site_ruby/1.8/rubygems/dependency_installer.rb:213:in
`install'
/home/mark/Code/merb/crawsailing/tasks/merb.thor/ops.rb:82:in
`_install'
/home/mark/Code/merb/crawsailing/tasks/merb.thor/main.thor:123:in
`install'
/home/mark/Code/merb/crawsailing/tasks/merb.thor/ops.rb:40:in
`rescue_failures'
/home/mark/Code/merb/crawsailing/tasks/merb.thor/main.thor:121:in
`install'
/home/mark/Code/merb/crawsailing/tasks/merb.thor/main.thor:115:in
`each'
/home/mark/Code/merb/crawsailing/tasks/merb.thor/main.thor:115:in
`install'
/usr/lib/ruby/gems/1.8/gems/thor-0.9.9/lib/thor/task.rb:27:in `send'
/usr/lib/ruby/gems/1.8/gems/thor-0.9.9/lib/thor/task.rb:27:in `run'
/usr/lib/ruby/gems/1.8/gems/thor-0.9.9/lib/thor/task.rb:20:in `parse'
/usr/lib/ruby/gems/1.8/gems/thor-0.9.9/lib/thor/runner.rb:155:in
`method_missing'
/usr/lib/ruby/gems/1.8/gems/thor-0.9.9/lib/thor/task.rb:27:in `send'
/usr/lib/ruby/gems/1.8/gems/thor-0.9.9/lib/thor/task.rb:27:in `run'
/usr/lib/ruby/gems/1.8/gems/thor-0.9.9/lib/thor/task.rb:20:in `parse'
/usr/lib/ruby/gems/1.8/gems/thor-0.9.9/lib/thor.rb:78:in `start'
/usr/lib/ruby/gems/1.8/gems/thor-0.9.9/bin/thor:7
/usr/bin/thor:19:in `load'
/usr/bin/thor:19
Rolling back transaction
-----

Closer investigation shows that merb's tasks/merb.thor/gem_ext.rb
redefines the ::Gem::SpecFetcher fetch method, while rubygems 1.3.2
has modified the interface to SpecFetcher to include an additional
'prerelease' parameter for that method. Rubygems ends up calling the
redefined fetch method from dependency_installer.rb with that extra
parameter and fails because the redefined method does not take the
prerelease parameter.

Mark.

MarkMT

unread,
Apr 30, 2009, 9:57:50 AM4/30/09
to merb
Just to confirm what I thought was going on... I added the prerelease
parameter to the redefined fetch method in tasks/merb.thor/gem_ext.rb
and then passed that parameter on to 'old_fetch', and everything works
fine.

Mark.

Hedley Robertson

unread,
Apr 30, 2009, 11:04:33 AM4/30/09
to me...@googlegroups.com
On Apr 30, 8:51 am, MarkMT <mark.thom...@ieee.org> wrote:
> Hi
>
> I have run into a problem with bundling gems using 'thor
> merb:gem:install' that seems to be related to rubygems 1.3.2. I get
> the following error -
>
> -----
> $ thor merb:gem:install
> Beginning transaction
> wrong number of arguments (4 for 3)
> /usr/local/lib/site_ruby/1.8/
rubygems/dependency_installer.rb:99:in
> `fetch'


I am having great success with the workaround posted here: http://github.com/wycats/merb/issues#issue/2

Hedley

MarkMT

unread,
Apr 30, 2009, 1:49:04 PM4/30/09
to merb
Yeah, that's exactly the fix I made.

On Apr 30, 10:04 am, Hedley Robertson <hedley.robert...@gmail.com>
wrote:
> On Apr 30, 8:51 am, MarkMT <mark.thom...@ieee.org> wrote:
>
> > Hi
>
> > I have run into a problem with bundling gems using 'thor
> > merb:gem:install' that seems to be related to rubygems 1.3.2. I get
> > the following error -
>
> > -----
> > $ thor merb:gem:install
> > Beginning transaction
> > wrong number of arguments (4 for 3)
> > /usr/local/lib/site_ruby/1.8/rubygems/dependency_installer.rb:99:in
Reply all
Reply to author
Forward
0 new messages