阿里云安装ruby 报错

I, [2014-10-29T01:48:48.964807 #44]  INFO -- : > cd /var/www/discourse && gem update bundler
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ETIMEDOUT: Connection timed out - connect(2) (https://api.rubygems.org/specs.4.8.gz)
I, [2014-10-29T01:50:58.120568 #44]  INFO -- : Updating installed gems

I, [2014-10-29T01:50:58.121377 #44]  INFO -- : Terminating async processes
I, [2014-10-29T01:50:58.121515 #44]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.3/bin/postmaster -D /etc/postgresql/9.3/main pid: 112
I, [2014-10-29T01:50:58.121937 #44]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 225
2014-10-29 01:50:58 UTC LOG:  received fast shutdown request
2014-10-29 01:50:58 UTC LOG:  aborting any active transactions
2014-10-29 01:50:58 UTC LOG:  autovacuum launcher shutting down
2014-10-29 01:50:58 UTC LOG:  shutting down
[225 | signal handler] (1414547458) Received SIGTERM scheduling shutdown...
[225] 29 Oct 01:50:58.151 # User requested shutdown...
[225] 29 Oct 01:50:58.151 * Saving the final RDB snapshot before exiting.
[225] 29 Oct 01:50:58.165 * DB saved on disk
[225] 29 Oct 01:50:58.166 # Redis is now ready to exit, bye bye...
2014-10-29 01:50:58 UTC LOG:  database system is shut down


FAILED
--------------------
RuntimeError: cd /var/www/discourse && gem update bundler failed with return #<Process::Status: pid 317 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"web", "cmd"=>["gem update bundler", "chown -R discourse $home", "su discourse -c 'bundle config mirror.https://rubygems.org https://ruby.taobao.org/'", "su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
e87a5afccc21d8910c3d1c0753d16104e8a3ab5fb464a2558db0f31ab0212ba9
FAILED TO BOOTSTRAP

已经在 web.template.yml 增加taobao的ruby 源。

被墙的问题。多尝试几次就可以了。别无他法

1赞

按此添加模板后应该可以解决问题了。

1赞

话说这个配置我有点在意, mirror 后面是 . 而不是空格?

bundle config mirror.https://rubygems.org https://ruby.taobao.org/

.

用模板就好。