I am using rails 4.2, unicorn app server and nginx web server, I am using capistrano for deployment.
If I am adding a gem to gemfile its not reflecting in the application. I tried to check a gem by Gem.loaded_specs["koala"].full_gem_path
but its not showing anywhere. Also I can see one error in capistrano logs
cd /home/deploy/bloom/releases/20170516105043 && RAILS_ENV=dev bundle exec honeybadger deploy --environment dev --revision 08e4726 --repository git@bitbucket.org:appster/bloom-ruby.git --user arvindmehra
DEBUG[1450b9f0] **bash: bundle: command not found**
Here is my capfile:
#
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/bundler'
require 'capistrano/honeybadger'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano/rvm'
require 'whenever/capistrano'
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
Here is my deployment environment script from dev.rb
set :branch, 'dev'
set :keep_releases, 3
server '66.128.61.239',
user: 'deploy',
roles: %w{web app db},
ssh_options: {
user: 'deploy', # overrides user setting above
keys: %w(~/.ssh/id_rsa),
forward_agent: false,
#auth_methods: %w(publickey)
password: 'password'
}
namespace :deploy do
%w[start stop restart].each do |command|
desc "#{command} unicorn server"
task command do
on roles(:app), in: :sequence, wait: 1 do
execute "/etc/init.d/bloom-ruby #{command}"
end
end
end
after :publishing, :restart
after :restart, :clear_cache do
on roles(:web), in: :groups, limit: 3, wait: 10 do
# Here we can do anything such as:
# within release_path do
# execute :rake, 'cache:clear'
# end
end
end
end
Here is my deploy.rb
# config valid only for current version of Capistrano
lock '3.3.3'
set :application, 'bloom'
set :repo_url, 'git@bitbucket.org:appster/bloom-ruby.git'
set :deploy_to, '/home/deploy/bloom'
#set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml')
# Define which type of RVM the server is using
set :rvm_type, :user
set :rvm_ruby_version, '2.2.2@bloom'
# Default value for :linked_files is []
set :linked_files, %w{config/database.yml config/secrets.yml config/settings.yml config/providers.yml config/stripe.yml}
# Default value for linked_dirs is []
set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/identicons public/uploads public/images}
Aucun commentaire:
Enregistrer un commentaire