sass - gem install compass 使用淘宝 Ruby 安装失败,出现 404
PHPz
PHPz 2017-04-22 09:00:33
0
2
1010

最开始的错误信息在图中已经给出

图片很长,一直在重定向,最开始的一个依赖文件访问为 404 。

结尾的错误信息为:

在谷歌上已经找过是否有相似的问题,结果没有。
用的 Ruby 是 http://ruby.taobao.org/ 的保存的镜像,依然不行。
在没有用 淘宝Ruby 镜像之前,错误信息是(Gem::RemoteFetcher::FetchError)

新手刚开始搭建 Sass 预编译器和安装 Compass 框架,遇到这个问题,希望了解相关问题的人解答一下,谢谢。

问题描述更新:

今天没有出现问题了,不管我本机的 DNS 地址是什么都可以正常安装 compass。
最开始的出现的 404 错误可能是因为:

Q: 某些时候 gem install rails --pre (安装 preview 版本的 Gem)无法正确安装?

A: 由于淘宝镜像这边没有实现 /api 下面的协议,而安装 pre 版本需要这些东西检查依赖,所以如果你需要这类安装需求的时候,请临时切换回官方的 RubyGems 源。

我安装的不是 preview 版本的 Gem ,但是传递 -V 参数后显示的信息表示安装 compass 也先访问了这个依赖,所以出现了 404 错误,但是并不会影响 compass 的安装。

问题的原因还是不知道,但是今天没有再出现昨天那样的一直重定向的错误了。

PHPz
PHPz

学习是最好的投资!

reply all (2)
小葫芦

Sorry, I rarely use Taobao mirrors so I don’t know what happened. The administrator of this mirror is in the ruby China community, you can ask. As a programmer, it is very important to surf the Internet scientifically.

Also, if you start learning sass now, I advise you not to learn compass. This project is no longer going forward because having a library as large and comprehensive as compass has proven to be a wrong design choice over the years.

So you don’t have to use ruby. For example, you can use node-sass, which is faster than ruby sass (it supports slightly less sass functions, but it does not hinder normal development and will be continuously upgraded)

For the supported tools, you can learn bourbon, neat, susy, breakpoint... etc. Don't learn big frameworks, learn components, and learn to implement some common patterns by yourself. This is the right way.

    刘奇

    You should make sure you have only one ruby source. When you remove the official website source, you should pay attention to whether there is a/, 比如你用gem sources --remove https://rubygems.org/时是不能移除https://rubygems.org这个源的,只能移除https://rubygems.org/这个源,我之前使用openSUSE时是这样的情况。
    你也可以尝试使用中科大的rubysource at the end of the URL. Modify the mirror source in Linux to speed up downloading (pip-RubyGems-NPM-Docker)

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!