gunnarx / franca_install_automation

Private repo NOT CURRENTLY SUPPORTED - I recommend to refer to (http://github.com/genivi/eclipse_install_automation). Scripted installation of Eclipse+Franca Tools on a machine, or creation of a new Virtual Machine image. Please read README.md for instructions on which branch to use and known bugs.
Mozilla Public License 2.0
5 stars 4 forks source link

Vagrantfile:67:in `block in <top (required)>': uninitialized constant VMNAME (NameError) #41

Closed gmacario closed 8 years ago

gmacario commented 8 years ago

Tested on ITM-GPAOLO-W10

Start a command prompt and clone repository

C:\Users\gmacario>git clone https://github.com/gunnarx/franca_install_automation
Cloning into 'franca_install_automation'...
remote: Counting objects: 1283, done.
Receiving objects: 100% (1283/1283), 263.08 KiB | 0 bytes/s, done.

Resolving deltas: 100% (752/752), done.
Checking connectivity... done.

C:\Users\gmacario>

Change directory and type vagrant up

C:\Users\gmacario>cd franca_install_automation

C:\Users\gmacario\franca_install_automation>vagrant up
Vagrant has no proxy plugin => skipped proxy configuration.
Vagrant has no proxy plugin => skipped proxy configuration.
C:/Users/gmacario/franca_install_automation/Vagrantfile:67:in `block in <top (required)>': uninitialized constant VMNAME (NameError)
        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 <main>'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.5/bin/vagrant:177:in `<main>'

C:\Users\gmacario\franca_install_automation>
gmacario commented 8 years ago

NOTE: Reproduced on the current tip of the master branch

C:\Users\gmacario\franca_install_automation>git show
commit 7f1e6fd2c4dd37900417cee6fdcce97695547b29
Author: Gunnar Andersson <gand@acm.org>
Date:   Mon Aug 22 18:03:00 2016 +0200

    Export the VM name

diff --git a/Vagrantfile b/Vagrantfile
index 4436079..086871e 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -61,6 +61,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
       vb.customize [ "modifyvm", :id, "--vram", "128" ]
    end

+   # Export the VM name (need to know the name of the artifact when creating automated build)
+   ENV['VMNAME'] = vmname
+   config.vm.provision :shell, inline:
+      "echo #{VMNAME} >>/vagrant/VMNAME"
+
    # Make sure proxy settings affect also sudo commands
    # (by default the environment is cleared for sudo)
    config.vm.provision :shell, inline:

C:\Users\gmacario\franca_install_automation>
gunnarx commented 8 years ago

Sorry, this has been fixed but apparently not on master. I'll update it shortly.

gmacario commented 8 years ago

Closing issue after realizing that https://github.com/gunnarx/franca_install_automation is no longer supported