ruby / ruby/snap.ruby

Can't install gem json v 1.8.6

オープン
#14 コメント 9 件 リアクション 4 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
HTML
スター
32
フォーク
5
平均マージ
14時間 17分
マージ済み PR(30日)
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 found

extconf 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.h

extconf 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...

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、Ruby snap パッケージで報告された bundle installgem 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。