MoonshineとCapistranoを使用して新しいサーバーを設定する際に問題があります。かなりよく始めるように思わUbuntuのパッケージの束をインストールし、REEをコンパイルし、いくつかの宝石をインストールされますが、それはこの出力とSFTP経由でファイルをアップロードするために失敗します。そのエラーをグーグルで配布時にMoonshine/CapistranoがSFTPに問題があるのはなぜですか?
* executing `moonshine:setup_directories'
* executing "mkdir /tmp/moonshine"
servers: ["myserver.tld"]
[myserver.tld] executing command
command finished
servers: ["myserver.tld"]
** sftp upload /Users/arussell/Sites/mysite/config/moonshine/production.yml -> /tmp/moonshine/production.yml
/Users/arussell/.rvm/gems/ree-1.8.7-2011.03/gems/capistrano-2.5.19/lib/capistrano/transfer.rb:196:in `normalize': undefined method `pos' for #<Pathname:0x10f3a6988> (NoMethodError)
from /Users/arussell/.rvm/gems/ree-1.8.7-2011.03/gems/capistrano-2.5.19/lib/capistrano/transfer.rb:104:in `prepare_transfers'
は本当にないです私が理解できるのは、capistrano/transfer.rbが196行目のPathNameオブジェクト以外のものを期待しているということですが、それが何を期待しているのか分からず、なぜPathNameオブジェクトが与えられているのかわかりません。
編集:ここには私deploy.rbです:
set :stages, %w(staging production dev)
set :default_stage, "staging"
require 'capistrano/ext/multistage' rescue "YOU NEED TO INSTALL THE capistrano-ext GEM"
require 'fileutils'
if ENV['branch']
set :branch, ENV['branch']
end
set :deploy_via, :remote_cache
before "deploy:restart", "deploy:delete_cache"
namespace(:deploy) do
desc "delete cache"
task :delete_cache do
run "rm -rf /usr/local/shared/cache/"
end
task :null, :roles => :app do
run "date"
end
end
require './config/boot'
...と私のデプロイ/ production.rb:
server "myserver.tld", :app, :web, :db, :primary => true
set :rails_env, 'production'
編集2:私はSFTPの代わりにSCPを使用しようとしましたが、それはうまくいきませんでした。
upload "local", "remote", :via => :scp
download "remote", "local", :via => :scp
をして展開しようとしたときに、代わりにこのエラーを得た:私は私のデプロイ/ production.rbにこれを追加
upload via scp failed on myserver.tld: SCP did not finish successfully() (SCP did not finish successfully())
Capistranoを2.9にアップデートしても、いいキャッチです。 0は役に立ちませんでした:私はまだ同じエラーが表示されます。 config/deploy.rbとconfig/deploy/production.rbのサニタイズ版を追加する質問を編集しました。 –