Comments (18)
- Try replace
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
with single
require 'capistrano/rails'
- Show here please your Gemfile
- why do you use require 'rvm1/capistrano3' ?
- Move require 'capistrano/puma' to the last line, after all other requires
from capistrano-puma.
- Try, does not work
- my Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
gem 'mysql2'
gem 'puma'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
gem 'haml-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use debugger
# gem 'debugger', group: [:development, :test]
gem 'devise'
gem 'cancan'
gem 'activeadmin', github: 'gregbell/active_admin'
group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'capistrano', '~> 3.0.1'
gem 'capistrano-rails'
gem 'capistrano-bundler'
gem 'capistrano-rvm', '~> 0.0.3'
gem 'capistrano-puma', github: "seuros/capistrano-puma"
end
group :development, :test do
gem 'rspec-rails', '~> 2.0'
gem 'capybara'
gem 'factory_girl'
end
- Now I do not use:
my updated Capfile
# Load DSL and Setup Up Stages
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/deploy'
require 'capistrano/bundler' # Rails needs Bundler, right?
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano/rvm'
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
require 'capistrano/puma'
- Done
And now:
cap sandbox puma:status (or restart, or stop / start and etc) output same error ( bash: pumactl: command not found )
cap sandbox deploy
puma starts now, but single not daemonize mode without puma.rb (file exist and linked)
INFO [2448d607] Running ~/.rvm/bin/rvm ruby-2.0.0-p247 do pumactl -S /var/www/apps/project/sandbox/shared/tmp/pids/puma.state restart on fb.by
DEBUG [2448d607] Command: cd /var/www/apps/project/sandbox/current && ~/.rvm/bin/rvm ruby-2.0.0-p247 do pumactl -S /var/www/apps/project/sandbox/shared/tmp/pids/puma.state restart
DEBUG [2448d607] Puma starting in single mode...
DEBUG [2448d607] * Version 2.6.0, codename: Pantsuit Party
DEBUG [2448d607] * Min threads: 0, max threads: 16
DEBUG [2448d607] * Environment: development
DEBUG [2448d607] * Listening on tcp://0.0.0.0:9292
DEBUG [2448d607] Use Ctrl-C to stop
from capistrano-puma.
@developerby you have to set :puma_workers either in your (staging || deploy) files
for example to have 2 workers you will need put :
set :puma_workers, 2
then run puma:config to regenerate the puma.rb file.
from capistrano-puma.
puma regenerate config with new sets, but cap sandbox deploy
running puma without config :\
from capistrano-puma.
You have to stop and start puma to take the new settings into effect i think.
try
bundle exec cap sandbox puma:stop puma:start deploy
from capistrano-puma.
:\ doesn't start
But there is a difference:
Run bundle exec cap sandbox puma:stop puma:start deploy
capistrano run command
DEBUG [ef9bf364] Command: cd /var/www/apps/project/sandbox/current && /bin/rvm do pumactl -S /var/www/apps/project/sandbox/shared/tmp/pids/puma.state stop
DEBUG [ef9bf364] bash: /bin/rvm: No such file or directory
.... && /bin/rvm do pumactl -S
....
But if I run
cap sandbox deploy
capistrano run
INFO [99630653] Running ~/.rvm/bin/rvm ruby-2.0.0-p247 do pumactl -S /var/www/apps/project/sandbox/shared/tmp/pids/puma.state restart on feedback.by
DEBUG [99630653] Command: cd /var/www/apps/project/sandbox/current && ~/.rvm/bin/rvm ruby-2.0.0-p247 do pumactl -S /var/www/apps/project/sandbox/shared/tmp/pids/puma.state restart
... && ~/.rvm/bin/rvm ruby-2.0.0-p247 do pumactl -S
...
different path for rvm
And puma start single mode (not daemonize) without config
from capistrano-puma.
@developerby @kyledecot
can you add :
before 'puma:restart', 'rvm:hook'
before 'puma:start', 'rvm:hook'
before 'puma:stop', 'rvm:hook'
and let me know if that fix your issue so i can upgrade the gem for rvm users
from capistrano-puma.
@seuros adding the above lines gives me
DEBUG [89a66c32] Command: cd /var/www/skateboxes/current && ( RAILS_ENV=production /usr/local/rvm/bin/rvm 2.0@skateboxes do pumactl -S /var/www/skateboxes/shared/tmp/pids/puma.state restart )
DEBUG [89a66c32] /usr/local/rvm/scripts/set: line 15: exec: pumactl: not found
from capistrano-puma.
@kyledecot You have to load the rvm tasks before puma's. @molfar added the correct rvm_map_bins in his PR.
@developerby : i had your bug this morning after a deploy once, but i could not replicate it again. :/
from capistrano-puma.
@seuros I am loading rvm
before puma
%w[setup deploy rvm bundler rails puma].each { |r| require "capistrano/#{r}" }
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
from capistrano-puma.
@kyledecot, I really want to help you, but I have no mind about the reason about of issue. Check if you use all correct gems. Because here exist some collisions in gem's names. You should carefully check you Gemfile. And last, try to update all gems to latest versions. As for me, this gem seuros/capistrano-puma works just fine at my project, but with rbenv instead rvm.
from capistrano-puma.
Hi there, i have the same problem, I think it come from bundler support:
When capistrano run puma:start in my case it does the following:
Command:
cd /my/app/current && /usr/local/rvm/bin/rvm ruby-2.0.0-p247 do puma -C /my/app/shared/config/puma.rb
/usr/local/rvm/scripts/set: line 15: exec: puma: not found
The same error as @kyledecot occurs
But if I connect to the server through SSH and run the command with bundle exec:
/usr/local/rvm/bin/rvm ruby-2.0.0-p247 do bundle exec puma -C /my/app/shared/config/puma.rb
Puma start just fine.
Maybe we should try checking for Bundler like in capistrano-rvm gem: https://github.com/capistrano/rvm/blob/master/lib/capistrano/tasks/rvm.rake
def bundler_loaded?
Gem::Specification::find_all_by_name('capistrano-bundler').any?
end
And build the puma & pumactl command according to this test?
(note: I have a system-wide RVM install on my server)
Hope it helps...
from capistrano-puma.
@syntaxTerr0r This capistrano-puma has no bundler dependency. If you use bundler, you should of course run the commands through it. As for my rails 4 project, I always run bin/cap deploy. And everything works ok. I think your puma gem is installed with bundler, and is not available as separate gem. So, at first, try run bin/cap or bundle exec cap.
from capistrano-puma.
thx @molfar, my puma gem is indeed installed with bundler.
But I've no bin/cap
and bundle exec cap
produce the error I described earlier.
What about providing a way to customize the puma and pumactl command then? No dependencies involved then.
from capistrano-puma.
There is no need to customize commands. They run through bundler (if gem capistrano-bundler is used).
from capistrano-puma.
@syntaxTerr0r , @kyledecot : could try the new version ? i updated it so you can set puma and puma_ctl manually until the capistrano-rvm gem is fixed.
from capistrano-puma.
It works like a charm, thx a lot!
from capistrano-puma.
You are welcome
from capistrano-puma.
Related Issues (20)
- Puma 6.x HOT 4
- Permission denied with puma_access.log HOT 11
- Couple of issues with 6.0.beta HOT 2
- puma:restart service not found during deploy HOT 4
- Multiple X-Forwarded-Proto headers causing issues HOT 1
- WatchdogSec causes error when using Type=simple HOT 2
- Deploying a new app to a staging server won't start/restart puma/systemd HOT 3
- support for Puma v6.0 and upwards HOT 1
- release 5.x with support for Puma v6.0 HOT 1
- v6.0.0.beta.1 breaks Nginx functionality HOT 5
- Failed with result 'watchdog'. HOT 2
- capistrano doesn't support puma:stop task HOT 1
- When 6.0 GA? HOT 1
- after gem updates deploy fails with can't find service HOT 1
- Release 6.0.0 HOT 4
- Capistrano Puma Not Starting HOT 4
- WatchdogSec should be configurable
- Should this be considered abandoned? HOT 4
- Update to Puma 6 with capistrano3-puma 6.0.0.beta.1 HOT 1
- Installation hooks for initial start? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capistrano-puma.