0

RailsでRubyの新しいアプリケーションを作成したい場合、ターミナルに「rails new depot」と入力すると、次のようなエラーメッセージが表示されます。

"An error occurred while installing multi_json (1.5.1), and Bundler cannot continue.
Make sure that `gem install multi_json -v '1.5.1'` succeeds before bundling."

完全な出力は次のとおりです。

rails new depot
  create
  create  README.rdoc
  create  Rakefile
  create  config.ru
  create  .gitignore
  create  Gemfile
  create  app
  create  app/assets/images/rails.png
  create  app/assets/javascripts/application.js
  create  app/assets/stylesheets/application.css
  create  app/controllers/application_controller.rb
  create  app/helpers/application_helper.rb
  create  app/views/layouts/application.html.erb
  create  app/mailers/.gitkeep
  create  app/models/.gitkeep
  create  config
  create  config/routes.rb
  create  config/application.rb
  create  config/environment.rb
  create  config/environments
  create  config/environments/development.rb
  create  config/environments/production.rb
  create  config/environments/test.rb
  create  config/initializers
  create  config/initializers/backtrace_silencers.rb
  create  config/initializers/inflections.rb
  create  config/initializers/mime_types.rb
  create  config/initializers/secret_token.rb
  create  config/initializers/session_store.rb
  create  config/initializers/wrap_parameters.rb
  create  config/locales
  create  config/locales/en.yml
  create  config/boot.rb
  create  config/database.yml
  create  db
  create  db/seeds.rb
  create  doc
  create  doc/README_FOR_APP
  create  lib
  create  lib/tasks
  create  lib/tasks/.gitkeep
  create  lib/assets
  create  lib/assets/.gitkeep
  create  log
  create  log/.gitkeep
  create  public
  create  public/404.html
  create  public/422.html
  create  public/500.html
  create  public/favicon.ico
  create  public/index.html
  create  public/robots.txt
  create  script
  create  script/rails
  create  test/fixtures
  create  test/fixtures/.gitkeep
  create  test/functional
  create  test/functional/.gitkeep
  create  test/integration
  create  test/integration/.gitkeep
  create  test/unit
  create  test/unit/.gitkeep
  create  test/performance/browsing_test.rb
  create  test/test_helper.rb
  create  tmp/cache
  create  tmp/cache/assets
  create  vendor/assets/javascripts
  create  vendor/assets/javascripts/.gitkeep
  create  vendor/assets/stylesheets
  create  vendor/assets/stylesheets/.gitkeep
  create  vendor/plugins
  create  vendor/plugins/.gitkeep
     run  bundle install
    Fetching gem metadata from https://rubygems.org/...........
    Fetching gem metadata from https://rubygems.org/..
    Using rake (10.0.3)
    Using i18n (0.6.1)

    Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello     

    A:  unknown protocol (https://s3.amazonaws.com/production.s3.rubygems.org/gems/multi_json-1.5.1.gem) 
    An error occurred while installing multi_json (1.5.1), and Bundler cannot continue.
    Make sure that `gem install multi_json -v '1.5.1'` succeeds before bundling.

この問題にどのように対処しますか?

4

1 に答える 1

0

[編集] 調査の結果、最新の openssl 証明書を持っていないことが問題であることに気付きました。古い Ruby 環境では問題ありませんでしたが、私の RVM 2.0 以降のインストールではそうではありませんでした。

証明書を更新するには、次の手順に従ってください: http://railsapps.github.io/openssl-certificate-verify-failed.html

詳細については (警告、「私も」というコメントがたくさんあります)、この RubyGems の問題を確認してください: https://github.com/rubygems/rubygems/issues/515

于 2013-10-15T03:33:50.120 に答える