[英]Gem::Ext::BuildError: ERROR: Failed to build gem native extension on json 1.8.6 and sqlite3 1.3.13
I am created new application and then run in command line bundle show so show this error :- 我创建了新的应用程序,然后在命令行捆绑中运行show,所以显示此错误:-
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies............................................
Using rake 12.0.0
Using i18n 0.8.1
Using minitest 4.7.5
Using multi_json 1.12.1
Using thread_safe 0.3.6
Using tzinfo 0.3.53
Using builder 3.1.4
Using erubis 2.7.0
Using rack 1.5.5
Using mime-types-data 3.2016.0521
Using activerecord-deprecated_finders 1.0.4
Using arel 4.0.2
Using bundler 1.11.2
Using coffee-script-source 1.12.2
Using execjs 2.7.0
Using thor 0.19.4
Using hike 1.2.3
Installing json 1.8.6 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /tmp/bundler20170330-4696-17s1gfujson-1.8.6/gems/json-1.8.6/ext/json/ext/generator
/usr/bin/ruby2.3 -r ./siteconf20170330-4696-1cm0oql.rb 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/bundler20170330-4696-17s1gfujson-1.8.6/gems/json-1.8.6 for inspection.
Results logged to /tmp/bundler20170330-4696-17s1gfujson-1.8.6/extensions/x86_64-linux/2.3.0/json-1.8.6/gem_make.out
Using tilt 1.4.1
Using rdoc 4.3.0
Using sass 3.2.19
Installing sqlite3 1.3.13 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /tmp/bundler20170330-4696-5gxxursqlite3-1.3.13/gems/sqlite3-1.3.13/ext/sqlite3
/usr/bin/ruby2.3 -r ./siteconf20170330-4696-1s2vax3.rb 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/bundler20170330-4696-5gxxursqlite3-1.3.13/gems/sqlite3-1.3.13 for inspection.
Results logged to /tmp/bundler20170330-4696-5gxxursqlite3-1.3.13/extensions/x86_64-linux/2.3.0/sqlite3-1.3.13/gem_make.out
Using turbolinks-source 5.0.0
Using activesupport 4.0.13
Using rack-test 0.6.3
Using mime-types 3.1
Using coffee-script 2.4.1
Using uglifier 3.1.11
An error occurred while installing json (1.8.6), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.6'` succeeds before bundling.
I am use this all version :- 我正在使用所有版本:-
Ruby version:- ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
Rails version:- Rails 4.0.13
Gem version:- 2.5.1
Bundle version:- Bundler version 1.14.6
Mongo version:- MongoDB shell version: 2.4.14
Please tell us! 请告诉我们! How to solve this problem? 如何解决这个问题呢? I am search so many solution but does not find out suitable solutions. 我正在搜索许多解决方案,但没有找到合适的解决方案。
按照这里的 github post,您是否尝试运行以下命令来修复它:
sudo apt-get install libgmp3-dev
apt install ruby-dev
要么
apt-get install ruby-dev
I was trying to set up Ruby/Rails on a Mint 18.1 and "apt-get install libgmp3-dev" did not help but "apt-get install ruby-dev"seemed to fix the problem. 我试图在Mint 18.1上设置Ruby / Rails,“ apt-get install libgmp3-dev”无济于事,但“ apt-get install ruby-dev”似乎可以解决此问题。 Running "bundle-install" after that went off without a hitch. 之后运行“捆绑安装”顺利进行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.