ruby on rails - Failed to build gem native extension nio4r in Vagrant SSH windows 7 32-bit -
i'm setting rails environment using vagrant box ubuntu/trusty32 in windows 7 32-bit host. i'm stuck bundle install --path=./vendor/bundle
. got following error:
gem::ext::builderror: error: failed 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 unistd.h... yes checking sys/select.h... yes checking poll.h... yes checking sys/epoll.h... yes checking sys/event.h... no checking port.h... no checking sys/resource.h... yes creating makefile text file busy @ unlink_internal - ./siteconf20170911-24730-8nkvsn.rb gem files remain installed in /vagrant/vendor/bundle/ruby/2.4.0/gems/nio4r-2.1.0 inspection. results logged /vagrant/vendor/bundle/ruby/2.4.0/extensions/x86-linux/2.4.0-static/nio4r-2.1.0/gem_make.out error occurred while installing nio4r (2.1.0), , bundler cannot continue. make sure `gem install nio4r -v '2.1.0'` succeeds before bundling. in gemfile: rails_admin resolved 1.2.0, depends on rails resolved 5.0.6, depends on actioncable resolved 5.0.6, depends on nio4r
the problem seems issue of gem nio4r
. have tried these:
gem install bundler
bundle update
gem uninstall nio4r
gem install nio4r
(this installed gem)rm gemfile.lock
bundle install
none of above works. tried this:
sudo apt-get install ruby2.2-dev
but couldn't find package.
e: unable locate package ruby2.2-dev e: couldn't find package regex 'ruby2.2-dev'
the error addresses message text file busy @ unlink_internal - ./siteconf20170911-24730-8nkvsn.rb
. i found solution , followed steps described in article.
by changing bundle path directory that's local vm (not on shared folder) made error gone away.
create new directory
mkdir ~/.bundles
add
/vagrant/.bundle/config
bundle_path: "/home/vagrant/.bundles/project_name_here" bundle_disable_shared_gems: "1"
- run
bundle install
Comments
Post a Comment