capistrano

Capistrano deploy:assets:restore_manifest Rails assets manifest file (or backup file) not found

和自甴很熟 提交于 2020-06-27 07:48:30
问题 TLDR; I have been deploying with Capistrano for over a year and able to rollback and now all of a sudden I cannot rollback saying it cannot find the rake asset file Problem Capistrano Rollback is failing complaining that it cannot find the rake asset manifest which I validated is not there. What creates this and why would it just stop being created? I have been pulling my hair out for days over this and am at a point to figure out how to hack out that portion of the rollback and manually

Missing `secret_key_base` for 'production' environment on Ubuntu 18.04 server (Rails 6.0), multiple topics tried

时光毁灭记忆、已成空白 提交于 2020-05-18 04:24:58
问题 This topic has a SOLUTION embeded at the end. PROBLEM I'm deploying for the first time a Rails app on a VPS on Ubuntu 18.04. with Nginx. I followed the good tutorial of Gorails "Deploy Ruby on Rails To Production in 2019". Everything worked, until I had the "Incomplete response received from application" page. I checked the nginx logs on /var/log/nginx/error.log and saw the typical message "Missing secret_key_base for 'production' environment, set this string with rails credentials:edit " As

自动部署工具capistrano学习笔记

倾然丶 夕夏残阳落幕 提交于 2020-03-12 13:00:50
简介 capistrano是一个ruby语言写的代码自动部署工具。它的源代码在https://github.com/capistrano/capistrano。 作为一个自动部署工具,它的功能主要有: 1 可实现自动部署 2 通过ssh,可远程执行命令。 它与其他的自动部署工具不同之处有: 1和git /svn等版本控制工具亲和性高, 可实现自动代码拉取和回滚等功能。 推荐文档 https://github.com/stefanooldeman/capistrano-handbook/wiki https://github.com/capistrano/capistrano/wiki 如何安装capistrano sudo apt-get install ruby1.9.1 rubygems sudo gem install capistrano -v 2.5.15 其实capistrano3 已经发布了, 但是其文档当前比较少,只有其官网http://capistranorb.com/上有一点点可怜的入门教程。 而capistrano2的文档则相对比较全, 推荐这个wiki https://github.com/capistrano/capistrano/wiki 用gem安装的时候切换成国内的源会比较快 gem sources --remove http://rubygems

How to build task 'gems:install'

我与影子孤独终老i 提交于 2020-02-28 05:55:30
问题 I am deploying my rails app to a linux server and i have some of the rake tasks missing inlcuding rake gems:install and rake db I am running rails 2.3.4 from GEM. Why is this? How do I fix this? can I update somehow? they are missing from rake -T list rake apache2 # Build Apache 2 module rake clean # Remove compiled files rake clobber # Remove all generated files rake default # Build everything rake doc # Generate all documentation rake doxygen # Generate Doxygen C++ API documentation if ...

使用Git push部署项目

巧了我就是萌 提交于 2020-02-25 19:59:19
是否可以使用 git push 部署网站? 我有一种预感,它与使用 git钩子 在服务器端执行 git reset --hard 有关,但是我将如何实现呢? #1楼 我最终创建了自己的基本部署工具,该工具会自动从存储库中提取新更新-https: //github.com/jesalg/SlimJim- 基本上,它会侦听github post-receive-hook并使用代理触发更新脚本。 #2楼 我们使用 capistrano 来管理部署。 我们构建了capistrano以部署在登台服务器上,然后与我们所有的服务器运行rsync。 cap deploy cap deploy:start_rsync (when the staging is ok) 使用capistrano,我们可以在发生错误的情况下轻松回滚 cap deploy:rollback cap deploy:start_rsync #3楼 我对 基督徒的 解决方案的看法。 git archive --prefix=deploy/ master | tar -x -C $TMPDIR | rsync $TMPDIR/deploy/ --copy-links -av username@server.com:/home/user/my_app && rm -rf $TMPDIR/deploy 将主分支归档到tar中

capistrano deploy can't install nokogiri

╄→гoц情女王★ 提交于 2020-02-25 07:44:32
问题 My cap production deploy is failing on nokogiri installation on an Ubuntu 12.04 box: DEBUG [6f355ce8] Extracting libxml2-2.8.0.tar.gz into tmp//ports/libxml2/2.8.0... OK DEBUG [6f355ce8] Running 'configure' for libxml2 2.8.0... ERROR, review 'tmp//ports/libxml2/2.8.0/configure.log' to see what happened. DEBUG [6f355ce8] *** extconf.rb failed *** DEBUG [6f355ce8] Make sure that `gem install nokogiri -v '1.6.1'` succeeds before bundling. I checked said logs and it mentions not finding a C

Setting up secret_key_base on deploy with Capistrano 3

依然范特西╮ 提交于 2020-02-20 11:17:52
问题 So I'm deploying to a Ubuntu droplet hosted on DigitalOcean a Rails 4 application running on Apache and Phusion Passenger. After deployment I've been getting 500s as a result of Rails production not finding the secret_key_base token for production. However, if I run an echo $SECRET_KEY_BASE it returns the rake secret generated by my deploy.rb. The deploy.rb task to set that up is: namespace :deploy do task :start do ; end task :stop do ; end desc "Setup ENV variables" task :env_vars do on

Deploy with capistrano error: …/REVISION No such file or directory

陌路散爱 提交于 2020-02-07 04:26:33
问题 I'm using the gem Capistrano ~2.15.5 and deploying my application to my remote server. Everything works fine until the end of the cap prod deploy command. I'm receiving this error: ** [52.74.34.196 :: out] /bin/bash: ebs/apps/CloudTrendz/releases/20150318203140/REVISION: No such file or directory ** [52.74.34.196 :: out] command finished in 4923ms *** [deploy:update_code] rolling back * executing "rm -rf ebs/apps/CloudTrendz/releases/20150318203140; true" servers: ["52.74.34.196"] [52.74.34