rails4をvagrantとvirtualboxを使って環境構築をしようとしています。
vargrantとvirtualboxとubuntuは既にインストールしていたので、
vagrant init ubuntu14.04でvagrantfileを作成し、vagrantup、vagrant sshで接続しました。
gitから自分がcloud9で開発していたコードをcloneして、bundle installを行おうとしたら、bundleがインストールされていなかったので、bundleをインストールし、
bundle installを行うと
Installing bcrypt 3.1.11 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby2.1 extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h extconf failed, exit code 1 Gem files will remain installed in /tmp/bundler20160619-2247-17ajjvjbcrypt-3.1.11/gems/bcrypt-3.1.11 for inspection. Results logged to /tmp/bundler20160619-2247-17ajjvjbcrypt-3.1.11/extensions/x86_64-linux/2.1.0/bcrypt-3.1.11/gem_make.out Installing debug_inspector 0.0.2 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby2.1 extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h extconf failed, exit code 1 Gem files will remain installed in /tmp/bundler20160619-2247-st8t9tdebug_inspector-0.0.2/gems/debug_inspector-0.0.2 for inspection. Results logged to /tmp/bundler20160619-2247-st8t9tdebug_inspector-0.0.2/extensions/x86_64-linux/2.1.0/debug_inspector-0.0.2/gem_make.out Using sass 3.4.22 Installing byebug 9.0.5 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby2.1 extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h extconf failed, exit code 1 Gem files will remain installed in /tmp/bundler20160619-2247-14ly94gbyebug-9.0.5/gems/byebug-9.0.5 for inspection. Results logged to /tmp/bundler20160619-2247-14ly94gbyebug-9.0.5/extensions/x86_64-linux/2.1.0/byebug-9.0.5/gem_make.out Using coderay 1.1.1 Using coffee-script-source 1.10.0 Using thor 0.19.1 Using concurrent-ruby 1.0.2 Using multi_json 1.12.1 Using method_source 0.8.2 Using slop 3.6.0 Using yard 0.8.7.6 Using bundler 1.12.5 Using tilt 2.0.5 Using spring 1.7.1 Installing sqlite3 1.3.11 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby2.1 extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h extconf failed, exit code 1 Gem files will remain installed in /tmp/bundler20160619-2247-j4dwksqlite3-1.3.11/gems/sqlite3-1.3.11 for inspection. Results logged to /tmp/bundler20160619-2247-j4dwksqlite3-1.3.11/extensions/x86_64-linux/2.1.0/sqlite3-1.3.11/gem_make.out An error occurred while installing json (1.8.3), and Bundler cannot continue. Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
のようなエラーがでました。jsonのバージョンがダメということで、gemでjsonをインストールしようとすると、
Building native extensions. This could take a while... ERROR: Error installing json: ERROR: Failed to build gem native extension. /usr/bin/ruby2.1 extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h extconf failed, exit code 1 Gem files will remain installed in /var/lib/gems/2.1.0/gems/json-1.8.3 for inspection. Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/json-1.8.3/gem_make.out
のようなエラーがでました。
なので、
googleで検索すると、ruby-devをインストールしたら解決したという記事があったので、それに従ってapt-getでruby-devをインストールしました。
しかし、
以前と上記エラーが発生してbundle installが行えません。
どなたか解決方法を教えてもらえないでしょうか?
よろしくお願いします。
回答2件
あなたの回答
tips
プレビュー