#bundle install でエラー
Railsチュートリアルを行っている最中なのですが、
下記エラーが発生し困っております。
解決方法をググって色々探し、試してみたのですが解決できませんでした。
また、関係あるかどうかわかりませんが
プロジェクトディレクトリ内でrails -v
を実行するとエラーが表示されます。
vagrant@vagrant-ubuntu-trusty-64:/vagrant/sample_app$ rails -v /home/vagrant/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/dependency.rb:319:in ` to_specs': Could not find 'railties' (>= 0.a) among 33 total gem(s) (Gem::LoadError ) Checked in 'GEM_PATH=/vagrant/sample_app/path/ruby/2.3.0', execute `gem env` for mo re information from /home/vagrant/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/dependenc y.rb:328:in `to_spec' from /home/vagrant/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/ kernel_gem.rb:65:in `gem' from /home/vagrant/.rvm/gems/ruby-2.3.1/bin/rails:22:in `<main>' from /home/vagrant/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `ev al' from /home/vagrant/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<m ain>'
##エラー内容
vagrant@vagrant-ubuntu-trusty-64:/vagrant/sample_app$ bundle install /*中略*/ Installing nokogiri 1.6.8.1 with native extensions Using rack-test 0.6.3 Using sprockets 3.7.0 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /vagrant/sample_app/path/ruby/2.3.0/gems/nio4r-1.2.1/ext/nio4r /home/vagrant/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20161015-19290-l2ka0a.rb extconf.rb checking for unistd.h... yes checking for rb_thread_blocking_region()... no checking for rb_thread_call_without_gvl()... 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 To see why this extension failed to compile, please check the mkmf.log which can be found here: /vagrant/sample_app/path/ruby/2.3.0/extensions/x86_64-linux/2.3.0/nio4r-1.2.1/mkmf. log Text file busy @ unlink_internal - ./siteconf20161015-19290-l2ka0a.rb Gem files will remain installed in /vagrant/sample_app/path/ruby/2.3.0/gems/nio4r-1.2.1 for inspection. Results logged to /vagrant/sample_app/path/ruby/2.3.0/extensions/x86_64-linux/2.3.0/nio4r-1.2.1/gem_m ake.out An error occurred while installing nio4r (1.2.1), and Bundler cannot continue. Make sure that `gem install nio4r -v '1.2.1'` succeeds before bundling.
##環境
- Ruby 2.3.1
- Rails 5.0.0.1
- Vagrant
- Ubuntu 14
##mkmf.log
have_header: checking for unistd.h... -------------------- yes checked program was: /* begin */ 1: #include "ruby.h" 2: 3: int main(int argc, char **argv) 4: { 5: return 0; 6: } /* end */ checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include <unistd.h> /* end */ -------------------- have_func: checking for rb_thread_blocking_region()... -------------------- no conftest.c: In function ‘t’: conftest.c:13:57: error: ‘rb_thread_blocking_region’ undeclared (first use in this function) int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_thread_blocking_region; return !p; } ^ conftest.c:13:57: note: each undeclared identifier is reported only once for each function it appears in checked program was: /* begin */ 1: #include "ruby.h" 2: 3: /*top*/ 4: extern int t(void); 5: int main(int argc, char **argv) 6: { 7: if (argc > 1000000) { 8: printf("%p", &t); 9: } 10: 11: return 0; 12: } 13: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_thread_blocking_region; return !p; } /* end */ /tmp/cc8EA8BT.o: In function `t': /vagrant/sample_app/path/ruby/2.3.0/gems/nio4r-1.2.1/ext/nio4r/conftest.c:14: undefined reference to `rb_thread_blocking_region' collect2: error: ld returned 1 exit status checked program was: /* begin */ 1: #include "ruby.h" 2: 3: /*top*/ 4: extern int t(void); 5: int main(int argc, char **argv) 6: { 7: if (argc > 1000000) { 8: printf("%p", &t); 9: } 10: 11: return 0; 12: } 13: extern void rb_thread_blocking_region(); 14: int t(void) { rb_thread_blocking_region(); return 0; } /* end */ -------------------- have_func: checking for rb_thread_call_without_gvl()... -------------------- yes conftest.c: In function ‘t’: conftest.c:13:57: error: ‘rb_thread_call_without_gvl’ undeclared (first use in this function) int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_thread_call_without_gvl; return !p; } ^ conftest.c:13:57: note: each undeclared identifier is reported only once for each function it appears in checked program was: /* begin */ 1: #include "ruby.h" 2: 3: /*top*/ 4: extern int t(void); 5: int main(int argc, char **argv) 6: { 7: if (argc > 1000000) { 8: printf("%p", &t); 9: } 10: 11: return 0; 12: } 13: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_thread_call_without_gvl; return !p; } /* end */ checked program was: /* begin */ 1: #include "ruby.h" 2: 3: /*top*/ 4: extern int t(void); 5: int main(int argc, char **argv) 6: { 7: if (argc > 1000000) { 8: printf("%p", &t); 9: } 10: 11: return 0; 12: } 13: extern void rb_thread_call_without_gvl(); 14: int t(void) { rb_thread_call_without_gvl(); return 0; } /* end */ -------------------- have_header: checking for sys/select.h... -------------------- yes checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include <sys/select.h> /* end */ -------------------- have_header: checking for poll.h... -------------------- yes checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include <poll.h> /* end */ -------------------- have_header: checking for sys/epoll.h... -------------------- yes checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include <sys/epoll.h> /* end */ -------------------- have_header: checking for sys/event.h... -------------------- no conftest.c:3:23: fatal error: sys/event.h: No such file or directory #include <sys/event.h> ^ compilation terminated. checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include <sys/event.h> /* end */ -------------------- have_header: checking for port.h... -------------------- no conftest.c:3:18: fatal error: port.h: No such file or directory #include <port.h> ^ compilation terminated. checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include <port.h> /* end */ -------------------- have_header: checking for sys/resource.h... -------------------- yes checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include <sys/resource.h> /* end */ --------------------
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。