' D+ }4 b. y) w% k+ f- K9 O安装完成后运行:. n" }& w3 |# f& D
+ D. ?* T! k9 {; O0 Y 8 W. L; c# F" C* W) N ! I4 r; D/ z. M4 }7 k3 qbundle -v 0 ^, q0 a8 Y. ] , Y; j7 {1 F9 {% [+ E, _1 r6 h( P # [2 i/ |" m. J. C 5 W/ j1 s' M, u3 r# `# ^1 L" I应输出:% S/ D- l) t! ^/ h
- c, j- h2 @$ G3 \6 w4 R- `$ L+ g4 _5 C6 V7 o1 ^" w, w; f 到这里环境已经安装成功!安装依赖并启动: ], {5 ^) G i1 a, Y6 t5 ]
; m4 f1 ?3 Q* G; `
, h* o' W% w# y s' f* Y' M/ t' Q/ d
cd /home/root/dldl-gm && sh restart-alpha.sh " G( w& A3 L! H+ z& w / k% X: s3 B" ?) |! D: |3 n8 r: g+ @0 y: S
& V# R( o. Z1 N# }8 C3 n; }8 |会报错如下: / i* W' e/ E/ ^' a 9 X+ V. _) n" S% N* V4 O8 k1 y8 E2 r% t# S+ [# l
" i& S, C) O& t
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this 7 ?5 T3 o# f5 z0 t; @2 f" T% I * N9 P/ J5 V8 T0 C8 }application for all non-root users on this machine.5 @ Q; T/ _% E$ n* R$ V9 x/ k' k
6 u- f# o; B3 ` y3 h# \8 uFetching source index from http://rubygems.org/ ; m+ u- c1 h I7 Z# G( \1 g9 x5 I4 J/ _2 r
9 w+ b2 c' a: ^+ Z4 W$ X$ P % m' ^: a' x& _; R) SRetrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from http://rubygems.org/ " U5 a) S! b# F, N* l: K6 o) h( l- _2 O7 R
Retrying fetcher due to error (3/4): Bundler::HTTPError Could not fetch specs from http://rubygems.org/# w! I* K6 }/ ?5 l* g, E
! L7 @: v: e. ?. ^" E: N& D" i& ]4 f; V+ W* h
, |9 A5 p8 s, B7 K5 N 解决方案一:全局配置 Bundler 使用 Ruby China 镜像(HTTPS)2 B0 A/ X) c2 }3 b2 \) v: }
: n& F# q; K# x* D R2 l5 l , X7 T) M" F- ?) E+ i) R% S ! t! Q) x( ?1 r0 a; Obundle config set --global mirror.http://rubygems.org https://gems.ruby-china.com* c5 s0 c. L- _6 _! Y' L/ U
! p. F7 N( ^8 r& c) x
bundle config set --global mirror.https://rubygems.org https://gems.ruby-china.com . s; Y! I9 e0 L# p5 t& p& c# L5 ]1 D! R- U$ ]: \
' N% L" O% c5 k0 X* _' l! D0 c7 V 9 C6 y* N9 R, z5 ?验证配置: * N/ n- X- s$ A7 \5 \& A . R5 {3 M: k6 N1 R; v/ `4 t' p: b6 H) n' G8 Z8 A, n h
- u* k$ ?" \ ]
bundle config list) d0 L! \- y2 [+ ]* l
3 e; V0 Y# p& L6 F1 m. R
$ K* y8 r( W b0 q+ B% K " t8 [% w; }; W( x应看到类似:9 G) _5 S' ^+ |& W9 ?+ {/ ?+ l
. y) G: k* a K0 I2 D$ {, p7 A
+ R7 r/ r% X fSettings are listed in order of priority. The top value will be used. - B$ |' A; ^- r' C; p7 T& o) b8 O0 i0 R% o5 [) \
mirror.http://rubygems.org ) b; b3 Y8 j: W) q4 W) ?( w3 U" ~* V: u; l" M
Set via BUNDLE_MIRROR__HTTP://RUBYGEMS__ORG: "https://gems.ruby-china.com" ! m8 u" G: C* c2 @% l2 I! `, I$ y% G8 e' E# K, f3 k( n7 e$ P
mirror.https://rubygems.org/ I& q# s1 F5 X0 s) L4 Y% S