Capistrano + RVM + Rake任务 [英] Capistrano + RVM + Rake task

查看:94
本文介绍了Capistrano + RVM + Rake任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目


  1. 使用rvm ruby​​ 1.9.2(在项目目录的.rvmrc中设置)。

  2. 使用capistrano部署。

  3. 有一个rake任务,我想通过capistrano从本地计算机上远程运行。

我创建了一个.sh文件来运行任务:

I've created a .sh file to run my task:

cd /var/www/pluslook/current
/home/kirill/.rvm/scripts/rvm use 1.9.2@pluslook
/home/kirill/.rvm/gems/ruby-1.9.2-p180@pluslook/bin/rake parse:feed RAILS_ENV="production" --trace

但是当我尝试运行此任务,我遇到一个错误:

But when I'm trying to run this task i have an error:

Using /home/kirill/.rvm/gems/ruby-1.9.2-p180 with gemset pluslook
Could not find linecache19-0.5.12 in any of the sources
Run `bundle install` to install missing gems.

我已将所有gems安装在项目的当前目录中,因此rake任务似乎正在从另一个目录运行目录。当我尝试从capistrano运行任务时,它向我显示了相同的错误。

I've installed all my gems in project's current directory so it looks like rake task is running from another directory. When I'm trying to run task from capistrano, It shows me the same error.

谢谢,抱歉我的英语:)

Thank you and sorry for my English:)

推荐答案


  1. 您在config / deploy.rb中是否需要'bundler / capistrano'

  2. 您是否在提交最新代码更改之前运行捆绑安装?

这篇关于Capistrano + RVM + Rake任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆