###実現したいこと
CakePHPで学ぶ継続的インテグレーションを参考に環境を構築しています。
windows PCに仮想環境を構築し、クックブックのインストールを実行するとエラーが発生し進めなくなりました。Google上にもあまり情報が無く困っております。
ご存じの方、解決にご協力いただけましたら幸いでございます。
情報が不足しているなどございましたら、ご指摘をいただけましたら幸いです。
###発生している問題・エラーメッセージ
bundle exec berks vendor ./cookbooks
を実行したところ下記エラーが発生しました。
$ bundle exec berks vendor ./cookbooks C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ffi-1.9.18-x64-mingw32/lib/ffi/library.rb:275:in `attach_function': Function 'SetTimeout' not found in [C:\Ruby23-x64\lib\ruby\gems\2.3.0\gems\dep_selector-1.0.4\lib\dep_gecode.so] (FFI::NotFoundError) from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/dep_selector-1.0.4/lib/dep_selector/dep_gecode.rb:89:in `<module:Dep_gecode>' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/dep_selector-1.0.4/lib/dep_selector/dep_gecode.rb:21:in `<top (required)>' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/dep_selector-1.0.4/lib/dep_selector/gecode_wrapper.rb:21:in `require' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/dep_selector-1.0.4/lib/dep_selector/gecode_wrapper.rb:21:in `<top (required)>' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/dep_selector-1.0.4/lib/dep_selector/dependency_graph.rb:21:in `require' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/dep_selector-1.0.4/lib/dep_selector/dependency_graph.rb:21:in `<top (required)>' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/dep_selector-1.0.4/lib/dep_selector/selector.rb:21:in `require' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/dep_selector-1.0.4/lib/dep_selector/selector.rb:21:in `<top (required)>' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/dep_selector-1.0.4/lib/dep_selector.rb:23:in `require' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/dep_selector-1.0.4/lib/dep_selector.rb:23:in `<top (required)>' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/solve-1.2.1/lib/solve/solver.rb:1:in `require' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/solve-1.2.1/lib/solve/solver.rb:1:in `<top (required)>' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/solve-1.2.1/lib/solve.rb:10:in `require_relative' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/solve-1.2.1/lib/solve.rb:10:in `<module:Solve>' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/solve-1.2.1/lib/solve.rb:3:in `<top (required)>' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/berkshelf-3.1.5/lib/berkshelf.rb:8:in `require' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/berkshelf-3.1.5/lib/berkshelf.rb:8:in `<top (required)>' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/berkshelf-3.1.5/lib/berkshelf/cli.rb:1:in `require' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/berkshelf-3.1.5/lib/berkshelf/cli.rb:1:in `<top (required)>' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/berkshelf-3.1.5/bin/berks:3:in `require' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/berkshelf-3.1.5/bin/berks:3:in `<top (required)>' from C:/Ruby23-x64/bin/berks:22:in `load' from C:/Ruby23-x64/bin/berks:22:in `<main>'
###環境構築の過程
実行してきたコマンドや作成した設定ファイルを時系列に書いております。
./vagrantfile を作成
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" BOX_URL = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-16.04_chef-provisionerless.box" BOX_NAME = "opscode-ubuntu-16.04" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| if Vagrant.has_plugin?("vagrant-cachier") config.cache.scope = :box end # 1つめの仮想サーバ config.vm.define :develop do |develop| develop.omnibus.chef_version = :latest develop.vm.hostname = "develop" develop.vm.box = BOX_NAME develop.vm.box_url = BOX_URL develop.vm.network :private_network, ip: "192.168.33.10" # 以下を追加 # Vagrantfileがあるディレクトリと同じディレクトリのapplicationディレクトリをVagrantと共有します # 先にapplicationディレクトリを作成しておいてください develop.vm.synced_folder "application", "/var/www/application/current", id: "vagrant-root", :nfs => false, :owner => "vagrant", :group => "www-data", :mount_options => ["dmode=775,fmode=775"] end # 2つめの仮想サーバ config.vm.define :ci do |ci| ci.omnibus.chef_version = :latest ci.vm.hostname = "ci" ci.vm.box = BOX_NAME ci.vm.box_url = BOX_URL ci.vm.network :private_network, ip: "192.168.33.100" end # 3つめの仮想サーバ config.vm.define :deploy do |deploy| deploy.omnibus.chef_version = :latest deploy.vm.hostname = "deploy" deploy.vm.box = BOX_NAME deploy.vm.box_url = BOX_URL deploy.vm.network :private_network, ip: "192.168.33.200" end end
下記を実行
$ vagrant plugin install sahara $ vagrant plugin install vagrant-omnibus $ vagrant plugin install vagrant-cachier
./Gemfile を作成
# Gemfile source 'https://rubygems.org' gem 'chef' gem 'knife-solo' gem 'berkshelf', '~> 3.1.0'
下記を実行
$ bundle install $ bundle exec knife cookbook create phpenv -o site-cookbooks
字数オーバーの為、コメントにて続きを入れさせていただきます。ヘディングのテキスト
###補足情報(言語/FW/ツール等のバージョンなど)
実行OS:Windows10 pro 64bit
Vagrant 1.9.2
VirtualBOX 5.0.32
Ruby 2.3.3p222
devkit 4.7.2
Bundler 1.14.6
Chef 12.19.36
仮想OS:Ubuntu 16.04.1 LTS
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。