Heroku は、セキュリティ パッチのため、この gem に更新することを勧めましたが、これによりあらゆる種類の頭痛が発生し、現在、ローカル環境が正しく機能していません。彼らは、セキュリティ対策としてこれを行うことを提案しました。彼らは、私のアプリにアクセスして、gemfile のバージョンを変更し、単純に「bundle update rails」を実行することを提案しました。出力は次のとおりです。
$ bundle update rails
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.20)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.20)
Using erubis (2.6.6)
Using rack (1.2.8)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.37)
Using actionpack (3.0.20)
Using mime-types (1.21)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.2.19)
Using actionmailer (3.0.20)
Using arel (2.0.10)
Using activerecord (3.0.20)
Using activeresource (3.0.20)
Using bundler (1.0.22)
Installing json (1.7.7) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
c:/Ruby192/bin/ruby.exe extconf.rb
creating Makefile
make
'make' is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in c:/Ruby192/lib/ruby/gems/1.9.1/gems/json-1.7.7 for inspection.
Results logged to c:/Ruby192/lib/ruby/gems/1.9.1/gems/json-1.7.7/ext/json/ext/generator/gem_make.out
An error occured while installing json (1.7.7), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.7'` succeeds before bundling
次に、同様の問題を抱えている人のここのスレッドを指摘しました。Devkitなどのダウンロードが必要でした。指示に従ってみましたが、今ではすべてが壊れています。私は Ruby on Rails の操作に慣れていますが、インストールする必要はありませんでした (私の仕事用コンピューターには既にセットアップされていました)。Ruby on Rails の背後にある哲学全体がシンプルである場合、更新がこれほど難しいとは信じがたいです。何か不足しているか、適切なリソースを使用していない可能性があります。
私のマシンの現在のバージョンは ruby 1.9.2p0 (2010-08-18) [i386-mingw32] です。
$rails --version
Rails 3.0.3
ダウンロードした DevKit はhttp://rubyinstaller.org/downloadsの DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe です。
次に、このサイトでインストール手順を説明しようとしましたhttps://github.com/oneclick/rubyinstaller/wiki/Development-Kit
常に「make」エラーまたは「json」エラーに戻ります。
多分私は異なるバージョンが競合していますか??
アプリを実行するために WEBrick を起動しようとすると、次のエラーが表示されます。
$ rails s
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/rubygems_integrat
ion.rb:183:in `stub_source_index170': uninitialized constant Gem::SourceIndex (N
ameError)
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/ruby
gems_integration.rb:303:in `stub_rubygems'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/ruby
gems_integration.rb:246:in `replace_entrypoints'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runt
ime.rb:14:in `setup'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler.rb:1
10:in `setup'
from c:/rails/thumb/costrecovery/config/boot.rb:8:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from script/rails:5:in `<main>'
どんなアドバイスでも大歓迎です。