capistrano

Starting multiple instances of Thin Server on Windows with a batch script

僤鯓⒐⒋嵵緔 提交于 2019-12-25 03:10:38
问题 I'm writing a script to automatically deploy a ruby on rails application in Windows. I have everything automated except for the thin cluster startup; it turns out that daemonizing is not supported in Windows so I cannot use the -servers command when calling thin. A previous question I posted: Starting a Thin cluster on Windows I'm now looking for an alternative approach to getting three instances up programatically. Does anyone know how I might be able to accomplish this? Thanks for your time

cap uses admin instead of ec2-user

耗尽温柔 提交于 2019-12-25 02:55:46
问题 I'm trying to do a "cap ec2onrails:setup" for my ROR website to an EC2 instance (Amazon image) but authentication keeps asking me for a password no matter what I do. I've tried almost anything I've read in this and/or other forums: copy public key from ~/.ssh to ec2-user@_.sa-east-1.compute.amazonaws.com:/home/ec2-user/.ssh/authorized_keys2 (or authorized_keys) generate private key using Amazon Management Console and then copying the public key from the server to my machine adding any of

Capistrano Deploy remote: Invalid username or password Github

折月煮酒 提交于 2019-12-25 01:36:12
问题 Trying to deploy a rails app using Capistrano, but authentication fails. The output while executing Capistrano, shows the correct IP for the server(deploy@46.101.45.52), but the logfile shows (deploy@159.65.33.89), my previous IP. I have ssh keys set on github, both for the server and the local development machine. Capistrano log DEBUG [deb63a13] Command: ( export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-geofly-production-david.sh" ; /usr/bin/env git ls-remote https://github.com/uberdave

Updated Ruby in production and now Rails won't start because still referencing old ruby

只谈情不闲聊 提交于 2019-12-25 00:24:57
问题 Just updated Ruby on a staging server via RVM: $ rvm upgrade 1.9.3-p327 1.9.3-p362 I said 'yes' to all the migration and alias questions including deleting old Ruby. Now getting error from Passenger whenever I try to access Rails application: Error message: dlopen(/Library/WebServer/rails/myapp/shared/bundle/ruby/1.9.1/gems/bcrypt-ruby-3.0.1/lib/bcrypt_ext.bundle, 9): Library not loaded: /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/libruby.1.9.1.dylib Referenced from: /Library/WebServer/rails

Rails deployment - how do you do rake db:reset with capistrano?

回眸只為那壹抹淺笑 提交于 2019-12-24 17:44:11
问题 I am using Linode with Ubuntu 10.04 and Capistrano, Unicorn, & Nginx to deploy. How do I do the equivalent of heroku run rake db:reset with this setup? Is it as simple as cap deploy:cold again to run the migrations? I've already deployed and want to drop all databases and rerun all the migrations but am not sure which commands to run with this setup to do so. 回答1: I wrote a tiny little file you can copy to run arbitrary rake tasks via capistrano: http://jessewolgamott.com/blog/2012/09/10/the

Capistrano generating empty application.css stylesheet when deploying

守給你的承諾、 提交于 2019-12-24 14:39:01
问题 I'm attempting to deploy my Rails app using Capistrano, but the resulting application.css stylesheet is empty. This happens for both my staging and production environments. The below relate to my staging one. This is using Rails 3.1.1, Ruby 2.0.0p0 and Capistrano 2.14.1 I'll attempt to provide as much detail as possible (although sorry if it is too much detail). Logs When the deploy is run, the following is added to `staging.log': Compiled application.js (0ms) (pid 15434) Compiled application

will_paginate error in production NoMethodError (undefined method `page' for []:ActiveRecord::Relation):

余生长醉 提交于 2019-12-24 14:12:47
问题 I'm using will_paginate gem for ajax-like "see-more" link. It works in development but fails in production. In my production log I get: NoMethodError (undefined method `page' for []:ActiveRecord::Relation): I've tried, in root of production app to type: grep will_paginate Gemfile.lock and get: will_paginate (3.0.4) will_paginate cap bundle:install don't fails installing will_paginate on my VPS, but when I tried to explicitly require 'will_paginate' it steel works in development and fails in

How to access “global” (constant?) capistrano variables from classes? (ruby)

两盒软妹~` 提交于 2019-12-24 10:49:34
问题 So my deploy.rb script in capistrano starts like this, which I guess is pretty normal: require 'capistrano/ext/multistage' require 'nokogiri' require 'curb' require 'json' # override capistrano defaults set :use_sudo, false set :normalize_asset_timestamps, false # some constant of mine set :my_constant, "foo_bar" Later, I can access my constant in functions or tasks within namespaces, like: namespace :mycompany do def some_function() run "some_command #{my_constant}" end desc <<-DESC some

Best practices to mount Rails engine to several apps on production

自作多情 提交于 2019-12-24 05:51:02
问题 I'm a little bit confused about organizing Rails applications and mountable engine in production. I have N apps, which are using 1 mountable engine (it sets some cookies for apps). In development it works this way. Folders: |— app1 |— app2 |— my_engine In apps Gemfile: gem 'my_engine', path: "../my_engine" So all of the apps are mounting it from 1 source. And I'd like to keep this logic in production. On my vps apps organized this way (using Capistrano for deploy): |—apps_folder |— — app1 |—

Best practices to mount Rails engine to several apps on production

守給你的承諾、 提交于 2019-12-24 05:50:03
问题 I'm a little bit confused about organizing Rails applications and mountable engine in production. I have N apps, which are using 1 mountable engine (it sets some cookies for apps). In development it works this way. Folders: |— app1 |— app2 |— my_engine In apps Gemfile: gem 'my_engine', path: "../my_engine" So all of the apps are mounting it from 1 source. And I'd like to keep this logic in production. On my vps apps organized this way (using Capistrano for deploy): |—apps_folder |— — app1 |—