1

カピストラーノ経由でレールアプリをデプロイするためのこのガイドに従っています: https://github.com/capistrano/capistrano/wiki/2.x-From-The-Beginning

私は VPS として linode を使用しています。私はすべての初期設定とcap deploy:setup/update/deployすべての作業を行いました。Railsディレクトリでこのコマンドを実行すると: $ rake RAILS_ENV=production db:schema:load. 私は得るundefined method 'minutes' for 90:Fixnum。どういうわけかアクティブサポートがインストールされていないようですが、入力すると が表示されrails --versionますRails 3.2.11。どんな洞察も非常に役に立ちます!

これが私のdeploy.rbファイルです:

require 'bundler/capistrano'
require "capistrano-rbenv"
set :rbenv_ruby_version, "1.9.3-p392"

set :application, "uganda-coords"

# Deploy from your local Git repo by cloning and uploading a tarball
set :scm, :git
set :repository,  "git@github.com:benrudolph/myapp.git"
set :deploy_via, :copy
set :scm_passphrase, "mypassword"
set :branch, "master"
set :deploy_via, :remote_cache
set :rails_env,     "production"


set :user, :root
set :deploy_to, "/var/www/#{application}"
set :use_sudo, false
set :ssh_options, { :forward_agent => true }

role :web, "176.58.105.165"                          # Your HTTP server, Apache/etc
role :app, "176.58.105.165"                          # This may be the same as your `Web` server
role :db,  "176.58.105.165", :primary => true # This is where Rails migrations will run

namespace :deploy do
  task :start do ; end
  task :stop do ; end
  task :restart, :roles => :app, :except => { :no_release => true } do
   run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
  end
end
4

1 に答える 1

0

90.minutesこれは、私のapplication.rbファイルでの使用に関係していたことが判明しました。これが本番環境ではなく開発環境で機能する理由はまだわかりません。

于 2013-07-07T20:50:38.877 に答える