Warbler war issue

I’m actually not sure the underlying bug isn’t with something like
bundler or rails itself, but I only get this with warbler war files.
Was hoping someone might recognize this and know what’s happening.
Environment is rails 3, jruby 1.5.5, warbler 1.2.1, running under
tomcat 6.

When I use edge rails 3 in my Gemfile, it creates invalid gemspec
files. When I reference say rails 3.0.3, it works fine.

Here is an invalid gemspec. The first line that reads the version
points to a file that doesn’t exist (RAILS_VERSION):

version = File.read(File.expand_path(“…/…/RAILS_VERSION”,
FILE)).strip

Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = ‘actionmailer’
s.version = version
s.summary = ‘Email composition, delivery, and receiving
framework (part of Rails).’
s.description = ‘Email on Rails. Compose, deliver, receive, and test
emails using the familiar controller/view pattern. First-class support
for multipart email and attachments.’
s.required_ruby_version = ‘>= 1.8.7’

s.author = ‘David Heinemeier H.’
s.email = ‘[email protected]
s.homepage = ‘http://www.rubyonrails.org
s.rubyforge_project = ‘actionmailer’

s.files = Dir[‘CHANGELOG’, ‘README.rdoc’, ‘MIT-LICENSE’,
‘lib/**/*’]
s.require_path = ‘lib’
s.requirements << ‘none’

s.has_rdoc = true

s.add_dependency(‘actionpack’, version)
s.add_dependency(‘mail’, ‘~> 2.2.9’)
end

Here is what a good gemspec looks like, what I get when I reference a
specific version of rails in Gemfile:

Gem::Specification.new do |s|
s.name = %q{actionmailer}
s.version = “3.0.3”

s.required_rubygems_version = Gem::Requirement.new(“>= 0”) if
s.respond_to? :required_rubygems_version=
s.authors = [“David Heinemeier H.”]
s.date = %q{2010-11-15}
s.description = %q{Email on Rails. Compose, deliver, receive, and
test emails using the familiar controller/view pattern. First-class
support for multipart email and attachments.}
s.email = %q{[email protected]}
s.files = [“CHANGELOG”, “README.rdoc”, “MIT-LICENSE”,
“lib/action_mailer/adv_attr_accessor.rb”, “lib/action_mailer/base.rb”,
“lib/action_mailer/collector.rb”,
“lib/action_mailer/delivery_methods.rb”, “lib/acti
on_mailer/deprecated_api.rb”, “lib/action_mailer/log_subscriber.rb”,
“lib/action_mailer/mail_helper.rb”, “lib/action_mailer/old_api.rb”,
“lib/action_mailer/railtie.rb”, “lib/action_mailer/test_case.rb”,
“lib/act
ion_mailer/test_helper.rb”, “lib/action_mailer/tmail_compat.rb”,
“lib/action_mailer/version.rb”, “lib/action_mailer.rb”,
“lib/rails/generators/mailer/mailer_generator.rb”,
“lib/rails/generators/mailer/templates/
mailer.rb”, “lib/rails/generators/mailer/USAGE”]
s.homepage = %q{http://www.rubyonrails.org}
s.require_paths = [“lib”]
s.required_ruby_version = Gem::Requirement.new(“>= 1.8.7”)
s.requirements = [“none”]
s.rubyforge_project = %q{actionmailer}
s.rubygems_version = %q{1.3.6}
s.summary = %q{Email composition, delivery, and receiving framework
(part of Rails).}

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3

if Gem::Version.new(Gem::RubyGemsVersion) >= 

Gem::Version.new(‘1.2.0’) then
s.add_runtime_dependency(%q, [“= 3.0.3”])
s.add_runtime_dependency(%q, [“~> 2.2.9”])
else
s.add_dependency(%q, [“= 3.0.3”])
s.add_dependency(%q, [“~> 2.2.9”])
end
else
s.add_dependency(%q, [“= 3.0.3”])
s.add_dependency(%q, [“~> 2.2.9”])
end
end