rails and ruby update on ubuntu ERROR: Failed to build gem native extension -
i'm upgrading ror app on ubuntu 14.04 server (aws ec2) ruby 2.1.4
2.2.4
, rails 4.2.4
4.2.6
, running following commands after ssh
ing server:
git pull origin master rvm install 2.2.4 bundle install gem install rails 4.2.6 ./restart_server.sh # script precompile assets , restart server
when accessing end point, receive following response of web application can not started
error: failed build gem native extension. /home/ubuntu/.rvm/rubies/ruby-2.2.4/bin/ruby extconf.rb checking rb_trap_immediate in ruby.h,rubysig.h... no checking rb_thread_blocking_region()... no checking inotify_init() in sys/inotify.h... yes checking writev() in sys/uio.h... yes checking rb_wait_for_single_fd()... yes checking rb_enable_interrupt()... no checking rb_time_new()... yes checking sys/event.h... no checking epoll_create() in sys/epoll.h... yes creating makefile make "destdir=" clean make "destdir=" compiling binder.cpp compiling page.cpp compiling cmain.cpp compiling kb.cpp compiling rubymain.cpp compiling ed.cpp compiling em.cpp em.cpp: in member function 'void eventmachine_t::_runepollonce()': em.cpp:574:37: error: 'rb_thread_select' not declared in scope em.cpp: in member function 'int selectdata_t::_select()': em.cpp:827:67: error: 'rb_thread_select' not declared in scope em.cpp: in member function 'void eventmachine_t::_runselectonce()': em.cpp:946:40: error: 'rb_thread_select' not declared in scope make: *** [em.o] error 1 make failed, exit code 2 gem files remain installed in /home/ubuntu/.rvm/gems/ruby-2.1.0/gems/eventmachine-1.0.3 inspection. results logged /home/ubuntu/.rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.2.0/eventmachine-1.0.3/gem_make.out (gem::ext::builderror) /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:89:in `run' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:51:in `block in make' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:43:in `each' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:43:in `make' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/ext/ext_conf_builder.rb:47:in `block in build' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/tempfile.rb:319:in `open' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/ext/ext_conf_builder.rb:17:in `build' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:160:in `chdir' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:160:in `block in build_extension' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:159:in `synchronize' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:159:in `build_extension' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:198:in `block in build_extensions' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:195:in `each' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:195:in `build_extensions' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1436:in `block in build_extensions' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/user_interaction.rb:45:in `use_ui' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1434:in `build_extensions' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/stub_specification.rb:60:in `build_extensions' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:56:in `contains_requirable_file?' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:925:in `block in find_inactive_by_path' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:924:in `each' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:924:in `find' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:924:in `find_inactive_by_path' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems.rb:185:in `try_activate' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:132:in `rescue in require' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:144:in `require' /home/ubuntu/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37/lib/phusion_passenger/native_support.rb:360:in `load_native_extension' /home/ubuntu/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37/lib/phusion_passenger/native_support.rb:106:in `load_from_buildout_dir' /home/ubuntu/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37/lib/phusion_passenger/native_support.rb:36:in `try_load' /home/ubuntu/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37/lib/phusion_passenger/native_support.rb:47:in `start' /home/ubuntu/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37/lib/phusion_passenger/native_support.rb:376:in `<top (required)>' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require' /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require' /home/ubuntu/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37/lib/phusion_passenger.rb:233:in `require_passenger_lib' /home/ubuntu/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:75:in `init_passenger' /home/ubuntu/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:157:in `<module:app>' /home/ubuntu/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:29:in `<module:phusionpassenger>' /home/ubuntu/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:28:in `<main>'
the issue caused ubuntu library dependency issue, resolved using following commands:
sudo apt-get remove linux-headers-virtual linux-virtual sudo apt-get install linux-headers-virtual linux-virtual sudo apt-get -f install sudo apt-get autoremove
Comments
Post a Comment