0

我有一个常规的 Rails 4 应用程序,我试图为其合并 twitter 引导框架。

我的 gemfile 的相关部分如下所示:

  #Gems used only for assets and not required  in production environments by default
  group :assets do

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  gem "therubyracer", :require => 'v8'

  gem "less-rails", "~> 2.4.2"

  # Use SCSS for stylesheets
  gem 'sass-rails', '~> 4.0.0'

  # Use CoffeeScript for .js.coffee assets and views
  gem 'coffee-rails', '~> 4.0.0'

  # Use Uglifier as compressor for JavaScript assets
  gem 'uglifier', '>= 1.3.0'

  gem "twitter-bootstrap-rails", "~> 2.2.8"

  end

当我在终端上运行 bundle 命令时,出现此错误:

 > bundle
 Fetching gem metadata from https://rubygems.org/...........
 Fetching gem metadata from https://rubygems.org/..
 Resolving dependencies...
 Using rake (10.1.0)
 Using i18n (0.6.5)
 Using minitest (4.7.5)
 Using multi_json (1.8.0)
 Using atomic (1.1.14)
 Using thread_safe (0.1.3)
 Using tzinfo (0.3.37)
 Using activesupport (4.0.0)
 Using builder (3.1.4)
 Using erubis (2.7.0)
 Using rack (1.5.2)
 Using rack-test (0.6.2)
 Using actionpack (4.0.0)
 Using mime-types (1.25)
 Using polyglot (0.3.3)
 Using treetop (1.4.15)
 Using mail (2.5.4)
 Using actionmailer (4.0.0)
 Using activemodel (4.0.0)
 Using activerecord-deprecated_finders (1.0.3)
 Using arel (4.0.0)
 Using activerecord (4.0.0)
 Using annotate (2.5.0)
 Using bundler (1.3.5)
 Using coffee-script-source (1.6.3)
 Using execjs (2.0.2)
 Using coffee-script (2.2.0)
 Using thor (0.18.1)
 Using railties (4.0.0)
 Using coffee-rails (4.0.0)

 Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server 
 certificate B: certificate verify failed 
 (https://s3.amazonaws.com/production.s3.rubygems.org/gems/commonjs-0.2.7.gem)

 An error occurred while installing commonjs (0.2.7), and Bundler cannot continue.

 Make sure that `gem install commonjs -v '0.2.7'` succeeds before bundling.

我究竟做错了什么?谢谢

4

1 回答 1

0

这是 Mac 上的常见问题(对我来说完全是)。尝试更新openssl:

brew update
brew install openssl

有时更新符号链接和证书也很有用:

brew link openssl --force
brew install curl-ca-bundle

如果这没有帮助并且您正在使用 RVM,请尝试更新 rvm 的证书:

rvm osx-ssl-certs update all

希望这可以帮助!

于 2016-04-09T13:49:20.593 回答