fgrehm / vagrant-cachier

Caffeine reducer
http://fgrehm.viewdocs.io/vagrant-cachier
MIT License
1.08k stars 111 forks source link

Syntax error in buckets code #108

Closed rogerhub closed 10 years ago

rogerhub commented 10 years ago

This line is causing a syntax error on my machine, specifically the create_parent: true part. Vagrant 1.4.3, ruby 1.9.3.

I know only a bit of Ruby syntax, but I'm unfamiliar with what what part of the code is meant to do.

/home/roger/.vagrant.d/gems/gems/vagrant-cachier-0.7.2/lib/vagrant-cachier/action/install_buckets.rb:1:in `require_relative': /home/roger/.vagrant.d/gems/gems/vagrant-cachier-0.7.2/lib/vagrant-cachier/bucket.rb:46: syntax error, unexpected tLABEL (SyntaxError)
...cache/#{@name}", create_parent: true)
...                               ^
/home/roger/.vagrant.d/gems/gems/vagrant-cachier-0.7.2/lib/vagrant-cachier/bucket.rb:88: syntax error, unexpected keyword_end, expecting $end
        from /home/roger/.vagrant.d/gems/gems/vagrant-cachier-0.7.2/lib/vagrant-cachier/action/install_buckets.rb:1:in `<top (required)>'
        from /home/roger/.vagrant.d/gems/gems/vagrant-cachier-0.7.2/lib/vagrant-cachier/hooks.rb:6:in `require_relative'
        from /home/roger/.vagrant.d/gems/gems/vagrant-cachier-0.7.2/lib/vagrant-cachier/hooks.rb:6:in `block in <class:Plugin>'
        from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:45:in `call'
        from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:45:in `block (2 levels) in run'
        from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:44:in `tap'
        from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:44:in `block in run'
        from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:43:in `map'
        from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:43:in `run'
        from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:283:in `hook'
        from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:136:in `initialize'
        from /usr/bin/vagrant:105:in `new'
        from /usr/bin/vagrant:105:in `<main>'
tmatilai commented 10 years ago

Vagrant (1.4+) ships with (and requires) Ruby 2.0. How did you install Vagrant?

winhamwr commented 10 years ago

Hi Teemu,

I'm seeing the same problem. I installed Vagrant on Ubuntu 14.04 using sudo apt-get install vagrant.

This seems to install Vagrant 1.4.3 and the package ships with ruby 1.9.1.

-Wes

winhamwr commented 10 years ago

It looks like version 0.5.1 is the most recent version that works when installed via apt-get on Ubuntu 14.04.

$ vagrant plugin uninstall vagrant-cachier
$ vagrant plugin install vagrant-cachier --plugin-version 0.5.1
tmatilai commented 10 years ago

@winhamwr Instead of using the distro package, I would recommend downloading the official upstream package from www.vagrantup.com/downloads and installing it with sudo dpkg -i

fgrehm commented 10 years ago

@winhamwr please install one of the official packages from http://www.vagrantup.com/downloads in order to use recent versions of the plugin as recommended by @tmatilai