本文介绍了Capistrano部署后运行rails applicaton的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

部署Rails应用程序第一次抛出Capistrano :我将Rails应用程序部署在另一台机器(服务器)上



rails应用 ##这是我的服务器

  akshay @akshay:/ var / www / model_demo $ ls 
当前版本回购修订版.log共享

cap -T ##显示了很多耙任务

like



cap deploy:migrate#运行rake db :migrate如果设置了迁移



如果我运行此任务,将无法正常运行

 未设置阶段,请调用诸如 cap production deploy之类的名称,其中生产是您定义的阶段。 

但是当我跑步

  cap生产部署#有效

在所有列出的任务中,仅上限生产部署



1:到底发生了什么?



2:我如何运行由cap提供的rake任务?



任何帮助都会感激!!!!!!!!!!!
在本地运行。


Deploying rails app throw Capistrano first time: I deployed my rails app on another machine (server)

File structure for rails app ## this is my server

akshay@akshay:/var/www/model_demo$ ls
current  releases  repo  revisions.log  shared

cap -T ## showing a lots of rake task

like

cap deploy:migrate # Runs rake db:migrate if migrations are set

If I run this task it is not working saying

Stage not set, please call something such as `cap production deploy`, where production is a stage you have defined.

But when I run

cap production deploy  # It works

Among all the listed task only cap production deploy

1: what exactly going on under the hood?

2: How might i run rake task which is provided by cap?

Any help would be appreciated !!!

解决方案

Capistrano recepies are meant to run on local system.Run it locally.

这篇关于Capistrano部署后运行rails applicaton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 12:16