質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

解決済

1回答

1115閲覧

rbenvのglobalが最新版にならない

退会済みユーザー

退会済みユーザー

総合スコア0

Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2018/11/21 20:57

macユーザです。
railsをインストールするためにrubyをアップデートし、tuby -vでしっかり2.5.3になっていることは確認できるのですが、rbenvの最新版(2.5.3)をインストールして rbenv global 2.5.3を実行しても、ずっとrbenv 1.1.1のままです。

rbenvを再インストールしても、すでに存在しますが続けますか?と画面に出てきます。

ちなみに $gem install railsをインストールしようとすると、

Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. current directory: /Users/johndoe/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/nokogiri-1.8.5/ext/nokogiri /Users/johndoe/.rbenv/versions/2.5.3/bin/ruby -r ./siteconf20181121-62741-15hvv2e.rb extconf.rb checking if the C compiler accepts ... yes checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no Building nokogiri using packaged libraries. Using mini_portile version 2.3.0 checking for iconv.h... yes checking for gzdopen() in -lz... yes checking for iconv... yes ************************************************************************ IMPORTANT NOTICE: Building Nokogiri with a packaged version of libxml2-2.9.8 with the following patches applied: - 0001-Revert-Do-not-URI-escape-in-server-side-includes.patch - 0002-Fix-nullptr-deref-with-XPath-logic-ops.patch - 0003-Fix-infinite-loop-in-LZMA-decompression.patch Team Nokogiri will keep on doing their best to provide security updates in a timely manner, but if this is a concern for you and want to use the system library instead; abort this installation process and reinstall nokogiri as follows: gem install nokogiri -- --use-system-libraries [--with-xml2-config=/path/to/xml2-config] [--with-xslt-config=/path/to/xslt-config] If you are using Bundler, tell it to use the option: bundle config build.nokogiri --use-system-libraries bundle install Note, however, that nokogiri is not fully compatible with arbitrary versions of libxml2 provided by OS/package vendors. ************************************************************************ Extracting libxml2-2.9.8.tar.gz into tmp/x86_64-apple-darwin18.2.0/ports/libxml2/2.9.8... OK Running git apply with /Users/johndoe/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/nokogiri-1.8.5/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch... OK Running git apply with /Users/johndoe/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/nokogiri-1.8.5/patches/libxml2/0002-Fix-nullptr-deref-with-XPath-logic-ops.patch... OK Running git apply with /Users/johndoe/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/nokogiri-1.8.5/patches/libxml2/0003-Fix-infinite-loop-in-LZMA-decompression.patch... OK Running 'configure' for libxml2 2.9.8... OK Running 'compile' for libxml2 2.9.8... ERROR, review '/Users/johndoe/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/nokogiri-1.8.5/ext/nokogiri/tmp/x86_64-apple-darwin18.2.0/ports/libxml2/2.9.8/compile.log' to see what happened. Last lines are: ======================================================================== _parseAndPrintFile in xmllint.o "_xmlXPathEval", referenced from: _doXPathQuery in xmllint.o "_xmlXPathFreeContext", referenced from: _doXPathQuery in xmllint.o "_xmlXPathFreeObject", referenced from: _doXPathQuery in xmllint.o "_xmlXPathIsInf", referenced from: _doXPathDump in xmllint.o "_xmlXPathIsNaN", referenced from: _doXPathDump in xmllint.o "_xmlXPathNewContext", referenced from: _doXPathQuery in xmllint.o "_xmlXPathOrderDocElems", referenced from: _parseAndPrintFile in xmllint.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [xmllint] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 ======================================================================== *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/Users/johndoe/.rbenv/versions/2.5.3/bin/$(RUBY_BASE_NAME) --help --clean --use-system-libraries --enable-static --disable-static --with-zlib-dir --without-zlib-dir --with-zlib-include --without-zlib-include=${zlib-dir}/include --with-zlib-lib --without-zlib-lib=${zlib-dir}/lib --enable-cross-build --disable-cross-build /Users/johndoe/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:402:in `block in execute': Failed to complete compile task (RuntimeError) from /Users/johndoe/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:373:in `chdir' from /Users/johndoe/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:373:in `execute' from /Users/johndoe/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:115:in `compile' from /Users/johndoe/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:154:in `cook' from extconf.rb:365:in `block (2 levels) in process_recipe' from extconf.rb:257:in `block in chdir_for_build' from extconf.rb:256:in `chdir' from extconf.rb:256:in `chdir_for_build' from extconf.rb:364:in `block in process_recipe' from extconf.rb:262:in `tap' from extconf.rb:262:in `process_recipe' from extconf.rb:551:in `<main>' To see why this extension failed to compile, please check the mkmf.log which can be found here: /Users/johndoe/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-18/2.5.0-static/nokogiri-1.8.5/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /Users/johndoe/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/nokogiri-1.8.5 for inspection. Results logged to /Users/johndoe/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-18/2.5.0-static/nokogiri-1.8.5/gem_make.out

と表示されできないみたいです。。。 回答よろしくおねがいします

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

rbenv global 2.5.3を実行しても、ずっとrbenv 1.1.1のまま

rbenv global 2.5.3は、Rubyのバージョン2.5.3を使う事を設定するコマンドであり、rbenvをバージョンアップする訳じゃないので、rbenvのバージョンは変わりません。
Rubyのバージョンは変わっているはずです。

Rubyのバージョンを確認するコマンドは、ruby -vです。

投稿2018/11/22 00:17

編集2018/11/22 00:51
otn

総合スコア84505

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問