2017-09-12 4 views
0

Windows環境の32ビットホストでVagrantボックスとubuntu/trusty32を使用してRails環境を設定しています。私はbundle install --path=./vendor/bundleと付き合っています。私は、次のエラーを得た:迷惑メールSSHウィンドウ7 32ビットで宝石ネイティブ拡張nio4rを構築できません

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 

    current directory: /vagrant/vendor/bundle/ruby/2.4.0/gems/nio4r-2.1.0/ext/nio4r 
/home/vagrant/.rbenv/versions/2.4.1/bin/ruby -r ./siteconf20170911-24730-8nkvsn.rb extconf.rb 
checking for unistd.h... yes 
checking for sys/select.h... yes 
checking for poll.h... yes 
checking for sys/epoll.h... yes 
checking for sys/event.h... no 
checking for port.h... no 
checking for sys/resource.h... yes 
creating Makefile 

Text file busy @ unlink_internal - ./siteconf20170911-24730-8nkvsn.rb 

Gem files will remain installed in /vagrant/vendor/bundle/ruby/2.4.0/gems/nio4r-2.1.0 for inspection. 
Results logged to /vagrant/vendor/bundle/ruby/2.4.0/extensions/x86-linux/2.4.0-static/nio4r-2.1.0/gem_make.out 

An error occurred while installing nio4r (2.1.0), and Bundler cannot continue. 
Make sure that `gem install nio4r -v '2.1.0'` succeeds before bundling. 

In Gemfile: 
    rails_admin was resolved to 1.2.0, which depends on 
    rails was resolved to 5.0.6, which depends on 
     actioncable was resolved to 5.0.6, which depends on 
     nio4r 

問題は宝石nio4rの問題のようです。私はこれらを試してみました:

  • gem install bundler
  • bundle update
  • gem uninstall nio4r
  • gem install nio4r(これが正常に宝石をインストール)
  • rm Gemfile.lock
  • bundle install

上記のいずれの作業もありません。私もこれを試しました:

sudo apt-get install ruby2.2-dev 

しかし、それはパッケージを見つけることができませんでした。

E: Unable to locate package ruby2.2-dev 
E: Couldn't find any package by regex 'ruby2.2-dev' 

答えて

0

エラーは、主にメッセージText file busy @ unlink_internal - ./siteconf20170911-24730-8nkvsn.rbに宛てられます。 I found a solution and I followed the steps described in the article

バンドルパスをVM(共有フォルダにない)のローカルディレクトリに変更すると、エラーがなくなりました。

  1. mkdir ~/.bundles 
    
  2. 新しいディレクトリを作成し/vagrant/.bundle/config

    BUNDLE_PATH: "/home/vagrant/.bundles/PROJECT_NAME_HERE" 
    BUNDLE_DISABLE_SHARED_GEMS: "1" 
    
  3. にこれを追加実行bundle install
関連する問題