seuros / capistrano-puma

Puma integration for Capistrano
https://github.com/seuros/capistrano-puma
MIT License
615 stars 299 forks source link

NameError: uninitialized constant Capistrano::Puma #260

Closed iit2011081 closed 6 years ago

iit2011081 commented 6 years ago

Capistrano puma is giving error. Following is the content of my Capfile

require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/bundler'
require 'capistrano/rvm'
require 'capistrano/rails/assets' # for asset handling add
require 'capistrano/rails/migrations' # for running migrations
require 'capistrano/puma'
require 'capistrano/rake'

install_plugin Capistrano::Puma
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }

When I run cap -T it is showing me "NameError: uninitialized constant Capistrano::Puma". When I remove "install_plugin Capistrano::Puma" from Capfile, it is working fine.

seuros commented 6 years ago

You probably have an old version of the gem.

iit2011081 commented 6 years ago

I am using capistrano3-puma-1.2.1

iit2011081 commented 6 years ago

My gemfile is as

group :development do
    gem 'capistrano'
    gem 'capistrano3-puma'
    gem 'capistrano-rails', require: false
    gem 'capistrano-bundler', require: false
    gem 'capistrano-rake', require: false
    gem 'capistrano-rvm'
end
seuros commented 6 years ago

You need to update it. bundle update capistrano3-puma

iit2011081 commented 6 years ago

Thanks, now working..

tom-on-the-internet commented 5 years ago

Just want to spell this out for anyone who skipped over this post when trying to resolve this issue.

Check your Gemfile. You need capistrano3-puma NOT capistrano-puma. Make sure you have that three.

Thanks

daz commented 1 year ago

I needed to change:

gem "capistrano3-puma", "~> 1.2"

for this:

gem "capistrano3-puma", github: "seuros/capistrano-puma"
seuros commented 1 year ago

@daz you can also use released version

gem "capistrano3-puma", "~> 5.2"

or latest gem "capistrano3-puma", "~> 6.0.0.beta"