# U: t- r% [9 _7 {3 s9 i ( v: I5 P! h6 K5 f4 ~Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this7 P# H9 O) t) m1 \
: v X" i5 Y3 l4 r& y) e3 g, V
application for all non-root users on this machine. 7 n* ~- X( ?1 t3 Q1 h" }; x% b& w3 o2 Y0 C
Fetching source index from http://rubygems.org/ 7 e2 K+ h9 w0 A0 e w" S" \* h2 _' `
[: n0 ^- {1 n0 Q & e6 W. ?) x; y: LRetrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from http://rubygems.org/ % n7 I+ B3 z1 O; \/ J! h/ D9 W# ], l
Retrying fetcher due to error (3/4): Bundler::HTTPError Could not fetch specs from http://rubygems.org/ , @/ j1 H; \0 i. \ & P8 M2 a$ t! {8 Y. _) u, V! z1 v( Z+ d( R; p) v
: X( h; D" p" v 解决方案一:全局配置 Bundler 使用 Ruby China 镜像(HTTPS) ' @5 N' U+ ~, ^7 D n9 b# o 2 B& b6 D) T: J. n " y8 H4 L7 {4 ]/ y! b$ g3 r % [7 C6 r$ [- g* Bbundle config set --global mirror.http://rubygems.org https://gems.ruby-china.com / u9 `7 o4 `' o% `# O, A, ^" B* H7 R. g0 |: K. d& m0 ^
bundle config set --global mirror.https://rubygems.org https://gems.ruby-china.com - j) r- F* A1 L' }+ h2 P6 X8 H) O4 k0 O) d) |+ r# w+ D
, ~ Q$ H! T) b+ m6 l. B6 Y, B$ z k2 i3 M7 a% L0 i0 J7 ]+ m
: { N8 N3 ^& Zbundle config list V/ H+ }+ [" A* b9 k1 U
7 S9 L2 E; t3 q( Z1 U0 W7 \# h9 c( r6 D4 f6 G5 g
7 e7 @) J/ ], t$ x y+ M应看到类似: & S+ O2 h2 { [! M: c+ Y0 w, x ( Z3 t; ?) b9 Y' N. `) x! _, q- f( c+ W+ T* w$ r$ \; Z
- @# w2 `7 _ z8 D* |" h3 y
Settings are listed in order of priority. The top value will be used. 8 h( |) s0 G! `; D3 V) _0 s- H: x5 a9 E2 k
mirror.http://rubygems.org ) E+ i4 |- ^, |- F8 u) o* T& p9 K; _8 j. O7 u
Set via BUNDLE_MIRROR__HTTP://RUBYGEMS__ORG: "https://gems.ruby-china.com" * }; t4 L, O. H. [4 i' G- i, l8 j' p5 \: X+ u" t d9 @! O
mirror.https://rubygems.org ( S+ ?6 i- W% v6 g4 Z- z 0 O' e& r9 r1 h+ ISet via BUNDLE_MIRROR__HTTPS://RUBYGEMS__ORG: "https://gems.ruby-china.com"+ A( S6 y- e. l' g& h1 U
1 `% X2 M+ }4 C) H0 ~0 E
" y( ]6 e& [# A6 J! q, r' o* o |, H, q/ m: q
打开:/home/root/dldl-gm/Gemfile和Gemfile.lock F2 v7 X$ a$ Q1 G+ s
/ q$ b4 B# F h$ f
/ v2 v# }1 a6 I
: b+ r. T. q9 U; E4 k% G6 H 7 r# |! I0 H: E' ~- d$ P6 d3 c& b/ z6 O" Y& F
1 j: J1 X, `9 m9 k$ t% n4 {, A' G& |8 `5 s; a
把文件里面的:http://rubygems.org/ 改为 https://gems.ruby-china.com/9 x$ M$ ]8 p1 N( E& z
| I- u6 }9 h' [( X$ r. n4 T! T4 s$ A" y
% T6 h; i# I: d& ?) T/ f重新安装依赖并启动:! O. P+ O6 B- z. {4 _" F
' p/ [! W: @* q( q& v f8 K6 ?5 F8 p% l2 ] , w4 G2 b/ A+ F$ e* pcd /home/root/dldl-gm && sh restart-alpha.sh" O# B( q* J. A, n" ~# H
& [3 S( S; v+ B) l0 h, H0 G V
) c/ O, D. t) A! V8 U9 ]
+ h0 ]7 `% F* [2 U3 n! |% W/ n应看到类似:- S* U6 M- m9 j! Z# W g9 V$ M# p
* a2 [, B. `& q$ q& f; n
: f- M1 U/ z; ]5 t- C Y( s$ m
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this, s# c0 y& c& H2 x: ]! u' k9 l
+ `2 T% J. r/ {3 e. I( iapplication for all non-root users on this machine.! P/ i% h* \6 G D1 |; w( G5 e7 ~" i
* G. Z- H1 I' CFetching gem metadata from https://gems.ruby-china.com/..........' K! l9 F2 N. b
, M0 h7 Q) F: M0 u. K' e
Fetching rake 12.3.1' r" j! ?' @$ H2 R c6 e1 o9 R
' z7 m% g2 D2 J# ~4 u& e' S
Installing rake 12.3.1 ' t0 y* F! l' P# b- ]- h3 s/ k/ j! x( p
Fetching concurrent-ruby 1.0.5 3 @# p5 L6 H( J/ H- h0 @. E* G ; j4 U4 i$ h. C' U5 @, ^2 ^. c $ G; W- u$ S# U& T' M# Q + L2 l: d* n4 ~) ^+ `# U$ S3 M恭喜您,这就是已经在正常安装依赖了! 9 f ?: j w- Z# |9 J