_why wrote:
On Fri, Nov 14, 2008 at 05:02:50PM +0100, Vassilis Rizopoulos wrote:
Pulling master from git and downloading the pre-built dependencies I
followed the quick instruction for building Shoes on Mac OS X.
Building breaks off with the following:
private method `specification_version=' called for
#<Gem::Specification:0x5445d4>
The RubyGems included with the OS X deps is old. You can upgrade
like this:
ln -s /path/to/your/deps /tmp/dep
wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
tar xzvf rubygems-1.3.1.tgz
cd rubygems-1.3.1
/tmp/dep/bin/ruby setup.rb
rm -f /tmp/dep
_why
That didn't quite work :(.
Somehow setup.rb tries to install everything in
/Libraries/Frameworks/Ruby etc.
And I can't figure out why...
Anyways, I have a patch for the gem setup dialog:
If gem installation fails the dialog will remain up and an error message
is shown ("instalation of <gem_name> failed"). And the script depending
on the setup is not executed.
Cheers,
V.-
--
http://www.braveworld.net/riva
>From dacda14439de38b6f591c53df66ab72ae1e63f92 Mon Sep 17 00:00:00 2001
From: Vassilis Rizopoulos <[EMAIL PROTECTED]>
Date: Fri, 14 Nov 2008 23:30:19 +0100
Subject: [PATCH] gem setup installation provides error message
in case of failure the app is not called and the setup dialog remains active
---
lib/shoes/setup.rb | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/lib/shoes/setup.rb b/lib/shoes/setup.rb
index c4e1e5d..190eac2 100644
--- a/lib/shoes/setup.rb
+++ b/lib/shoes/setup.rb
@@ -52,6 +52,7 @@ class Shoes::Setup
begin
setup.start(app)
rescue => e
+ error("In setup thread: #{e.message}")
puts e.message
end
end
@@ -66,10 +67,10 @@ class Shoes::Setup
stroke rgb(0.7, 0.7, 0.9, 1.0 - (i * 0.1))
oval(@logo.left - i, @logo.top - i, @logo.width + (i * 2))
end
- if @script
- Shoes.visit(@script)
- close
- end
+ if @script
+ Shoes.visit(@script)
+ close
+ end unless @setup_failed
end
end
end
@@ -110,7 +111,7 @@ class Shoes::Setup
ui = Gem::DefaultUserInteraction.ui = Gem::ShoesFace.new(app)
count, total = 0, @steps.length
ui.progress count, total
-
+ app.instance_variable_set("@setup_failed", true)
steps.each do |act, arg|
case act
when :gem
@@ -120,12 +121,19 @@ class Shoes::Setup
if Gem.source_index.find_name(name, version).empty?
ui.title "Installing #{name}"
installer = Gem::DependencyInstaller.new
- installer.install(name, version || Gem::Requirement.default)
+ begin
+ installer.install(name, version || Gem::Requirement.default)
+ gem = Gem.source_index.find_name(name, version).first
+ Gem.activate(gem.name, "= #{gem.version}")
+ ui.say "Finished installing #{name}"
+ app.instance_variable_set("@setup_failed", false)
+ rescue Object
+ ui.say "Error while installing #{name}"
+ error($!.message)
+ end
self.class.gem_reset
end
- gem = Gem.source_index.find_name(name, version).first
- Gem.activate(gem.name, "= #{gem.version}")
- ui.say "Finished installing #{name}"
+
when :source
ui.title "Switching Gem servers"
ui.say "Pulling from #{arg}"
--
1.6.0.2