Rails capistrano 部署问题,格式错误的版本号字符串 Capistrano

Rails capistrano deploy issue, Malformed version number string Capistrano

我对ruby不是很熟悉。我正在尝试将现有项目部署到登台服务器。

项目使用如下,
ruby1.8.7
rails2.3.5
耙子 0.8.7
卡皮斯特拉诺 2.5.13
capistrano-ext 1.2.1

当我在我的项目根目录中 运行 “cap staging deploy” 时,它失败并显示 格式错误的版本号字符串 Capistrano::Version (ArgumentError)

以下是控制台输出,

/Users/sajithk/.rvm/rubies/ruby-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/version.rb:187:in `initialize': Malformed version number string Capistrano::Version (ArgumentError)
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head@global/gems/bundler-1.9.1/lib/bundler/capistrano.rb:8:in `new'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head@global/gems/bundler-1.9.1/lib/bundler/capistrano.rb:8
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/configuration/loading.rb:152:in `require'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/configuration/loading.rb:152:in `require'
from ./config/deploy.rb:1:in `load'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/configuration/loading.rb:172:in `load_from_file'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/configuration/loading.rb:89:in `load'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/configuration/loading.rb:86:in `load'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/configuration/loading.rb:86:in `each'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/configuration/loading.rb:86:in `load'
from Capfile:4:in `load'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/configuration/loading.rb:172:in `load_from_file'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/configuration/loading.rb:89:in `load'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/configuration/loading.rb:86:in `load'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/configuration/loading.rb:86:in `each'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/configuration/loading.rb:86:in `load'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/cli/execute.rb:64:in `load_recipes'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/cli/execute.rb:64:in `each'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/cli/execute.rb:64:in `load_recipes'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/cli/execute.rb:30:in `execute!'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/lib/capistrano/cli/execute.rb:14:in `execute'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/gems/capistrano-2.5.13/bin/cap:4
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/bin/cap:19:in `load'
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/bin/cap:19
from /Users/sajithk/.rvm/gems/ruby-1.8.7-head/bin/ruby_executable_hooks:15

我自己发现了这个问题。这可能会对以后遇到同样问题的其他人有所帮助。

问题出在捆绑器上。我使用了最新版本的捆绑器。由于这是一个较旧的项目,我认为捆绑器与它们不兼容。我将捆绑器降级到 1.0.10。现在一切正常。

使用的命令,

rvm @global do gem uninstall bundler
gem install bundler -v ‘1.0.10'

谢谢