获取有关 Capistrano 任务的更多信息

发布于 2024-10-04 12:47:37 字数 1925 浏览 6 评论 0原文

我得到了一个 Capistrano 配方,可以与 Bundler 和 Rails (3.0.3) 应用程序一起使用,但在使用一些基本功能时遇到问题。

按照“使用 Capistrano 自动部署”的 Bundler 文档,我正在尝试获取有关任务的更多信息但由于某种原因它“不存在”...

$ cap -e bundle:install
The task `bundle:install' does not exist.

Capistrano (2.5.19) gem 已安装,我正在尝试从客户端(而不是服务器)上的项目根目录执行该命令。

事实上 cap -T 没有显示任何与“捆绑”或“安装”相关的内容

$ cap -T
cap deploy               # Deploys your project.
cap deploy:check         # Test deployment dependencies.
cap deploy:cleanup       # Clean up old releases.
cap deploy:cold          # Deploys and starts a `cold' application.
cap deploy:migrate       # Run the migrate rake task.
cap deploy:migrations    # Deploy and run pending migrations.
cap deploy:pending       # Displays the commits since your last deploy.
cap deploy:pending:diff  # Displays the `diff' since your last deploy.
cap deploy:restart       # Restarts your application.
cap deploy:rollback      # Rolls back to a previous version and restarts.
cap deploy:rollback:code # Rolls back to the previously deployed version.
cap deploy:setup         # Prepares one or more servers for deployment.
cap deploy:start         # Start the application servers.
cap deploy:stop          # Stop the application servers.
cap deploy:symlink       # Updates the symlink to the most recently deployed ...
cap deploy:update        # Copies your project and updates the symlink.
cap deploy:update_code   # Copies your project to the remote servers.
cap deploy:upload        # Copy files to the currently deployed version.
cap deploy:web:disable   # Present a maintenance page to visitors.
cap deploy:web:enable    # Makes the application web-accessible again.
cap invoke               # Invoke a single command on the remote servers.
cap shell                # Begin an interactive Capistrano session.

我做错了什么?

I'm get a Capistrano recipe to work with Bundler and a Rails (3.0.3) app but having trouble with some basic functionality.

Following the Bundler docs for "Automatic deployment with Capistrano", I'm trying to get more info on a task but for some reason it "doesn't exist"...

$ cap -e bundle:install
The task `bundle:install' does not exist.

The Capistrano (2.5.19) gem is installed and I'm trying to execute that command from the root of my project on the client (not the server).

in fact cap -T doesn't show anything related to 'bundle' or 'install'

$ cap -T
cap deploy               # Deploys your project.
cap deploy:check         # Test deployment dependencies.
cap deploy:cleanup       # Clean up old releases.
cap deploy:cold          # Deploys and starts a `cold' application.
cap deploy:migrate       # Run the migrate rake task.
cap deploy:migrations    # Deploy and run pending migrations.
cap deploy:pending       # Displays the commits since your last deploy.
cap deploy:pending:diff  # Displays the `diff' since your last deploy.
cap deploy:restart       # Restarts your application.
cap deploy:rollback      # Rolls back to a previous version and restarts.
cap deploy:rollback:code # Rolls back to the previously deployed version.
cap deploy:setup         # Prepares one or more servers for deployment.
cap deploy:start         # Start the application servers.
cap deploy:stop          # Stop the application servers.
cap deploy:symlink       # Updates the symlink to the most recently deployed ...
cap deploy:update        # Copies your project and updates the symlink.
cap deploy:update_code   # Copies your project to the remote servers.
cap deploy:upload        # Copy files to the currently deployed version.
cap deploy:web:disable   # Present a maintenance page to visitors.
cap deploy:web:enable    # Makes the application web-accessible again.
cap invoke               # Invoke a single command on the remote servers.
cap shell                # Begin an interactive Capistrano session.

What am I doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小帐篷 2024-10-11 12:47:37

您是否将配方包含在deploy.rb 文件中?

require "bundler/capistrano"

Did you include the recipe in your deploy.rb file?

require "bundler/capistrano"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文