5

我正在尝试使用命令安装rails

宝石安装导轨

在我的 ubuntu 12.04 上。我还用用户名、密码和代理详细信息配置了我的 apt.conf 文件。然后这个命令的执行也给出了一个错误:

错误:执行 gem ... (Net::HTTPServerException)
407 “需要代理身份验证”

如果我跑

须藤宝石安装导轨

错误是:

错误:执行 gem 时 ... (Gem::DependencyError)
无法解析依赖项:treetop 需要 polyglot (>= 0)、polyglot (>= 0.3.1);链轮需要倾斜 (!= 1.3.0, ~> 1.1)

我的本地宝石清单如下:

* 本地宝石 *
actionmailer (4.0.1)
actionpack (4.0.1)
activemodel (4.0.1)
activerecord (4.0.1)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.1)
arel (4.0.1)
atomic ( 1.1.14)
bigdecimal (1.2.0)
builder (3.1.4)
bundler (1.3.5)
bundler-unload (1.0.2)
coffee-rails (4.0.1)
coffee-script (2.2.0)
coffee-script- source (1.6.3)
erubis (2.7.0)
execjs (2.0.2)
executable-hooks (1.2.6)
hike (1.2.3)
i18n (0.6.5)
io-console (0.4.2)
jbuilder (1.5. 2)
jquery-rails (3.0.4)
json (1.8.1, 1.7.7)
mail (2.5.4)
mime-types (1.25)
minitest (4.7.5, 4.3.2)
multi_json (1.8.2)
polyglot (0.3.3)
psych (2.0.0)
rack (1.5.2)
rack-test (0.6.2)
rails (4.0.1)
railties (4.0.1)
rake (10.1.0, 0.9.6)
rdoc (4.0.1, 4.0.0, 3.12.2)
rubygems-bundler (1.4.2)
rvm (1.11.3.8)
sass (3.2.12)
sass-rails (4.0.1)
sdoc (0.3.20)
sprockets (2.10.0)
sprockets-rails (2.0.1)
sqlite3 ( 1.3.8)
测试单元 (2.0.0.0)
雷神 (0.18.1)
线程安全 (0.1.3)
倾斜 (1.4.1)
树顶 (1.4.15)
turbolinks (1.3.0)
tzinfo (0.3.38)
uglifier (2.3.0)

我已经运行了“rvm requirements”并且我尝试过使用 SET HTTP_PROXY 但它也没有任何影响。我应该怎么办 ?

编辑:

我尝试使用

导出 http_proxy=http://${username}:${password}@${proxy}:${port}

然后运行 ​​gem install rails 并且它起作用了......

4

1 回答 1

1

超级用户和普通用户有不同的宝石列表。我认为超级用户没有多语言和倾斜。

尝试:

sudo gem install polyglot
sudo gem install tilt

请查看超级用户的 gem 列表。

sudo gem list
于 2015-01-18T05:41:24.147 回答