【问题标题】:Error running capistrano in ubuntu 10.04 64 bits在 ubuntu 10.04 64 位中运行 capistrano 时出错
【发布时间】:2012-03-19 12:10:22
【问题描述】:

我是 capistrano 的新手,我将在 SO ubuntu 10.04 lucid 64 bits 上的 linode 中部署我的应用程序。

我正在尝试使用 capistrano gem 进行部署,但出现错误:

[000.00.000.00] executing command
[000.00.000.00] rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell 'default' -c 'cd /home/user/project/current; git fetch origin; git reset --hard master'
 ** [out :: 109.74.195.41] bash: /home/user/.rvm/bin/rvm-shell: No such file or directory
command finished in 330ms
failed: "rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell 'default' -c 'cd /home/user/project/current; git fetch origin; git reset --hard master'" on 000.00.000.00
ubuntu@ubuntu:~/Desktop/project$ 

这是我的 deploy.rb

# RVM
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
require "rvm/capistrano"
set :rvm_ruby_string, 'default'
set :rvm_type, :user

# Bundler

require "bundler/capistrano"

# General

set :application, "project"
set :user, "user"

set :deploy_to, "/home/user/project"
set :deploy_via, :copy

set :use_sudo, false

# Git

set :scm, :git
set :repository,  "~/project/.git"
set :branch, "master"

# VPS

role :web, "my vps ip"
role :app, "my vps ip"
role :db,  "my vps ip", :primary => true

set :server, :nginx
require 'capistrano_recipes'

我已经安装了 nginx,我想在 nginx 中使用 unicorn。

我在远程 vps 中的 home/user/project 中创建了一个目录,以便在那里部署我的应用程序。

我在 vps 远程主机中的 ruby​​ 版本是:

ruby 1.9.2p318 (2012-02-14 revision 34678) [x86_64-linux]

谁能帮我弄清楚我做错了什么?

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-3 deployment capistrano


    【解决方案1】:

    RVM(head or 1.11.0)现在支持安装RVM/Ruby的任务,我有一篇文章描述过程http://niczsoft.com/2012/03/fast-deployment-using-capistrano-rvm-and-more/

    你可以在这里找到我的 deploy.rb:https://github.com/mpapis/ad/blob/master/config/deploy.rb

    这里是 RVM 网站上的描述:http://beginrescueend.com/integration/capistrano/

    另外值得一提的是不需要信任的新文件格式:http://beginrescueend.com/workflow/projects/#ruby-versions

    【讨论】:

    • 谢谢它对我有效:D
    猜你喜欢
    • 2012-03-24
    • 1970-01-01
    • 2011-03-04
    • 2011-05-08
    • 2012-06-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-09
    相关资源
    最近更新 更多