2016-04-22 7 views
0

を使用して迷惑メールアップが予期せずエラーを表示してしまいます。予期しないエラーベイグラントアップが、私は多くの変化(Vagrantfileに反復を追加)した後、私のVagrantfileに設定が含まれているYAMLファイルを使用して<strong>細かい</strong>を働いていたYAML</p> <p>を使用してこの問題を実験してるYAMLファイル

正しく機能していた古いコミットを取り戻そうとしましたが、そのコードが動作してもエラーは持続します。

私のような多くのオプションを試してみました:

  • 放浪アップ私は削除することを決めた

スクラッチ(削除.vagrant、ボックスやvagrant.d)

  • アンインストールしてインストール浮浪者からyamlファイルとその参照番号との汚れをまで再処理しました。浮浪者は、配列に変換しようとルビーためにこのエラーが関連を示す何らかの理由最後に


    私のセットアップ

    • マック:OS Xヨセミテ、バージョン10.10.5
    • 浮浪者:1.8.1
    • ルビー:2.0.0p481
    • ドッカホスト:hashicorp/boot2docker

    ブロック内の210

    私Vagrantfile

    require 'yaml' 
    config = YAML.load_file('develop.yaml') 
    Vagrant.configure("2") do |config| 
    config.vm.define "machine1" do |a| 
    a.vm.provider "docker" do |d| 
        d.image = config["image"] 
    ... more 
    

    私develop.yaml

    --- 
    image: "registry/user/image:xx" 
    ... more 
    

    $ vagrant up 
    
    Bringing machine 'author' up with 'docker' provider... 
    ==> author: Docker host is required. One will be created if necessary... 
    author: Vagrant will now create or start a local VM to act as the Docker 
    author: host. You'll see the output of the `vagrant up` for this VM below. 
    author: 
    dockerhost: Importing base box 'hashicorp/boot2docker'... 
    dockerhost: Matching MAC address for NAT networking... 
    dockerhost: Checking if box 'hashicorp/boot2docker' is up to date... 
    dockerhost: Setting the name of the VM: dockerHost_dockerhost_1461332944380_50015 
    dockerhost: Clearing any previously set network interfaces... 
    dockerhost: Preparing network interfaces based on configuration... 
    dockerhost: Adapter 1: nat 
    dockerhost: Forwarding ports... 
    dockerhost: 2375 (guest) => 2375 (host) (adapter 1) 
    dockerhost: 4502 (guest) => 4502 (host) (adapter 1) 
    dockerhost: 22 (guest) => 2222 (host) (adapter 1) 
    dockerhost: Running 'pre-boot' VM customizations... 
    dockerhost: Booting VM... 
    dockerhost: Waiting for machine to boot. This may take a few minutes... 
    dockerhost: SSH address: 127.0.0.1:2222 
    dockerhost: SSH username: docker 
    dockerhost: SSH auth method: password 
    dockerhost: Machine booted and ready! 
    ==> author: Syncing folders to the host VM... 
    dockerhost: Installing rsync to the VM... 
    dockerhost: The machine you're rsyncing folders to is configured to use 
    dockerhost: password-based authentication. Vagrant can't script rsync to automatically 
    dockerhost: enter this password, so you'll likely be prompted for a password 
    dockerhost: shortly. 
    dockerhost: 
    dockerhost: If you don't want to have to do this, please enable automatic 
    dockerhost: key insertion using `config.ssh.insert_key`. 
    dockerhost: Rsyncing folder: /Users/it/workspace/docker-provisioning/ => /var/lib/docker/docker_1461332968_17083 
    [email protected]'s password: 
    ==> author: Logging in to Docker server... 
    /opt/vagrant/embedded/gems/gems/vagrant- 1.8.1/plugins/providers/docker/driver.rb:96:in `flatten': can't convert Vagrant::Config::V2::DummyConfig to Array (Vagrant::Config::V2::DummyConfig#to_ary gives Vagrant::Config::V2::DummyConfig) (TypeError) 
    from /opt/vagrant/embedded/gems/gems/vagrant- 1.8.1/plugins/providers/docker/driver.rb:96:in `login' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/docker/action/login.rb:24:in `block in call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/docker/provider.rb:116:in `block (2 levels) in host_vm_lock' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:561:in `lock' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/docker/provider.rb:115:in `block in host_vm_lock' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/docker/provider.rb:114:in `synchronize' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/docker/provider.rb:114:in `host_vm_lock' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/docker/action/login.rb:21:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/docker/action/prepare_nfs_settings.rb:15:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/synced_folders/nfs/action_cleanup.rb:25:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/docker/action/prepare_nfs_valid_ids.rb:14:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/docker/action/host_machine_sync_folders.rb:41:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/docker/action/host_machine_build_dir.rb:19:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/docker/action/init_state.rb:15:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builder.rb:116:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `block in run' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/busy.rb:19:in `busy' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `run' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/call.rb:53:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/message.rb:17:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builder.rb:116:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `block in run' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/busy.rb:19:in `busy' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `run' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/call.rb:53:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builder.rb:116:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `block in run' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/busy.rb:19:in `busy' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `run' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/call.rb:53:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/docker/action/destroy_build_image.rb:43:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/handle_box.rb:25:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builder.rb:116:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `block in run' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/busy.rb:19:in `busy' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `run' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/call.rb:53:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/docker/action/host_machine.rb:35:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/config_validate.rb:25:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/handle_box.rb:25:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builder.rb:116:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `block in run' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/busy.rb:19:in `busy' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `run' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/call.rb:53:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builder.rb:116:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `block in run' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/busy.rb:19:in `busy' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `run' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/machine.rb:224:in `action_raw' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/machine.rb:199:in `block in action' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:561:in `lock' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/machine.rb:185:in `call' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/machine.rb:185:in `action' 
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run' 
    
  • 答えて

    1

    、あなたは同じ名前のブロック引数を使用してconfig変数を上書きします。したがって、ブロック内のconfigは、解析されたYAMLハッシュではなく、迷惑メール設定オブジェクトを参照します。

    YAMLハッシュを別の名前で参照している場合、たとえば、次のようになります。

    yaml_config = YAML.load_file('develop.yaml') 
    

    さまざまなオブジェクトに明白にアクセスできます。

    +0

    私はその小さな間違いを見ませんでした。どうもありがとう –

    関連する問題