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

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

新規登録して質問してみよう
ただいま回答率
85.48%
Windows 10

Windows 10は、マイクロソフト社がリリースしたOSです。Modern UIを標準画面にした8.1から、10では再びデスクトップ主体に戻され、UIも変更されています。PCやスマホ、タブレットなど様々なデバイスに幅広く対応していることが特徴です。

Ruby

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

Ruby on Rails

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

Q&A

解決済

1回答

2900閲覧

railsをインストールしたい

algorithm

総合スコア11

Windows 10

Windows 10は、マイクロソフト社がリリースしたOSです。Modern UIを標準画面にした8.1から、10では再びデスクトップ主体に戻され、UIも変更されています。PCやスマホ、タブレットなど様々なデバイスに幅広く対応していることが特徴です。

Ruby

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

Ruby on Rails

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

0グッド

0クリップ

投稿2016/09/04 04:14

###前提・実現したいこと
railsをインストールしたいです。

###発生している問題・エラーメッセージ

c:\rails\work>gem install rails Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/nio4r-1.2.1/ext/nio4r C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20160904-9016-3h0ntq.rb extconf.rb checking for unistd.h... *** 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=C:/Ruby23-x64/bin/$(RUBY_BASE_NAME) C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:587:in `try_cpp' from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:1091:in `block in have_header' from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for' from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone' from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:320:in `open' from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone' from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:320:in `open' from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:346:in `postpone' from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for' from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:1090:in `have_header' from extconf.rb:3:in `<main>' To see why this extension failed to compile, please check the mkmf.log which can be found here: C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/nio4r-1.2.1/mkmf.log extconf failed, exit code 1 Gem files will remain installed in C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/nio4r-1.2.1 for inspection. Results logged to C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/nio4r-1.2.1/gem_make.out

###該当のソースコード

gem install rails

###試したこと
windows10を初期化した。

###補足情報(言語/FW/ツール等のバージョンなど)
windows10 ruby 64bit 2.3.1
DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe
rubyinstaller-2.3.1-x64.exe

参考したサイトは
https://www.oiax.jp/rails/zakkan/rails_4_2_installation_on_windows.html
Ruby on Rails 4.2 を Windows にインストールする手順をかなり丁寧に説明してみました

書籍は、
Ruby on Rails 5.0 インストール手順書
改訂3版 基礎 Ruby on Rails 基礎シリーズ

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

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

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

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

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

guest

回答1

0

ベストアンサー

Windowsでは、ruby2.3でrailsを使うには工夫が必要です。

こちらも参照

特に理由が無ければ、2.2系で導入する事をお勧めします。

投稿2016/09/04 12:36

shanxia

総合スコア1038

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

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

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問