Mailinglist Archive: opensuse-ruby (3 mails)

< Previous Next >
Re: [opensuse-ruby] rails:freeze:gems broken with rails 2.3.10 and rubygems 1.5.0
On 2/9/2011 at 05:27 PM, "Tim Serong" <tserong@xxxxxxxxxx> wrote:
Hi All,

I'm wondering if anyone else has seen this and has a convenient
workaround. Since updating rubygems from 1.4 to 1.5, freezing
rails no longer works (this is true on openSUSE 11.3 and Factory):

# rails foo
...
create ...
...
# cd foo
# rake --trace rails:freeze:gems
(in /tmp/foo)
** Invoke rails:freeze:gems (first_time)
** Execute rails:freeze:gems
Freezing to the gems for Rails 2.3.10
rm -rf vendor/rails
mkdir -p vendor/rails
cd vendor/rails
rm -rf vendor/rails
rake aborted!
undefined method `version_requirements' for #<Gem::Dependency:0xb749c8cc>

OK, so somehow, my having asked the question on a public mailing list
caused me to work out where the problem is. Go figure. I've attached
the patch for reference. What's the Right Thing to do here? Patch our
rubygem-rails-2_3? Submit this fix upstream then wait for 2.3.11 or .12?

Thanks,

Tim


--
Tim Serong <tserong@xxxxxxxxxx>
Senior Clustering Engineer, OPS Engineering, Novell Inc.



Index: rails-2.3.10/lib/tasks/framework.rake
===================================================================
--- rails-2.3.10.orig/lib/tasks/framework.rake
+++ rails-2.3.10/lib/tasks/framework.rake
@@ -24,7 +24,7 @@ namespace :rails do
begin
chdir("vendor/rails") do
rails.dependencies.select { |g| deps.include? g.name }.each do |g|
- Gem::GemRunner.new.run(["unpack", g.name, "--version",
g.version_requirements.to_s])
+ Gem::GemRunner.new.run(["unpack", g.name, "--version",
g.respond_to?(:requirement) ? g.requirement.to_s : g.version_requirements.to_s])
mv(Dir.glob("#{g.name}*").first, g.name)
end

< Previous Next >
List Navigation
Follow Ups
References