teracyhq / dev

The only truly universal productive development platform with Docker on macOS, Linux and Windows! http://blog.teracy.com/2016/12/20/teracy-dev-the-only-truly-universal-productive-development-platform-with-docker-on-macos-linux-and-windows/ http://slides.teracy.net/hoatle/productive-dev-workflow-with-teracy-dev/latest/
http://dev.teracy.org/docs
BSD 3-Clause "New" or "Revised" License
86 stars 31 forks source link

should fix the bug: Message: NoMethodError: undefined method `sub' for #<TeracyDev::Location::GitWarn #617

Open hoatle opened 4 years ago

hoatle commented 4 years ago

This is the error log:

$ vagrant up --provision
C:/tools/cygwin/home/be be/iorad-dev/lib/teracy-dev/logging/mask_filter.rb:38:in
 `block in masked'
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.6.0/set.rb:338:in `each_key'
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.6.0/set.rb:338:in `each'
C:/tools/cygwin/home/be be/iorad-dev/lib/teracy-dev/logging/mask_filter.rb:36:in
 `masked'
C:/tools/cygwin/home/be be/iorad-dev/lib/teracy-dev/logging/mask_filter.rb:28:in
 `filtered'
C:/tools/cygwin/home/be be/iorad-dev/lib/teracy-dev/logging.rb:62:in `block (2 l
evels) in configure_logger_for'
C:/tools/cygwin/home/be be/iorad-dev/lib/teracy-dev/logging.rb:61:in `each'
C:/tools/cygwin/home/be be/iorad-dev/lib/teracy-dev/logging.rb:61:in `block in c
onfigure_logger_for'
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.6.0/logger.rb:582:in `format_me
ssage'
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.6.0/logger.rb:472:in `add'
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.6.0/logger.rb:534:in `warn'
C:/tools/cygwin/home/be be/iorad-dev/lib/teracy-dev/location/git_synch.rb:21:in
`rescue in sync'
C:/tools/cygwin/home/be be/iorad-dev/lib/teracy-dev/location/git_synch.rb:17:in
`sync'
C:/tools/cygwin/home/be be/iorad-dev/lib/teracy-dev/location/manager.rb:19:in `b
lock in sync'
C:/tools/cygwin/home/be be/iorad-dev/lib/teracy-dev/location/manager.rb:18:in `e
ach'
C:/tools/cygwin/home/be be/iorad-dev/lib/teracy-dev/location/manager.rb:18:in `s
ync'
C:/tools/cygwin/home/be be/iorad-dev/lib/teracy-dev/loader.rb:127:in `sync_terac
y_dev_entry'
C:/tools/cygwin/home/be be/iorad-dev/lib/teracy-dev/loader.rb:49:in `sync'
C:/tools/cygwin/home/be be/iorad-dev/lib/teracy-dev/loader.rb:32:in `start'
C:/tools/cygwin/home/be be/iorad-dev/lib/teracy-dev.rb:37:in `<module:TeracyDev>
'
C:/tools/cygwin/home/be be/iorad-dev/lib/teracy-dev.rb:11:in `<top (required)>'
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.6.0/rubygems/core_ext/kernel_re
quire.rb:54:in `require'
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.6.0/rubygems/core_ext/kernel_re
quire.rb:54:in `require'
C:/tools/cygwin/home/be be/iorad-dev/Vagrantfile:21:in `<top (required)>'
C:/HashiCorp/Vagrant/embedded/gems/2.2.8/gems/vagrant-2.2.8/lib/vagrant/config/l
oader.rb:239:in `load'
C:/HashiCorp/Vagrant/embedded/gems/2.2.8/gems/vagrant-2.2.8/lib/vagrant/config/l
oader.rb:239:in `block in procs_for_path'
C:/HashiCorp/Vagrant/embedded/gems/2.2.8/gems/vagrant-2.2.8/lib/vagrant/config.r
b:53:in `block in capture_configures'
C:/HashiCorp/Vagrant/embedded/gems/2.2.8/gems/vagrant-2.2.8/lib/vagrant/config.r
b:48:in `synchronize'
C:/HashiCorp/Vagrant/embedded/gems/2.2.8/gems/vagrant-2.2.8/lib/vagrant/config.r
b:48:in `capture_configures'
C:/HashiCorp/Vagrant/embedded/gems/2.2.8/gems/vagrant-2.2.8/lib/vagrant/config/l
oader.rb:237:in `procs_for_path'
C:/HashiCorp/Vagrant/embedded/gems/2.2.8/gems/vagrant-2.2.8/lib/vagrant/config/l
oader.rb:223:in `procs_for_source'
C:/HashiCorp/Vagrant/embedded/gems/2.2.8/gems/vagrant-2.2.8/lib/vagrant/config/l
oader.rb:67:in `block in set'
C:/HashiCorp/Vagrant/embedded/gems/2.2.8/gems/vagrant-2.2.8/lib/vagrant/config/l
oader.rb:61:in `each'
C:/HashiCorp/Vagrant/embedded/gems/2.2.8/gems/vagrant-2.2.8/lib/vagrant/config/l
oader.rb:61:in `set'
C:/HashiCorp/Vagrant/embedded/gems/2.2.8/gems/vagrant-2.2.8/lib/vagrant/environm
ent.rb:487:in `config_loader'
C:/HashiCorp/Vagrant/embedded/gems/2.2.8/gems/vagrant-2.2.8/lib/vagrant/environm
ent.rb:792:in `vagrantfile'
C:/HashiCorp/Vagrant/embedded/gems/2.2.8/gems/vagrant-2.2.8/lib/vagrant/environm
ent.rb:973:in `process_configured_plugins'
C:/HashiCorp/Vagrant/embedded/gems/2.2.8/gems/vagrant-2.2.8/lib/vagrant/environm
ent.rb:178:in `initialize'
C:/HashiCorp/Vagrant/embedded/gems/2.2.8/gems/vagrant-2.2.8/bin/vagrant:168:in `
new'
C:/HashiCorp/Vagrant/embedded/gems/2.2.8/gems/vagrant-2.2.8/bin/vagrant:168:in `
<main>'
Vagrant failed to initialize at a very early stage:
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.
Path: C:/tools/cygwin/home/be be/iorad-dev/Vagrantfile
Line number: 38
Message: NoMethodError: undefined method `sub' for #<TeracyDev::Location::GitWar
n:0x00000000062cc288>

We need to find the root cause to fix this. I expect a good clear log message should be displayed instead of the error above.

hoatle commented 4 years ago

this bug is reported by @phuonglm, it's better to include the debug log here for easier tracing.

phuonglm commented 4 years ago

this error seem fixed ( I can't confirm the source of the exception ) when comment out this line. https://github.com/teracyhq/dev/blob/develop/lib/teracy-dev/location/git_synch.rb#L64 , since the dev not available any more so we must find the way to reproduce ourselft

hoatle commented 4 years ago

looks like not critical anymore, so I'll move this issue out of the current sprint, we need to steps to reproduce the problem (better if tests are added), find the root cause and fix it.