無限地獄のようなエラーになやむ

先に結論)古いjson 1.7.4がインストールできないならgem を1.8.29にバージョンダウンする

まずはこれ

$ rails s thin 
Could not find rake-10.1.1 in any of the sources
Run `bundle install` to install missing gems.

おk、やってみる。

$ bundle install
Fetching gem metadata from http://rubygems.org/.........
Fetching additional metadata from http://rubygems.org/..
Installing rake 10.1.1
(中略)
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    c:/Ruby193/bin/ruby.exe -r ./siteconf20141010-3744-nxc0ht.rb extconf.rb
creating Makefile

make  clean
Makefile:165: *** target pattern contains no `%'.  Stop.

make
Makefile:165: *** target pattern contains no `%'.  Stop.

make failed, exit code 2

Gem files will remain installed in c:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.7.4 for inspection.
Results logged to c:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/json-1.7.4/gem_make.out
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.

json入れろってことか?

$ gem install json -v '1.7.4'
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing json:
        ERROR: Failed to build gem native extension.

    c:/Ruby193/bin/ruby.exe -r ./siteconf20141010-1252-q1jano.rb extconf.rb
creating Makefile

make  clean
Makefile:165: *** target pattern contains no `%'.  Stop.

make
Makefile:165: *** target pattern contains no `%'.  Stop.

make failed, exit code 2

Gem files will remain installed in c:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.7.4 for inspection.
Results logged to c:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/json-1.7.4/gem_make.out

どないせいっちゅーんだ!
初心に立ち返る。

$ rails s thin
Could not find json-1.7.4 in any of the sources
Run `bundle install` to install missing gems.

おk

$ bundle install
(中略)
Gem files will remain installed in c:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.7.4 for inspection.
Results logged to c:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/json-1.7.4/gem_make.out
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.

かなり腹が立ってきたので他のことに手を出すとMySQLのインストールで苦労したことが思い出される。

#苦労したmysql2のインストール結果
$ gem install mysql2
(error)
$ gem -v -system
2.4.1
$ gem update -system 1.8.29
$ gem install mysql2 –v 0.3.14 – ‘—with-mysqldir=”C:\mysql-connector”’
$ gem update -system

にたような事をやってみる。

$ gem update -system 1.8.29
(中略)
$ gem install json -v '1.7.4'
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed json-1.7.4
1 gem installed
Installing ri documentation for json-1.7.4...
Installing RDoc documentation for json-1.7.4...

出来た!
ついでに試す

$ gem update json
Updating installed gems
Updating json
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed json-1.8.1
Gems updated: json
Installing ri documentation for json-1.8.1...
Installing RDoc documentation for json-1.8.1...

出来た!
 
やっと振り出しに戻る

$ rails s thin
Could not find rdoc-3.12.2 in any of the sources
Run `bundle install` to install missing gems.

わかったよ、ぶんどる

$ bundle install
Fetching gem metadata from http://rubygems.org/.........
Fetching additional metadata from http://rubygems.org/..
Using rake 10.1.1
Using i18n 0.6.9
Using multi_json 1.9.0
Using activesupport 3.2.17
Using builder 3.0.4
Using activemodel 3.2.17
Using erubis 2.7.0
Using journey 1.0.4
Using rack 1.4.5
Using rack-cache 1.2
Using rack-test 0.6.2
Using hike 1.2.3
Using tilt 1.4.1
Using sprockets 2.2.2
Using actionpack 3.2.17
Using mime-types 1.25.1
Using polyglot 0.3.4
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 3.2.17
Using arel 3.0.3
Using tzinfo 0.3.39
Using activerecord 3.2.17
Using activeresource 3.2.17
Using coffee-script-source 1.7.0
Using execjs 2.0.2
Using coffee-script 2.2.0
Using rack-ssl 1.3.3
Using json 1.7.4
Installing rdoc 3.12.2
Installing thor 0.18.1
Installing railties 3.2.17
Installing coffee-rails 3.2.2
Installing daemons 1.1.9
Installing eventmachine 1.0.3
Installing exception_notification 4.0.1
Installing jquery-rails 2.1.4
Installing mail-iso-2022-jp 2.0.2
Installing mysql2 0.3.11
Using bundler 1.7.3
Installing rails 3.2.17
Installing rails-clean-logs 1.1
Installing rails3-jquery-autocomplete 1.0.13
Installing sass 3.3.3
Installing sass-rails 3.2.6
Installing thin 1.6.2
Installing uglifier 2.2.1
Installing will_paginate 3.0.5
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
Post-install message from rdoc:
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

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