NOTO

because its extensions are not built というエラー

 Date:2018-04-02 10:58:00 +0900
 Categories: TECHNOLOGY

ruby 2.3.7をrbenvでインストールした際に発生したエラー。何かいれ方がよくなかったみたいで、rails serverで起動しているぽいけどエラー表示。

エラー

$ bundle install rails s

Ignoring binding_of_caller-0.7.3 because its extensions are not built. Try: gem pristine binding_of_caller --version 0.7.3
Ignoring binding_of_caller-0.7.2 because its extensions are not built. Try: gem pristine binding_of_caller --version 0.7.2
Ignoring byebug-9.0.6 because its extensions are not built. Try: gem pristine byebug --version 9.0.6
Ignoring debug_inspector-0.0.2 because its extensions are not built. Try: gem pristine debug_inspector --version 0.0.2
Ignoring eventmachine-1.0.8 because its extensions are not built. Try: gem pristine eventmachine --version 1.0.8
Ignoring ffi-1.9.17 because its extensions are not built. Try: gem pristine ffi --version 1.9.17
Ignoring hitimes-1.2.5 because its extensions are not built. Try: gem pristine hitimes --version 1.2.5
Ignoring nokogiri-1.8.1 because its extensions are not built. Try: gem pristine nokogiri --version 1.8.1
Ignoring nokogiri-1.8.0 because its extensions are not built. Try: gem pristine nokogiri --version 1.8.0
Ignoring nokogiri-1.5.11 because its extensions are not built. Try: gem pristine nokogiri --version 1.5.11
Ignoring rainbow-2.2.2 because its extensions are not built. Try: gem pristine rainbow --version 2.2.2
Ignoring ruby-prof-0.16.2 because its extensions are not built. Try: gem pristine ruby-prof --version 0.16.2
Ignoring ruby-prof-0.15.8 because its extensions are not built. Try: gem pristine ruby-prof --version 0.15.8
Ignoring websocket-driver-0.6.5 because its extensions are not built. Try: gem pristine websocket-driver --version 0.6.5

それで仰るとおりにpristineすると

$ be gem pristine binding_of_caller --version 0.7.3
ERROR: While executing gem ... (Gem::Exception)
Failed to find gems ["binding_of_caller"] = 0.7.3

検索したところ pristine --all しろってみつけたのでやったんだけど、同じ感じ。なんか見つけられないし、おれはお前のこと知らないって感じだったので、一旦 vernder/bundle にインストールしていたgemをまるごと消し去ってインストールしてみている。

もう一度 bundle install rails s に挑戦

$ bundle exec rails s
=> Booting WEBrick
=> Rails 4.2.9 application starting in development on[http://localhost:3000](http://localhost:3000)
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server

動いたようだ。

Tweet