Skip to content
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

Wrong usage of application symbol #43

Open
webdevilopers opened this issue Jan 20, 2016 · 2 comments
Open

Wrong usage of application symbol #43

webdevilopers opened this issue Jan 20, 2016 · 2 comments

Comments

@webdevilopers
Copy link

Originally came from xuwupeng2000/capistrano-scm-gitcopy#33.

I'm not sure if this is NOT a Capistrano issue. But since everything used to work fine in staging before implementing scm-gitcopy into production I will post it here.

In my deploy.rb my application symbol is set to:

set :application, 'Semcoglas'
set :deploy_to, '/var/www/semcoweb'

I always regarded application as App name.

When I run cap production deploy everything works fine so far. All paths are used correctly based on the deploy_to symbol.

But then, when Composer is supposed to run, the path suddenly changes to /var/www/Semcoglas <- name of the :application symbol.

Of course I get a _Could not open file: /var/www/Semcoglas/shared/composer.phar_ error.

I tried without defining :application and indeed the wrong path will become /var/www/shared/....

Any idea what is happening here?

@webdevilopers
Copy link
Author

For instance I had to set :application separately in my staging deploy files to make composer get the correct shared path:

# staging.rb

set :application, 'semcoglas'
set :deploy_to, '/var/www/semcoglas'
set :scm, :git

set :composer_install_flags, '--no-dev --no-interaction --optimize-autoloader'

SSHKit.config.command_map[:composer] = "php #{shared_path.join("composer.phar")}"
# production.rb

set :application, 'semcoweb'
set :deploy_to, '/var/www/semcoweb'
set :scm, :git_copy

set :composer_install_flags, '--no-dev --no-interaction --optimize-autoloader'

SSHKit.config.command_map[:composer] = "php #{shared_path.join("composer.phar")}"

The shared_path should actually look the same as the deploy_to. But without the :applicationsymbol is only /var/www/shared/ as described above.

@webdevilopers
Copy link
Author

I just saw that this is related to issue #39 by @gagarine.
@swalkinshaw closed that one as not an issue.

Also related:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant