vagrant&berkshelfでdevianのvm作ろうとしたら激オコ

2014/5/14 4935hit

久々にbox作ったらエラった


Bringing machine 'default' up with 'virtualbox' provider...
/Users/kitahara-k/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/env.rb:18:in `initialize': undefined method `scope' for #<Vagrant::UI::Colored:0x00000100e60f90> (NoMethodError)
from /Users/kitahara-k/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:54:in `new'
from /Users/kitahara-k/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:54:in `block in setup'
from /Users/kitahara-k/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:53:in `tap'
from /Users/kitahara-k/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/action.rb:53:in `setup'
from /Users/kitahara-k/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant/plugin.rb:15:in `provision'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:42:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:42:in `block (2 levels) in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:41:in `tap'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:41:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:40:in `map'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:40:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/machine.rb:196:in `action_raw'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/machine.rb:173:in `block in action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/environment.rb:434:in `lock'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/machine.rb:161:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/machine.rb:161:in `action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
from /Applications/Vagrant/embedded/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
from /Applications/Vagrant/embedded/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'


berkshelfのバージョンが古いらしい
https://github.com/andrewgross/vagrant-chef-zero/issues/41
取りあえずバージョン上げた

$ vagrant plugin uninstall berkshelf
$ vagrant plugin install vagrant-berkshelf --plugin-version=2.0.1


うまくいったけど、なんか見慣れないワーニングが

DEPRECATED: Your Berksfile contains a site location pointing to the Opscode Community Site (site :opscode). Site locations have been replaced by the source location. Change this
to: 'source "https://api.berkshelf.com"' to remove this warning. For more information visit https://github.com/berkshelf/berkshelf/wiki/deprecated-locations

url書いてあるから行ってみたから行ってみたら、Berksfileの書き方が2系から変更になったみたい

site :opscode #=> source 'https://api.berkshelf.com'


Baerksfileを変更

source 'https://api.berkshelf.com'
cookbook 'apt'
cookbook 'git'
cookbook 'apache2'
cookbook "mysql"
cookbook 'vim'
cookbook 'java'


これでvagrant provisionに綺麗なログが吐かれました

前:UnityのiOSでParseを使用したpush notification 次:ParseのAndroidでCheckManifestエラー

コメントを投稿する

名前URI
コメント