#3 楼 @zhangrentian 四处都找不到 redis 写法教学呢 是用哪个 gem?
不支援 4.0 以上?
我用 mina 跟 capistrano 都有 group,真是奇怪
我用 ssh doctor 显示一切正常
SSH agent forwarding report
---------------------------
1. [success] `repo_url` setting ok
2. [success] ssh private key file exists
3. [success] `ssh-agent` process seems to be running locally
4. [success] `ssh-agent` process recognized by `ssh-add` command
5. [success] ssh private keys added to `ssh-agent`
6. [success] application repository accessible from local machine
7. [success] all hosts using passwordless login
8. [success] `forward_agent` ok for all hosts
9. [success] ssh agent successfully forwarded to remote hosts
10. [success] application repository accessible from remote hosts
不知道那边出了问题。。。 DEBUG[abfcd0b2] Tasks: TOP => assets:precompile D, [2014-10-15T15:55:35.554321 #1667] DEBUG -- tcpsocket[3fd75d88fcb0]: received packet nr 1275 type 94 len 76 I, [2014-10-15T15:55:35.554378 #1667] INFO -- net.ssh.connection.session[3fd75c53a73c]: channel_data: 59 47b DEBUGabfcd0b2 D, [2014-10-15T15:55:35.603252 #1667] DEBUG -- tcpsocket[3fd75d88fcb0]: read 36 bytes D, [2014-10-15T15:55:35.603431 #1667] DEBUG -- tcpsocket[3fd75d88fcb0]: received packet nr 1276 type 96 len 12 I, [2014-10-15T15:55:35.603502 #1667] INFO -- net.ssh.connection.session[3fd75c53a73c]: channel_eof: 59 D, [2014-10-15T15:55:35.623093 #1667] DEBUG -- tcpsocket[3fd75d88fcb0]: read 104 bytes D, [2014-10-15T15:55:35.623296 #1667] DEBUG -- tcpsocket[3fd75d88fcb0]: received packet nr 1277 type 98 len 44 I, [2014-10-15T15:55:35.623383 #1667] INFO -- net.ssh.connection.session[3fd75c53a73c]: channel_request: 59 exit-status false cap aborted! SSHKit::Runner::ExecuteError: Exception while executing on host ...: rake exit status: 1 rake stdout: Nothing written rake stderr: Nothing written
解决了,感谢大家
谢谢,不过我的 ssh -T [email protected] 一直是没问题的,使用者也是正确显示。 而且在 deploy.rb 及 deploy/production.rb 各加入了 set :forward_agent, true config 也加入了 ForwardAgent yes 但是仍然显示 DEBUG[68165807] Finished in 126.481 seconds with exit status 128 (failed). D, [2014-10-09T11:02:36.608461 #16765] DEBUG -- tcpsocket[3fde3e2616bc]: received packet nr 71 type 95 len 140 I, [2014-10-09T11:02:36.608510 #16765] INFO -- net.ssh.connection.session[3fde3e17e1a0]: channel_extended_data: 7 1 109b DEBUG[68165807] ssh: connect to host bitbucket.org port 22: Connection timed out DEBUG[68165807] fatal: The remote end hung up unexpectedly DEBUG[68165807] Finished in 126.481 seconds with exit status 128 (failed).
即便我加入了 scm_user 及 scm_password 也依然失败
#14 楼 @flowerwrong Running /usr/bin/env git ls-remote -h [email protected]:yuyetigertiger/tigertiger.git on xx.xx.xx.xx
接下来就是 status 128 错误了,我想是找 key 的路径依然错误,但是我有写 config 了
#14 楼 @flowerwrong 貌似 production.rb 里面的 ssh_option 是预设给 repo_url 用的,那哪里的是给 server 用的呢?
#14 楼 @flowerwrong 不過我 touch config 以後,也重启了 ssh,但是依然跑同样的错误,不过我是在本机加入的。
#14 楼 @flowerwrong 谢谢。因为我原来没用过 config,后来才知道。
我想应该是因为我的 ssh option 里面,分不清哪个 key 是给 bitbucket,哪个 key 是给 server 用的,但是我现在还没搞清楚如何个别设定
GEM remote: http://rubygems.org/ specs: actionmailer (4.0.2) actionpack (= 4.0.2) mail (~> 2.5.4) actionpack (4.0.2) activesupport (= 4.0.2) builder (~> 3.1.0) erubis (~> 2.7.0) rack (~> 1.5.2) rack-test (~> 0.6.2) activemodel (4.0.2) activesupport (= 4.0.2) builder (~> 3.1.0) activerecord (4.0.2) activemodel (= 4.0.2) activerecord-deprecated_finders (~> 1.0.2) activesupport (= 4.0.2) arel (~> 4.0.0) activerecord-deprecated_finders (1.0.3) activerecord-session_store (0.1.0) actionpack (>= 4.0.0, < 5) activerecord (>= 4.0.0, < 5) railties (>= 4.0.0, < 5) activesupport (4.0.2) i18n (~> 0.6, >= 0.6.4) minitest (~> 4.2) multi_json (~> 1.3) thread_safe (~> 0.1) tzinfo (~> 0.3.37) annotate (2.5.0) rake arel (4.0.2) aws-sdk (1.52.0) aws-sdk-v1 (= 1.52.0) aws-sdk-v1 (1.52.0) json (~> 1.4) nokogiri (>= 1.4.4) bcrypt-ruby (3.1.2) bootstrap-sass (3.1.1.1) sass (~> 3.2) builder (3.1.4) capistrano (3.2.1) i18n rake (>= 10.0.0) sshkit (~> 1.3) capistrano-bundler (1.1.3) capistrano (~> 3.1) sshkit (~> 1.2) capistrano-ext (1.2.1) capistrano (>= 1.0.0) capistrano-rails (1.1.2) capistrano (~> 3.1) capistrano-bundler (~> 1.1) capistrano-rvm (0.1.1) capistrano (~> 3.0) sshkit (~> 1.2) ckeditor (4.0.11) mime-types orm_adapter (~> 0.5.0) climate_control (0.0.3) activesupport (>= 3.0) cocaine (0.5.4) climate_control (>= 0.0.3, < 1.0) coffee-rails (4.0.1) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.0) coffee-script (2.2.0) coffee-script-source execjs coffee-script-source (1.7.0) colorize (0.7.3) erubis (2.7.0) execjs (2.2.1) hike (1.2.3) i18n (0.6.9) jbuilder (1.5.3) activesupport (>= 3.0.0) multi_json (>= 1.2.0) jquery-fileupload-rails (0.4.1) actionpack (>= 3.1) railties (>= 3.1) jquery-rails (3.1.1) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) json (1.8.1) kaminari (0.15.1) actionpack (>= 3.0.0) activesupport (>= 3.0.0) mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.25.1) mini_portile (0.6.0) minitest (4.7.5) multi_json (1.10.1) mysql2 (0.3.16) net-scp (1.2.1) net-ssh (>= 2.6.5) net-ssh (2.9.1) newrelic_rpm (3.9.4.245) nokogiri (1.6.2.1) mini_portile (= 0.6.0) orm_adapter (0.5.0) paperclip (4.1.1) activemodel (>= 3.0.0) activesupport (>= 3.0.0) cocaine (~> 0.5.3) mime-types polyglot (0.3.5) pr_geohash (1.0.0) protected_attributes (1.0.7) activemodel (>= 4.0.1, < 5.0) rack (1.5.2) rack-test (0.6.2) rack (>= 1.0) rails (4.0.2) actionmailer (= 4.0.2) actionpack (= 4.0.2) activerecord (= 4.0.2) activesupport (= 4.0.2) bundler (>= 1.3.0, < 2.0) railties (= 4.0.2) sprockets-rails (~> 2.0.0) railties (4.0.2) actionpack (= 4.0.2) activesupport (= 4.0.2) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (10.3.2) rdoc (4.1.1) json (~> 1.4) rsolr (1.0.10) builder (>= 2.1.2) s3_direct_upload (0.1.7) coffee-rails (>= 3.1) jquery-fileupload-rails (~> 0.4.1) rails (>= 3.1) sass-rails (>= 3.1) sass (3.2.19) sass-rails (4.0.3) railties (>= 4.0.0, < 5.0) sass (~> 3.2.0) sprockets (~> 2.8, <= 2.11.0) sprockets-rails (~> 2.0) sdoc (0.4.0) json (~> 1.8) rdoc (~> 4.0, < 5.0) simple_captcha2 (0.2.2) rails (>= 3.1, < 4.1) sprockets (2.11.0) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) sprockets-rails (2.0.1) actionpack (>= 3.0) activesupport (>= 3.0) sprockets (~> 2.8) sqlite3 (1.3.9) sshkit (1.5.1) colorize net-scp (>= 1.1.2) net-ssh (>= 2.8.0) sunspot (2.1.1) pr_geohash (~> 1.0) rsolr (~> 1.0.7) sunspot_rails (2.1.1) nokogiri rails (>= 3) sunspot (= 2.1.1) sunspot_solr (2.1.1) thor (0.19.1) thread_safe (0.3.4) tilt (1.4.1) treetop (1.4.15) polyglot polyglot (>= 0.3.1) turbolinks (2.2.2) coffee-rails tzinfo (0.3.39) uglifier (2.5.1) execjs (>= 0.3.0) json (>= 1.8.0)
PLATFORMS ruby
DEPENDENCIES activerecord-session_store annotate (= 2.5.0) aws-sdk bcrypt-ruby (= 3.1.2) bootstrap-sass (~> 3.1.1) capistrano (~> 3.2.1) capistrano-ext (~> 1.2.1) capistrano-rails (~> 1.1.2) capistrano-rvm (~> 0.1.1) ckeditor (= 4.0.11) coffee-rails (~> 4.0.0) jbuilder (~> 1.2) jquery-rails kaminari (= 0.15.1) mysql2 newrelic_rpm paperclip (= 4.1.1) protected_attributes (= 1.0.7) rails (= 4.0.2) s3_direct_upload sass-rails (~> 4.0.0) sdoc simple_captcha2 sqlite3 sunspot_rails (= 2.1.1) sunspot_solr (= 2.1.1) turbolinks uglifier (>= 1.3.0)
補充一下 log
Exception while executing on host XX.XX.XX.XX:exit
.rvm/gems/ruby-2.0.0-p451/gems/capistrano-3.2.1/lib/capistrano/tasks/git.rake:28:in exit'.rvm/gems/ruby-2.0.0-p451/gems/capistrano-3.2.1/lib/capistrano/tasks/git.rake:28:in
block (4 levels) in '
.rvm/gems/ruby-2.0.0-p451/gems/sshkit-1.5.1/lib/sshkit/backends/abstract.rb:85:in `with'
改出现这个了 DEBUG[1bcd15fc] Finished in 0.110 seconds with exit status 129 (failed).
我是带 key 使用 cap 的,没想到还是需要 prompt 密码,真是奇怪
我在想是不是 bitbucket 那出錯了
ssh 是成功的,所以不知道哪個階段出錯了
主要是因為 schema_migrations 這個 table 沒有更新到,不知道為啥,所以很弔詭
似乎是 merge 後就容易出現這玩意兒,頭像還要找找
好似最多只能这么办 没法子只在例如 schema.rb 内添加几行代码 就自动产生 conflict
没解释 open('myfile.out', 'w') { |f| f.puts 这段是怎么运行的,是 for each 还是啥子呢?
状况大概是这样 host 我设定了 application.js 及 css 也都 get 到了 但是我有/app/assets/javascript/top.js 及/app/assets/stylesheet/rock.css 两个档案 但是用下面的程式码不改 host 可以运行 改了 host 就不能运行了
<%= stylesheet_link_tag "rock", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "top", "data-turbolinks-track" => true %>