【发布时间】:2014-01-21 13:47:42
【问题描述】:
当我跑步时
cap production rvm1:install:ruby
我在控制台输出的末尾收到此错误:
Command: cd ~/apps/foo/releases/20140121133714 && ( PATH=/opt/ruby/bin:$PATH /usr/bin/env /tmp/foo/rvm-auto.sh rvm install . )
无法确定使用哪个 Ruby; .应包含 .rvmrc 或 .versions.conf 或 .ruby-version 或 .rbfu-version 或 .rbenv-version,或 Gemfile 中的适当行。
上限中止!
编辑
在我的应用程序的根目录添加.ruby-version 后,我得到的内容
DEBUG [af3b80bc] Command: cd ~/apps/foo/releases/20140121160854 && /usr/bin/env /tmp/foo/rvm-auto.sh rvm install .
DEBUG [af3b80bc] ruby-2.0.0-p247 is not installed.
DEBUG [af3b80bc] To install do: 'rvm install ruby-2.0.0-p247'
DEBUG [af3b80bc] ruby-2.0.0-p247 is not installed.
DEBUG [af3b80bc] Searching for binary rubies, this might take some time.
DEBUG [af3b80bc] ruby-2.0.0-p247 is not installed.
DEBUG [af3b80bc] Searching for binary rubies, this might take some time.
DEBUG [af3b80bc] No binary rubies available for: ubuntu/12.10/x86_64/system.
DEBUG [af3b80bc] Searching for binary rubies, this might take some time.
DEBUG [af3b80bc] Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
DEBUG [af3b80bc] Searching for binary rubies, this might take some time.
DEBUG [af3b80bc] RVM does not have prediction for required space for system, assuming 150MB should be enough, let us know if it was not.
DEBUG [af3b80bc] Searching for binary rubies, this might take some time.
DEBUG [af3b80bc] Either the ruby interpreter is unknown or there was an error!.
我正在使用 rvm1-capistrano gem 运行 Capistrano 3.1.1。它是开箱即用的实现;没什么特别的。
group :development do
gem 'capistrano', '~> 3.1.0'
gem 'capistrano-rails'
gem 'capistrano-bundler'
gem 'rvm1-capistrano3', require: false
# gem 'capistrano-rvm'
end
# capfile
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/rails'
require 'capistrano/bundler'
require 'rvm1/capistrano3'
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
我还在输出中遇到另外两个错误:
Running /usr/bin/env [ -L ~/apps/foo/releases/20140121135720/public/assets ] on foo.com
Command: [ -L ~/apps/foo/releases/20140121135720/public/assets ]
Finished in 0.291 seconds with exit status 1 (failed).
Running /usr/bin/env [ -d ~/apps/foo/releases/20140121135720/public/assets ] on foo.com
Command: [ -d ~/apps/foo/releases/20140121135720/public/assets ]
Finished in 0.295 seconds with exit status 1 (failed).
【问题讨论】:
-
您的应用程序根目录确实包含以下文件之一(?):
.rvmrc、.versions.conf、.ruby-version、.rbfu-version或.rbenv-version -
@Isotope no.我刚刚添加了文件,现在我收到了不同的错误消息:
ruby-2.0.0-p247 is not installed.为什么在我尝试安装 Ruby 时会这样说?
标签: ruby-on-rails ruby rvm capistrano capistrano3