Can't install gem json v 1.8.6
還沒有人認領這個 Issue。
- 主要語言
- HTML
- 星號
- 32
- 分支
- 5
- 平均合併
- 14 小時 17 分鐘
- 30 天內合併 PR
- 1
描述
I have to work on an old rails 4.2 codebase. I have installed Ruby 2.3 as a snap package - I am trying to avoid rvm.
Now, when I run bundle install it complains that it can't install the json gem. Here is the error message:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/user/.gem/gems/json-1.8.6/ext/json/ext/generator
//bin/ruby -r ./siteconf20190430-29073-znwkkd.rb extconf.rb
sh: 1: //bin/ruby: not foundextconf failed, exit code 127
When I try to install just the gem with 'gem install json -v '1.8.6' --source 'https://rubygems.org/'' I get this error:
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
current directory: /home/user/.gem/gems/json-1.8.6/ext/json/ext/generator
/snap/bin/ruby -r ./siteconf20190430-30141-z86zxd.rb extconf.rb
mkmf.rb can't find header files for ruby at /snap/ruby/109/lib/ruby/include/ruby.hextconf failed, exit code 1
So, as far as I can tell the native extension is looking in the wrong directory for the ruby headers - I guess...
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先使用 Ruby snap 套件重現回報的 bundle install 和 gem install json -v '1.8.6' 失敗。比較 /snap/bin/ruby 和 //bin/ruby 路徑,以及缺少的 /snap/ruby/109/lib/ruby/include/ruby.h 標頭;對此設定而言,json gem 成功安裝即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- ruby
- 領域
- build-system
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100