简体   繁体   中英

can't deploy the project with capistrano

I have a ruby on rails project to be deployed with capistrano. Basically I could deploy it with the following code.

cap production deploy

But it gives me the following failure message.

** Invoke staging (first_time)
** Execute staging
** Invoke load:defaults (first_time)
** Execute load:defaults
cap aborted!
Capfile locked at 3.2.1, but 3.3.3 is loaded

I can not find anything on this exception. Do you know what is the real problem. BTW bundle update does not work.

See your config/deploy.rb if there is something such as lock '3.2.1' . Because if your Gemfile has gem capistrano, '~>3.2.1' , it will be updated to 3.3.3 but it is locked on deploy.rb . Even using lock '>=3.2.1' i am still having problem with .capistrano/metrics in version 3.3.3.

I added gem 'capistrano', '~> 3.2.1' to Gemfile. After $ bundle update the problem fixed.

Uninstall version 3.3.3 and install 3.2.1 will solve your problem.

1: sudo gem uninstall capistrano

 select the version you want to uninstall(3.3.3 in your case)

bundle exec cap production deploy

您需要在包的上下文中而不是系统中使用cap命令。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM