Vagrant throws error when executing 'vagrant up' - vagrant

Earlier today my Homestead was working fine and using 'vagrant up' didn't cause any problems. I tried starting it a few minutes ago and I got this error:
C:/Users/Robin/embedded/mingw64/lib/ruby/2.4.0/json/common.rb:156:in `parse': 751: unexpected token at '' (JSON::ParserError)
from C:/Users/Robin/embedded/mingw64/lib/ruby/2.4.0/json/common.rb:156:in `parse'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/lib/vagrant/vagrantfile.rb:181:in `machine_config'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/lib/vagrant/vagrantfile.rb:45:in `machine'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/lib/vagrant/environment.rb:719:in `machine'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/lib/vagrant/plugin/v2/command.rb:180:in `block in with_target_vms'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/lib/vagrant/plugin/v2/command.rb:213:in `block in with_target_vms'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/lib/vagrant/plugin/v2/command.rb:212:in `map'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/lib/vagrant/plugin/v2/command.rb:212:in `with_target_vms'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/plugins/commands/destroy/command.rb:45:in `block in execute'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/lib/vagrant/environment.rb:280:in `block (2 levels) in batch'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/lib/vagrant/environment.rb:278:in `tap'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/lib/vagrant/environment.rb:278:in `block in batch'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/lib/vagrant/environment.rb:277:in `synchronize'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/lib/vagrant/environment.rb:277:in `batch'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/plugins/commands/destroy/command.rb:44:in `execute'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/lib/vagrant/cli.rb:54:in `execute'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/lib/vagrant/environment.rb:294:in `cli'
from C:/Users/Robin/embedded/gems/2.1.4/gems/vagrant-2.1.4/bin/vagrant:164:in `<main>'
I've looked the error up but all I can find is people telling there is a extra space or enter in the 'Homestead.yaml' file which is not the case.

Related

initialize : malformed version number string data (ArgumentError)

I added a new folder ./data inside boxes\ubuntu-xenial64\ and edited the Vagrantfile by uncommenting this line:
config.vm.synced_folder "./data", "/vagrant_data"
Getting error as below:
PS C:\Users\sridh\.vagrant.d\boxes\ubuntu-VAGRANTSLASH-xenial64> vagrant up
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/rubygems/version.rb:207:in `initialize': Malformed version number string data (ArgumentError)
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/rubygems/version.rb:199:in `new'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/rubygems/version.rb:199:in `new'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/lib/vagrant/box_collection.rb:289:in `block (2 levels) in find'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/lib/vagrant/box_collection.rb:285:in `map'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/lib/vagrant/box_collection.rb:285:in `block in find'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/lib/vagrant/box_collection.rb:448:in `block in with_collection_lock'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/lib/vagrant/box_collection.rb:447:in `with_collection_lock'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/lib/vagrant/box_collection.rb:271:in `find'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/lib/vagrant/vagrantfile.rb:167:in `block in machine_config'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/lib/vagrant/vagrantfile.rb:200:in `machine_config'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/lib/vagrant/vagrantfile.rb:45:in `machine'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/lib/vagrant/environment.rb:733:in `machine'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/lib/vagrant/plugin/v2/command.rb:177:in `block in with_target_vms'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/lib/vagrant/plugin/v2/command.rb:201:in `block in with_target_vms'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/lib/vagrant/plugin/v2/command.rb:183:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/lib/vagrant/plugin/v2/command.rb:183:in `with_target_vms'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/plugins/commands/up/command.rb:87:in `execute'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/lib/vagrant/cli.rb:42:in `execute'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/lib/vagrant/environment.rb:308:in `cli'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.8/bin/vagrant:138:in `<main>'

Homestead vagrant up error

/Users/shaddeler/Developer/run/Homestead/scripts/homestead.rb:169:in `+': no implicit conversion of nil into String (TypeError)
from /Users/shaddeler/Developer/run/Homestead/scripts/homestead.rb:169:in `block (2 levels) in configure'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/plugins/kernel_v2/config/vm_provisioner.rb:72:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/plugins/kernel_v2/config/vm_provisioner.rb:72:in `add_config'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/plugins/kernel_v2/config/vm.rb:324:in `provision'
from /Users/shaddeler/Developer/run/Homestead/scripts/homestead.rb:168:in `block in configure'
from /Users/shaddeler/Developer/run/Homestead/scripts/homestead.rb:157:in `each'
from /Users/shaddeler/Developer/run/Homestead/scripts/homestead.rb:157:in `configure'
from /Users/shaddeler/Developer/run/Homestead/Vagrantfile:30:in `block in <top (required)>'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/config/v2/loader.rb:37:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/config/v2/loader.rb:37:in `load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/config/loader.rb:113:in `block (2 levels) in load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/config/loader.rb:107:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/config/loader.rb:107:in `block in load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/config/loader.rb:104:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/config/loader.rb:104:in `load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/vagrantfile.rb:28:in `initialize'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/environment.rb:746:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/environment.rb:746:in `vagrantfile'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/environment.rb:492:in `host'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/environment.rb:214:in `block in action_runner'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/action/runner.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/action/runner.rb:33:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/environment.rb:479:in `hook'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/environment.rb:728:in `unload'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/bin/vagrant:177:in `ensure in <main>'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/bin/vagrant:177:in `<main>'
I enfaced this error while vagrant up
I had this problem too. Instead of a wrong indentation, I accidentally added another dash ( - ) to my Homestead.yaml file.
For example, this is the incorrect one:
- map: testing.khc.my
- to: /home/vagrant/code/testing/public
The correct one is this:
- map: testing.khc.my
to: /home/vagrant/code/testing/public
Hope this help everyone in the future.
I got this error too and it's a real pain. The source of the problem is a wrong indentation in the Homestead.yaml file. Check if you're using spaces or tabs.

vagrant undefined local variable or method in synce folders

my vagrantfile work perfectly but when i uncomment synce folder and set it to real path and make vagrant reload it return a exception:
/Users/pedrammarandi/pedram/Vagrantfile:41:in `block in <top (required)>': undefined local variable or method `“' for main:Object (NameError)
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/config/v2/loader.rb:37:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/config/v2/loader.rb:37:in `load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/config/loader.rb:103:in `block (2 levels) in load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/config/loader.rb:97:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/config/loader.rb:97:in `block in load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/config/loader.rb:94:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/config/loader.rb:94:in `load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/vagrantfile.rb:28:in `initialize'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:689:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:689:in `vagrantfile'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:441:in `host'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:207:in `block in action_runner'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:33:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:428:in `hook'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:671:in `unload'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/bin/vagrant:177:in `ensure in <main>'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/bin/vagrant:177:in `<main>'
line 41:
config.vm.synced_folder “/”, “/var/www/pedram.dev”
you have something wrong with the funky character `“' and vagrant is telling your about it
undefined local variable or method `“'
maybe some copy/paste from ms word or something just put simple "
config.vm.synced_folder "/", "/var/www/pedram.dev"
it will run smoothly

RHC setup gives mkdir error

I am trying to add an openshift origin server for the first time. using :
rhc setup --server my.server.adr
but I get this error when it comes to Generate the token.
Generating an authorization token for this client ... C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:252:in `mkdir': No such file or directory #dir_s_mkdr - U: (Errno::ENOENT)
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:252:in `fu_mkdir'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:226:in `block (2 levels) in mkdir_p'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:224:in `reverse_each'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:224:in `block in mkdir_p'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:210:in `each'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:210:in `mkdir_p'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/auth/token_store.rb:34:in `[]='
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/auth/token_store.rb:14:in `put'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/auth/token.rb:50:in `save'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/wizard.rb:243:in `block in login_stage'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/highline_extensions.rb:190:in `call'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/highline_extensions.rb:190:in `section'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/highline_extensions.rb:204:in `paragraph'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/helpers.rb:337:in `block (2 levels) in <module:Helpers>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/wizard.rb:237:in `login_stage'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/wizard.rb:67:in `block in run'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/wizard.rb:65:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/wizard.rb:65:in `run'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/commands/setup.rb:57:in `run'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/commands.rb:294:in `execute'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/commands.rb:285:in `block (3 levels) in to_commander'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/command.rb:155:in `run'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/runner.rb:421:in `run_active_command'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/command_runner.rb:72:in `run!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/delegates.rb:8:in `run!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/cli.rb:37:in `start'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/bin/rhc:20:in `<top (required)>'
from C:/Ruby22-x64/bin/rhc:23:in `load'
from C:/Ruby22-x64/bin/rhc:23:in `<main>'
I can't find what's wrong, and what is the - U: after #dir_s_mkdir ?
any help or hint would be apreciated.
Thank you for your answers, I think it's a compatibility problem as you said with ruby 2.2
I didn't use another ruby version but I used a docker container instead.

Failure to upload file to S3 using Ruby

I'm uploading a collection of files to S3 (53 files) but towards the end, around 45 files, this starts to happen:
Connection reset by peer
E, [2015-05-07T10:43:03.361617 #8542] ERROR -- : /home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/openssl/buffering.rb:326:in `syswrite'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/openssl/buffering.rb:326:in `do_write'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/openssl/buffering.rb:344:in `write'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:211:in `write0'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:185:in `block in write'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:202:in `writing'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:184:in `write'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http/generic_request.rb:187:in `send_request_with_body'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http/generic_request.rb:120:in `exec'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/aws-sdk-v1-1.64.0/lib/aws/core/http/patch.rb:27:in `block in new_transport_request'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/aws-sdk-v1-1.64.0/lib/aws/core/http/patch.rb:26:in `catch'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/aws-sdk-v1-1.64.0/lib/aws/core/http/patch.rb:26:in `new_transport_request'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1383:in `request'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1376:in `block in request'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:853:in `start'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1374:in `request'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.3/lib/httparty/request.rb:98:in `perform'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.3/lib/httparty.rb:539:in `perform_request'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.3/lib/httparty.rb:501:in `put'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.3/lib/httparty.rb:589:in `put'
/home/mauricio/.rvm/gems/ruby-2.2.0/bundler/gems/neat-cli-44b0902e2c95/lib/neat_cli/client.rb:318:in `block in finish_upload'
/home/mauricio/.rvm/gems/ruby-2.2.0/bundler/gems/neat-cli-44b0902e2c95/lib/neat_cli/client.rb:698:in `call'
/home/mauricio/.rvm/gems/ruby-2.2.0/bundler/gems/neat-cli-44b0902e2c95/lib/neat_cli/client.rb:698:in `validating_response'
/home/mauricio/.rvm/gems/ruby-2.2.0/bundler/gems/neat-cli-44b0902e2c95/lib/neat_cli/client.rb:317:in `finish_upload'
/home/mauricio/.rvm/gems/ruby-2.2.0/bundler/gems/neat-cli-44b0902e2c95/lib/neat_cli/client.rb:327:in `v4_upload'
/home/mauricio/projects/ruby/spi-test/lib/spitest/webapp.rb:17:in `block in upload'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/retriable-2.0.2/lib/retriable.rb:53:in `block in retriable'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/retriable-2.0.2/lib/retriable.rb:48:in `each'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/retriable-2.0.2/lib/retriable.rb:48:in `with_index'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/retriable-2.0.2/lib/retriable.rb:48:in `retriable'
/home/mauricio/projects/ruby/spi-test/lib/spitest/webapp.rb:15:in `upload'
/home/mauricio/projects/ruby/spi-test/lib/spitest/launcher.rb:44:in `block (3 levels) in upload_to_all_dests'
/home/mauricio/projects/ruby/spi-test/lib/spitest/thread_pool.rb:21:in `call'
/home/mauricio/projects/ruby/spi-test/lib/spitest/thread_pool.rb:21:in `block (2 levels) in start'
I have already changed the TCP buffers but this is still causing issues when uploading lots of files.
Any idea how to fix this?
I'm running Ubuntu 14.04 and Ruby 2.2.0p0.

Resources