-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting :application to a Proc causes cap to crash #1681
Comments
How come this is closed? It's definitely broken in version 3.5. I just upgraded from 3.4 to 3.5 and I get this error, even when I do cap -T, not even deploying. Do we have to wait till the next bug fix release? |
This issue was closed by PR #1711, which was merged on June 21. That means it is fixed in master and will be included in the next release. This is typical of most open source projects on GitHub, where issues are closed once they are fixed in the main development branch. We don't have a fixed release schedule for Capistrano, so I can't promise when the next version will be published, but in the meantime you can point your Gemfile at the master branch: gem "capistrano", :github => "capistrano/capistrano" |
The fix in #1711, as reported by @deekthesqueak, is incomplete. Specifically: # Using a block works
set(:application) { ... }
# But using a proc or lambda still causes a crash
set :application, -> { ... }
# => NoMethodError: undefined method `gsub' for #<Proc> |
Anyone affected by this bug please take a look at PR #1744 and let me know if it is a good fix for you. Thanks! |
The logic used to validate
:application
expects a string value and will cause an exception to be raised otherwise. This prevents us from setting:application
using a Proc, as originally reported here: capistrano/documentation#186Steps to reproduce
deploy.rb
, configure:application
with a lambda, like this:set :application, -> { "myapp" }
cap production deploy
Expected behaviour
The deploy should succeed with
myapp
used as the application name.Actual behaviour
The text was updated successfully, but these errors were encountered: