ひさしぶりに動かそうとしたらRailsが入っていなかった

Aptanaのターミナルで怒られた

$ rails
sh.exe": rails: command not found

なんで?
ゲムを確認すると・・・ない

gem list
(railsがない)
gem install rails --version 3.2.19
bundle install
(だらだら)
An error occurred while installing json (1.7.4), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.4'` succeeds before bundling.
(エラー)

エラーになる

gem install json -v '1.7.4'
(だらだら)
(エラー)

無限地獄のようなエラーになやむを参考にする

rubyのバージョンを疑う

C:\Users\kenmi_000>pik list
  193: ruby 1.9.3p551 (2014-11-13) [i386-mingw32]
* 222: ruby 2.2.2p95 (2015-04-13 revision 50295) [i386-mingw32]

C:\Users\kenmi_000>pik use 193

C:\Users\kenmi_000>pik list
* 193: ruby 1.9.3p551 (2014-11-13) [i386-mingw32]
  222: ruby 2.2.2p95 (2015-04-13 revision 50295) [i386-mingw32]

C:\Users\kenmi_000\Documents\Aptana Studio 3 Workspace\support14>gem install json -v '1.7.4'
Fetching: json-1.7.4.gem (100%)
(だらだら)
1 gem installed

C:\Users\kenmi_000\Documents\Aptana Studio 3 Workspace\support14>bundle install
(だらだら)
Depending on your version of ruby, you may need to install ruby rdoc/ri data:

<= 1.8.6 : unsupported
 = 1.8.7 : gem install rdoc-data; rdoc-data --install
 = 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Post-install message from mysql2:

======================================================================================================

  You've installed the binary version of mysql2.
  It was built using MySQL Connector/C version 6.0.2.
  It's recommended to use the exact same version to avoid potential issues.

  At the time of building this gem, the necessary DLL files where available
  in the following download:

  http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0.2-win32.zip/from/pick

  And put lib\libmysql.dll file in your Ruby bin directory, for example C:\Ruby\bin

======================================================================================================

入ったけど、mysql2がないらしい。

http://mirror.cogentco.com/pub/mysql/Connector-C/ から 「mysql-connector-c-noinstall-6.0.1-win32.zip」ダウンロード&ZIP展開、

mysql-connector-c-noinstall-6.0.1-win32\lib\libmysql.dll を

C:\Ruby193\bin にコピーする

そして

bundle install

でエラーなしで完了した