我正在努力将在 Ubuntu 上运行 Rails 2.3.2 的旧 Rails 应用程序升级到最新的 Rails 2.3.15。该应用程序最初有一个供应商版本的rails,vendor/rails
但我已经删除了它,安装了rails 2.3.15
gem,并将版本号更改config/environment.rb
为:
RAILS_GEM_VERSION = '2.3.15' unless defined? RAILS_GEM_VERSION
重新启动应用程序后,我在 mongrel 日志中收到此错误消息(这会阻止应用程序启动):
/usr/local/lib/site_ruby/1.8/rubygems/version.rb:53:in `initialize': Malformed version number string (ArgumentError)
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.15/lib/rails/vendor_gem_source_index.rb:105:in `new'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.15/lib/rails/vendor_gem_source_index.rb:105:in `version_for_dir'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.15/lib/rails/vendor_gem_source_index.rb:47:in `refresh!'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.15/lib/rails/vendor_gem_source_index.rb:45:in `each'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.15/lib/rails/vendor_gem_source_index.rb:45:in `refresh!'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.15/lib/rails/vendor_gem_source_index.rb:29:in `initialize'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.15/lib/rails/gem_dependency.rb:21:in `new'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.15/lib/rails/gem_dependency.rb:21:in `add_frozen_gem_path'
... 17 levels...
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
from /usr/bin/mongrel_rails:19:in `load'
from /usr/bin/mongrel_rails:19
我需要做什么才能克服这个错误?