Mina: Could not install to path `vendor/bundle` because of an invalid symlink

Created on 16 Apr 2017  ·  4Comments  ·  Source: mina-deploy/mina

Hi, I'm having an issue deploying
I'm on ruby 2.2.3
How can I fix it?

error:
Could not install to path vendor/bundle because of an invalid symlink. Remove
the symlink so the directory can be created.

```desc "Deploys the current version to the server."
task :deploy => :environment do
on :before_hook do
# Put things to run locally before ssh
end
deploy do
# Put things that will set up an empty directory into a fully set-up
# instance of your project.
invoke :'git:clone'
invoke :'deploy:link_shared_paths'
invoke :'bundle:install'
#invoke :'rails:db_load'
#invoke :'load_db_schema'
invoke :'rails:db_migrate'
invoke :'rails:assets_precompile'
invoke :'deploy:cleanup'

on :launch do      
  command "mkdir -p #{fetch(:deploy_to)}/#{fetch(:current_path)}/tmp/"
  command "touch #{fetch(:deploy_to)}/#{fetch(:current_path)}/tmp/restart.txt"
end

end
end
```

Most helpful comment

I assume this breaks because of a missing directory or file. Running mina setup solved the problem for me.

All 4 comments

I am also facing same issue.

This is related to invoke :'deploy:link_shared_paths' , Once I comment this task then mina deploy works.

I assume this breaks because of a missing directory or file. Running mina setup solved the problem for me.

yes, you need to run setup to add new shared folders

I solved it this way:

task :deploy do
  deploy do
    invoke :'rbenv:load'
    ...
  end
  ...
end

For rbenv.

Was this page helpful?
0 / 5 - 0 ratings