Can't bootstrap, cause gem update bundler failed


(Borel Tung) #1

When running
./launcher bootstrap app ,
error occurs as
RuntimeError: cd /var/www/discourse && gem update bundler .
I find that my route is /var/discourse, not /var/www/discourse, is it matters? How to fix it?


(Borel Tung) #2

I find that when bootstrapping, it execute command ‘cd /var/www/discourse’ many times, but I do not have this route at all, as I make directory, which is ‘/var/discourse’, as the ‘INSTALL-cloud.md’ told me.


(Borel Tung) #3
FAILED
--------------------
RuntimeError: cd /var/www/discourse && gem update bundler failed with return #<Process::Status: pid 289 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"]}
cc034a14f0c31da727bb535b3872d0bee7cb976b248f980b1b16bbd692d32696
FAILED TO BOOTSTRAP

(Sam Saffron) #4

need more logs, that is not enough to tell what happened.


(Borel Tung) #5
I, [2015-05-25T09:49:52.905260 #42]  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, [2015-05-25T09:52:03.938675 #42]  INFO -- : Updating installed gems

I, [2015-05-25T09:52:03.940208 #42]  INFO -- : Terminating async processes
I, [2015-05-25T09:52:03.940420 #42]  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: 71
2015-05-25 09:52:03 UTC [71-2] LOG:  received fast shutdown request
2015-05-25 09:52:03 UTC [71-3] LOG:  aborting any active transactions
2015-05-25 09:52:03 UTC [78-2] LOG:  autovacuum launcher shutting down
I, [2015-05-25T09:52:03.947260 #42]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 194
194:signal-handler (1432547523) Received SIGTERM scheduling shutdown...
2015-05-25 09:52:03 UTC [75-1] LOG:  shutting down
2015-05-25 09:52:03 UTC [75-2] LOG:  database system is shut down
194:M 25 May 09:52:04.046 # User requested shutdown...
194:M 25 May 09:52:04.046 * Saving the final RDB snapshot before exiting.
194:M 25 May 09:52:04.058 * DB saved on disk
194:M 25 May 09:52:04.059 # Redis is now ready to exit, bye bye...


FAILED
--------------------
RuntimeError: cd /var/www/discourse && gem update bundler failed with return #<Process::Status: pid 294 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"]}
a56318a3f4e194bfdecc4dc175f139612dbf124c0eba14f77054c91d0eebb091
FAILED TO BOOTSTRAP

(Borel Tung) #6

Oh, I see. It is because gem cannot connect to https://api.rubygems.org/ . How can I change it to an available one?
I’ve globally change the gem’s resource to http://ruby.taobao.org/ . But this setting does not work in discourse.


(Borel Tung) #7

This do help me:
Replace rubygems.org with taobao mirror to resolve network error in China


(Konishi Lee) #9

thank you for give me the opinion