人力検索はてな
モバイル版を表示しています。PC版はこちら
i-mobile

さくらのレンタルサーバーでとあるパッケージをgemインストールしようとしたところ、
nokogiriのインストールで
nokogiri requires Ruby version >= 1.9.2.
というerrorが出てしまいました.
ruby -vでは1.9.3と認識されています。
解決方法をご存知の方はいらっしゃいますか

●質問者: 匿名質問者
●カテゴリ:ウェブ制作
○ 状態 :終了
└ 回答数 : 1/1件

▽最新の回答へ

1 ● 匿名回答1号

ユーザーディレクトリにruby1.9.3をインストールしたなら環境変数でPATH指定しましょう。
http://stackoverflow.com/questions/17204152/nokogiri-error-when-running-bundle-install

Turned out I was using the default system Ruby (and thus installing all the gems there in /Library/Ruby/Gems) even though rbenv points to ruby-1.9.3 so that's why Nokogiri was complaining.

Fixed this by adding this to $PATH, so rbenv loads before the system ruby:

export PATH="$HOME/.rbenv/bin:$PATH"

関連質問

●質問をもっと探す●



0.人力検索はてなトップ
8.このページを友達に紹介
9.このページの先頭へ
対応機種一覧
お問い合わせ
ヘルプ/お知らせ
ログイン
無料ユーザー登録
はてなトップ