【问题标题】:Install Rubygems without internet connection在没有互联网连接的情况下安装 Rubygems
【发布时间】:2015-05-20 12:02:13
【问题描述】:

有没有办法离线安装compasscompass_radix

我在尝试命令行安装时得到以下信息:

sudo gem install compass
WARNING:  Error fetching data: bad response Service Unavailable 503 (http://rubygems.org/latest_specs.4.8.gz)
WARNING:  Error fetching data: bad response Service Unavailable 503 (http://rubygems.org/specs.4.8.gz)
    Compass is charityware. If you love it, please donate on our behalf at http://umdf.org/compass Thanks!
Successfully installed compass-1.0.3
1 gem installed
Installing ri documentation for compass-1.0.3...
Installing RDoc documentation for compass-1.0.3...

sudo gem install compass_radix
WARNING:  Error fetching data: bad response Service Unavailable 503 (http://rubygems.org/latest_specs.4.8.gz)
ERROR:  Could not find a valid gem 'compass_radix' (>= 0) in any repository
ERROR:  Possible alternatives: compass_radix

【问题讨论】:

标签: ruby linux installation compass-sass offline


【解决方案1】:

如果是防火墙问题,也可以直接通过浏览器下载gems:

请注意,您还需要这些 gem 的运行时依赖项。

另一种选择是使用gem fetch从可以访问互联网的计算机上下载它们

gem fetch compass
gem fetch compass_radix

如果是第二种情况,请将这些文件放在 USB 密钥上,然后将它们带到另一台没有互联网的计算机上,然后使用格式安装

cd <directory where gemfiles are>
gem install ./compass-x.x.x.gem
gem install ./compass_radix-x.x.x.gem

在尝试 gem install &lt;gemfile&gt; 之前,您应该将所有 gem 存储在同一目录中(compass、compass_radix 和所有运行时依赖项)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-26
    相关资源
    最近更新 更多