capistrano

Capistrano deploy/assets on Rails 3.1 fails

南笙酒味 提交于 2019-12-23 10:08:36
问题 I added the this line load 'deploy/assets' to my Capfile to deploy assets with Rails 3.1. Capistrano gets to this line * executing "cd /home/deploy/armonia/stage/releases/20110928021521 && bundle exec rake RAILS_ENV=stage RAILS_GROUPS=assets assets:precompile" then fails with Could not find multi_json-1.0.3 in any of the sources which is weird because the gem is found when I run bundle show multi_json on my deployment server. What causes this? 回答1: Fixed this by updating to bundler to 1.0.18,

Does Capistrano need to be in the development group in the Gemfile?

試著忘記壹切 提交于 2019-12-23 09:08:01
问题 In a rails Gemfile, does gem 'capistrano' need to be inside the :development group or this there any advantage in putting it inside an arbitrary group like :tools ? 回答1: Simply put, no, it doesn't need to be, but it's good for the sake of best practices and keeping your gemsets uncluttered. The best way to do that is open for debate, but basically as long as Capistrano is available to you in the environment you're working in, it doesn't matter what groups it is or isn't associated with,

Capistrano stops at git:check

耗尽温柔 提交于 2019-12-23 07:48:26
问题 When I run a cap <stage> deploy --trace I got: > $ bundle exec cap production deploy --trace ** Invoke production (first_time) ** Execute production ** Invoke load:defaults (first_time) ** Execute load:defaults ** Invoke rbenv:validate (first_time) ** Execute rbenv:validate ** Invoke rbenv:map_bins (first_time) ** Execute rbenv:map_bins ** Invoke bundler:map_bins (first_time) ** Execute bundler:map_bins ** Invoke deploy (first_time) ** Execute deploy ** Invoke deploy:starting (first_time) **

Capistrano 3.0 — How securely prompt for password now?

三世轮回 提交于 2019-12-23 07:46:39
问题 Prior to 3.0 there was a way to do that: # ... set :mysql_password, proc { Capistrano::CLI.password_prompt "Gimme remote database server password. Don't worry, I won't tell anyone: " } # ... namespace :db do desc 'Dump remote database' task :dump do run "mysqldump -u #{mysql_user} -p #{mysql_database} > ~/#{mysql_database}.sql" do |channel, stream, data| if data =~ /^Enter password:/ channel.send_data "#{mysql_password}\n" end end end end It prompts for password, doesn't show it as you type

Problems with Capistrano's deploy:migrate

时光总嘲笑我的痴心妄想 提交于 2019-12-23 03:42:20
问题 I'm getting the following error while trying to deploy:migrate with Capistrano: [err :: 127.0.0.1 ] /home/synapse/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:388:in `bin_path': can't find gem rake ([">= 0"]) with executable rake (Gem::GemNotFoundException) Before that I was getting rake not found' error but it was gone after I added "set :rake" to deploy.rb. Ruby is installed via RVM and rake gem is of course installed. 回答1: for capistrano you need to add extensions for

Git: Merge a branch but without some of the files I only need modified locally?

我的未来我决定 提交于 2019-12-22 18:23:12
问题 I have this particular scenario, which is simple really, but I don't see (so far) a similar question here. I'm working in my own branch copied from a remote repo, And I have added my own tasks to a Capistrano Capfile . These tasks will only help Me deploy the app to my own private server, Therefore when it's time to Merge my branch with origin master , I don't want the changes in the Capfile to be pushed to the remote master repo , because, obviously, this file should remain intact over there

capistrano error msg: Please install the pg adapter: `gem install activerecord-pg-adapter` (cannot load such file --

♀尐吖头ヾ 提交于 2019-12-22 17:10:17
问题 I am using capistrano and get this error message: Please install the pg adapter: `gem install activerecord-pg-adapter` (cannot load such file -- active_record/connection_adapters/pg_adapter) I have removed the gem 'pg' from my Gemfile and bundle install d . I don't see the pg gem in my Gemfile.lock. I have also changed my production db to a sqlite3 adapter. Why is Rails 3.2 / Capistrano / Bundler asking for this? I'm not using it and not in Gemfile.lock and how do I resolve it? I am using

Deploy Haskell code that uses the Snap Framework

只谈情不闲聊 提交于 2019-12-22 12:18:29
问题 What's your experience with deploying Haskell code for production in Snap in a stable fashion? If the compilation fails on the server then I would like to abort the deployment and if it succeeds then I would like it to turn of the snap-server and start the new version instead. I know there are plenty of ways. Everything from rsync to git-hooks (git pull was a nightmare). But I would like to hear your experiences. 回答1: Where I work, we use Happstack and deploy on Ubuntu linux. We actually

Whenever Gem Fails to Run “bundle exec” Correctly in Capistrano

 ̄綄美尐妖づ 提交于 2019-12-22 10:41:06
问题 I'm having problems deploying the Whenever gem to my production environment using Capistrano. The problem is stemming from a bundle exec whenever command that's triggering some 'missing gem' issues (yet running bundle install from the shell shows that everything is in fact there!). My feeling is that one of two things is happening: that Bundler isn't fully loading before bundle exec is being called, or that somehow there's a path issue that's running it in the wrong place. Here's what's going

Deploying Rails 3 on Dreamhost with Capistrano

只谈情不闲聊 提交于 2019-12-22 10:36:26
问题 I'm trying to deploy a Rails app using Capistrano (it's my first time using Capistrano). I have a Dreamhost Private Server which is using Ruby 1.8.7 and Rails 3.0.3 (according to http://rails.dreamhosters.com/) I've followed Dreamhost's Capistrano setup instructions (http://wiki.dreamhost.com/Capistrano) When I run "cap deploy:migrations" I get this error: [out :: xxx.com] Could not find i18n-0.5.0 in any of the sources ** [out :: xxx.com] Try running `bundle install` Am I right in thinking