You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3.0.0 version has lots of upgrades and improvements and people are slowly migrating to this new version. Although many of those changes are not backwards compatible with old 2+ capistrano versions.
If you try 3.0.0 now with latest bkeepers/dotenv version it would fail with:
cap staging deploy
cap aborted!
undefined method `instance' for Capistrano::Configuration:Class
/Users/nfedyashev/.gem/ruby/2.0.0/gems/dotenv-0.9.0/lib/dotenv/capistrano/recipes.rb:1:in `<top (required)>'
/Users/nfedyashev/.gem/ruby/2.0.0/gems/dotenv-0.9.0/lib/dotenv/capistrano.rb:1:in `<top (required)>'
config/deploy.rb:1:in `<top (required)>'
/Users/nfedyashev/.gem/ruby/2.0.0/gems/capistrano-3.0.0/lib/capistrano/setup.rb:12:in `load'
/Users/nfedyashev/.gem/ruby/2.0.0/gems/capistrano-3.0.0/lib/capistrano/setup.rb:12:in `block (2 levels) in <top (required)>'
/Users/nfedyashev/.gem/ruby/2.0.0/gems/capistrano-3.0.0/lib/capistrano/application.rb:12:in `run'
/Users/nfedyashev/.gem/ruby/2.0.0/gems/capistrano-3.0.0/bin/cap:3:in `<top (required)>'
/Users/nfedyashev/.gem/ruby/2.0.0/bin/cap:23:in `load'
/Users/nfedyashev/.gem/ruby/2.0.0/bin/cap:23:in `<main>'
Tasks: TOP => staging
(See full trace by running task with --trace)
There are several ways to fix it, but seems like the simplest way to symlink .env in 3.0.0 is to add it to linked_files variables, like:
I guess that is more obvious and simple than checking capistrano version in our dotenv, and changing linked_files variable.
Two approaches: "We did everything so you don't have to, but please make sure .env is present in shared dir vs "ok, I need to make dotenv work with 3.0+ capistrano, README tells me to add .env to linked_files - now I understand that it has to be present in shared dir too"
I vote for the latter(no updates to lib/dotenv/capistrano.rb and lib/dotenv/capistrano.rb but README instructions has to be update for 3.0+ versions).
The text was updated successfully, but these errors were encountered:
3.0.0
version has lots of upgrades and improvements and people are slowly migrating to this new version. Although many of those changes are not backwards compatible with old2+
capistrano versions.If you try
3.0.0
now with latest bkeepers/dotenv version it would fail with:There are several ways to fix it, but seems like the simplest way to symlink
.env
in3.0.0
is to add it tolinked_files
variables, like:I guess that is more obvious and simple than checking capistrano version in our dotenv, and changing
linked_files
variable.Two approaches: "We did everything so you don't have to, but please make sure
.env
is present in shared dir vs "ok, I need to make dotenv work with 3.0+ capistrano, README tells me to add.env
tolinked_files
- now I understand that it has to be present in shared dir too"I vote for the latter(no updates to
lib/dotenv/capistrano.rb
andlib/dotenv/capistrano.rb
but README instructions has to be update for 3.0+ versions).The text was updated successfully, but these errors were encountered: