[英]Rails ActiveSupport not loaded when deploying via Capistrano
I'm following this guide for deploying a rails app via capistrano: https://github.com/capistrano/capistrano/wiki/2.x-From-The-Beginning 我正在遵循通过capistrano部署Rails应用程序的指南: https : //github.com/capistrano/capistrano/wiki/2.x-From-The-Beginning
I'm using linode as my VPS. 我正在使用linode作为我的VPS。 I've done all the initial setup and cap deploy:setup/update/deploy
all work. 我已经完成了所有的初始设置和cap deploy:setup/update/deploy
所有工作。 When I go to execute this command in my rails directory: $ rake RAILS_ENV=production db:schema:load
. 当我在rails目录中执行以下命令时: $ rake RAILS_ENV=production db:schema:load
。 I get undefined method 'minutes' for 90:Fixnum
. 我得到undefined method 'minutes' for 90:Fixnum
。 It seems that activesupport is somehow not installed, yet when I type rails --version
, I get Rails 3.2.11
. 似乎没有安装activesupport,但是当我输入rails --version
,我得到了Rails 3.2.11
。 Any insight would be extremely helpful! 任何见解都将非常有帮助!
Here's my deploy.rb
file: 这是我的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
Turns out this had to do with using 90.minutes
in my application.rb
file. 原来,这与在我的application.rb
文件中使用90.minutes
有关。 I still don't know why this works on dev and not production. 我仍然不知道为什么这适用于开发人员而不是生产人员。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.