簡體   English   中英

嘗試安裝運行twitter Bootstrap gem所需的gem-運行包時出錯

[英]Trying to install gems needed to run the twitter Bootstrap gem - getting error while running bundle

我有一個常規的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.

我究竟做錯了什么? 謝謝

這是Mac上的常見問題(對我來說確實如此)。 嘗試更新openssl:

brew update
brew install openssl

有時更新符號鏈接和證書也很有用:

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

如果這沒有幫助,並且您正在使用RVM,請嘗試更新rvm的證書:

rvm osx-ssl-certs update all

希望這可以幫助!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM