Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/61.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 如何安装autoprefixer rails(5.0.0.2)?_Ruby On Rails - Fatal编程技术网

Ruby on rails 如何安装autoprefixer rails(5.0.0.2)?

Ruby on rails 如何安装autoprefixer rails(5.0.0.2)?,ruby-on-rails,Ruby On Rails,我试图在我的RoR应用程序中运行rails服务器命令,但出现了一个错误,说我必须先运行bundle安装,然后才能运行rails服务器命令。因此,我运行了bundle安装命令,并遇到了另一个错误,即我必须安装autoprefixer rails(5.0.0.2)gem,然后再次运行bundle安装。试图弄清楚错误消息的真正含义有点让人困惑,所以如果有人能解释一下,那就太好了 以下是在我的命令行中返回的错误: $ bundle install DL is deprecated, please

我试图在我的RoR应用程序中运行rails服务器命令,但出现了一个错误,说我必须先运行bundle安装,然后才能运行rails服务器命令。因此,我运行了bundle安装命令,并遇到了另一个错误,即我必须安装autoprefixer rails(5.0.0.2)gem,然后再次运行bundle安装。试图弄清楚错误消息的真正含义有点让人困惑,所以如果有人能解释一下,那就太好了

以下是在我的命令行中返回的错误:

    $ bundle install
DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using rake 10.4.0
Using i18n 0.6.11
Using json 1.8.1
Using minitest 5.4.3
Using thread_safe 0.3.4
Using tzinfo 1.2.2
Using activesupport 4.1.8
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.8
Using rack 1.5.2
Using rack-test 0.6.2
Using actionpack 4.1.8
Using mime-types 2.4.3
Using mail 2.6.3
Using actionmailer 4.1.8
Using activemodel 4.1.8
Using arel 5.0.1.20140414130214
Using activerecord 4.1.8
Using execjs 2.2.2

Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read
server certificate B: certificate verify failed (https://rubygems.org/gems/autop
refixer-rails-5.0.0.2.gem)
An error occurred while installing autoprefixer-rails (5.0.0.2), and Bundler
cannot continue.
Make sure that `gem install autoprefixer-rails -v '5.0.0.2'` succeeds before
bundling.
$ gem install autoprefixer-rails -v '5.0.0.2'
ERROR:  Could not find a valid gem 'autoprefixer-rails' (= 5.0.0.2), here is why
:


        Unable to download data from https://rubygems.org/ - SSL_connect retur
    ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (
    https://api.rubygems.org/specs.4.8.gz)
在我按照建议运行了
gem安装autoprefixdrrails-v'5.0.0.2'
之后,gem出现了一个错误。以下是在我的命令行中返回的错误:

    $ bundle install
DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using rake 10.4.0
Using i18n 0.6.11
Using json 1.8.1
Using minitest 5.4.3
Using thread_safe 0.3.4
Using tzinfo 1.2.2
Using activesupport 4.1.8
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.8
Using rack 1.5.2
Using rack-test 0.6.2
Using actionpack 4.1.8
Using mime-types 2.4.3
Using mail 2.6.3
Using actionmailer 4.1.8
Using activemodel 4.1.8
Using arel 5.0.1.20140414130214
Using activerecord 4.1.8
Using execjs 2.2.2

Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read
server certificate B: certificate verify failed (https://rubygems.org/gems/autop
refixer-rails-5.0.0.2.gem)
An error occurred while installing autoprefixer-rails (5.0.0.2), and Bundler
cannot continue.
Make sure that `gem install autoprefixer-rails -v '5.0.0.2'` succeeds before
bundling.
$ gem install autoprefixer-rails -v '5.0.0.2'
ERROR:  Could not find a valid gem 'autoprefixer-rails' (= 5.0.0.2), here is why
:


        Unable to download data from https://rubygems.org/ - SSL_connect retur
    ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (
    https://api.rubygems.org/specs.4.8.gz)

这可能是gems依赖项的问题。 你可以简单地跑

gem install autoprefixer-rails -v '5.0.0.2'

要解决此问题。

临时解决方案:

在您的GEM文件中,从
https://rubygems.org
只需
http://rubygems.org
(删除http后面的“s”)

然后重新安装


一个可能更好的解决方案是运行
gem update--system
来解决问题。查看这篇文章,了解一些其他想法:

它看起来像是
SSL
证书问题,因此@lflores的另一个答案与这个问题相关