LoginSignup
12
15

More than 5 years have passed since last update.

WindowsにRubyの開発環境(RubyMine)構築

Last updated at Posted at 2015-03-01

Ruby開発環境構築

Rubyインストール

インストーラーに従ってインストール。

RubyInstallerをダウンロード&インストール
http://rubyinstaller.org/downloads/
※20150301かつ64bit版の最新は以下のURL
http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.1.5-x64.exe?direct

DEVELOPMENT KITインストール

gemを利用するために、DEVELOPMENT KITをダウンロードする

DEVELOPMENT KITをダウンロード
http://rubyinstaller.org/downloads/
※20150301かつ64bit版の最新は以下のURL
http://cdn.rubyinstaller.org/archives/devkits/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe

ダウンロードすると自己解凍書書庫になっているので、ダブルクリックして、
Rubyのインストールフォルダにdevkitsというフォルダを作成して、解凍。

C:\Ruby21-x64\devkits

その後、コマンドプロンプトを管理者モードで起動する。

C:\WINDOWS\system32>cd C:\Ruby21-x64\devkit
C:\Ruby21-x64\devkit>ruby dk.rb init
[INFO] found RubyInstaller v2.1.5 at C:/Ruby21-x64

Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.
C:\Ruby21-x64\devkit\ruby dk.rb install
[INFO] Updating convenience notice gem override for 'C:/Ruby21-x64'
[INFO] Installing 'C:/Ruby21-x64/lib/ruby/site_ruby/devkit.rb'

RubyInstallerの不具合修正

SSL認証局ダウンロード

ここから証明書ファイルをダウンロード

SSL認証局保存先を確認

C:\Ruby21-x64\devkit>gem which rubygems
C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems.rb

rubygems.rbがある場所がSSL認証局の保存場所

SSL認証局保存

以下の場所にダウンロードした認証局を保存

C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/AddTrustExternalCARoot-2048.pem

参考URL:SSL upgrades on rubygems.org and RubyInstaller versions
https://gist.github.com/luislavena/f064211759ee0f806c88

基礎的なgemをインストール

C:\Ruby21-x64\devkit>gem update --system
C:\Ruby21-x64\devkit>gem update rake
C:\Ruby21-x64\devkit>gem install json
C:\Ruby21-x64\devkit>gem install handler
C:\Ruby21-x64\devkit>gem install rails

※エラーが出た場合、エラーに従って、処理を行う。

RubyMineをインストール

RubyMineをインストール
※有償なので注意。

RubyMine
https://www.jetbrains.com/ruby/download/

その他

Rails開発のイケてるIDE RubyMineを使う(1)紹介編
http://techracho.bpsinc.jp/morimorihoge/2012_08_01/5921
メインの開発ツールをVimからRubyMineに変更した理由
http://qiita.com/jnchito/items/cb05bb14d89095e5cc0b
RubyMine の使い方
http://qiita.com/imk2o/items/c649a5edee1f088343f5

12
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
15