run rails applicaton after capistrano deployment

北城以北 提交于 2019-12-12 23:44:16

问题


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 !!!


回答1:


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




回答2:


I catch my mistake. And as I followed Railscasts Capistrano screencasts, stackoverflow Capistrano Tags and deploying-rails-apps-to-a-vps-with-capistrano-v3.

As all cap tasks run locally.

cap production deploy:migrate # Worked for me

Thanks to @maxd !!!



来源:https://stackoverflow.com/questions/28805808/run-rails-applicaton-after-capistrano-deployment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!