config
config copied to clipboard
Vagrant up error - psch.rb:370: found character that cannot start any token while scanning for the next token
I am desperately in need of help please. After installing vagrant, virtual box, and initialising Homestead, when i run the vagrant up command it feeds back an error -- C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:370:in `parse': (
i have checked other solutions to this that worked for some people, solutions likes replacing TAB with spaces, but all to know avail, please anyone HELP!!!..its been 4days already ... the complete error message is shown below..
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:370:in parse': (<unknown>): found character that cannot start any token while scanning for the next token at line 25 column 1 (Psych::SyntaxError) from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:370:in
parse_stream'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:318:in parse' from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:245:in
load'
from C:/Users/Ekwonwa Henry/Homestead/Vagrantfile:25:in block in <top (required)>' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/config/v2/loader.rb:37:in
call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/config/v2/loader.rb:37:in load' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/config/loader.rb:113:in
block (2 levels) in load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/config/loader.rb:107:in each' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/config/loader.rb:107:in
block in load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/config/loader.rb:104:in each' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/config/loader.rb:104:in
load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/vagrantfile.rb:28:in initialize' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:740:in
new'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:740:in vagrantfile' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:486:in
host'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:208:in block in action_runner' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:33:in
call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:33:in run' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:473:in
hook'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:722:in unload' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/bin/vagrant:177:in
ensure in
MY Homestead.yaml file is shown below..
ip: "192.168.10.10" memory: 2048 cpus: 1 provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys: - ~/.ssh/id_rsa
folders: - map: ~/web/sites to: /home/vagrant/Code/sites
sites: - map: test.app to: /home/vagrant/sites/test
databases: - homestead
I am using windows 8.1
The psch.rb file is very large, but line 370 is where the yaml file was parsed == parser.parse yaml, filename.
while line 25 in the error messages turns out to be just a comment that says === # and emitting capabilities. In addition to wrapping libyaml, Psych also.
Same problem here. On Ubuntu 14.04 . . .
Has it been two months and four days now?
Okay. My "vagrant up" command just started working after I read http://stackoverflow.com/questions/15984384/rubies-ruby-2-0-0-p0-lib-ruby-2-0-0-psych-rb205in-parse-unknown-could
My .yaml file did not have a blank line at the end. Added that; saved it; and "vagrant up" started to work.
I had this problem when I had a tab in the yaml file, replaced with spaces and all fine.
Thanks @richp10
Same error, solved with a blank line at the end of Homestead.yaml and with spaces instead of tab. :)
Muchas gracias, eso era exactamente, los espacios en las areas que había modificado.