The issue is that a user cannot update their Vagrant dev install on Windows due to an error when running bundle exec rake db:migrate. The error message indicates a “Protocol error” when trying to create a symbolic link. jomaxro and blake discuss the issue, and blake suggests trying to create a test symlink, which jomaxro attempts but also encounters the error.
blake finds a related issue on GitHub and suggests downgrading Vagrant as a possible solution. However, sam recommends avoiding Vagrant altogether and using a Docker dev environment instead.
epitome provides a solution, explaining that the error is due to a lack of permission to create symbolic links on Windows. They suggest running Vagrant as an administrator to resolve the issue.
I’m getting the following error when attempting to update my dev install on Windows. I first did a git pull, then vagrant up, vagrant ssh, and finally bundle install. The error occurs when trying to run bundle exec rake db:migrate
vagrant@discourse:/vagrant$ bundle exec rake db:migrate
rake aborted!
ln: failed to create symbolic link '/vagrant/public/plugins/discourse-narrative-bot': Protocol error
/vagrant/lib/discourse.rb:26:in `execute_command'
/vagrant/lib/plugin/instance.rb:368:in `activate!'
/vagrant/lib/discourse.rb:126:in `block in activate_plugins!'
/vagrant/lib/discourse.rb:123:in `each'
/vagrant/lib/discourse.rb:123:in `activate_plugins!'
/vagrant/config/application.rb:179:in `<class:Application>'
/vagrant/config/application.rb:27:in `<module:Discourse>'
/vagrant/config/application.rb:26:in `<top (required)>'
/vagrant/rakefile:5:in `require'
/vagrant/rakefile:5:in `<top (required)>'
/home/vagrant/.rvm/gems/ruby-2.3.1/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/home/vagrant/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
/home/vagrant/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)
you need special rights to create symbolic links with windows (inside virtual machines), the right goes by “SeCreateSymbolicLink”.
Administrator have this right by default. When you run vagrant up/ssh, you need to run it with a user that has this right.
I avoided this error by starting a powershell as administrator (since I didn’t want to bother with granting rights to my user) and discourse is up and running