Deployment 轨道3.1的Capistrano

Deployment 轨道3.1的Capistrano,deployment,capistrano,bundler,assets,rails-3.1,Deployment,Capistrano,Bundler,Assets,Rails 3.1,我正在使用Rails 3.1和Capistrano,我明白了 没有这样的文件或目录 /public/images、/public/stylesheets和public/javascripts的错误 错误。在互联网上搜索,我发现了一些博客帖子 set :normalize_asset_timestamps, false 这消除了这些问题。然而,我不确定我是否在做 这是正确的,因为预编译仍然失败,我是Rails 3.1的新手 rake RAILS_ENV=production RAILS_GROU

我正在使用Rails 3.1和Capistrano,我明白了

没有这样的文件或目录

/public/images、/public/stylesheets和public/javascripts的错误

错误。在互联网上搜索,我发现了一些博客帖子

set :normalize_asset_timestamps, false
这消除了这些问题。然而,我不确定我是否在做 这是正确的,因为预编译仍然失败,我是Rails 3.1的新手

rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile
在生产服务器上仍然出现故障

我设定

load 'deploy/assets'
set :rake,      "bundle exec rake"
在deploy.rb中,但它没有帮助。但cap deploy仍抱怨无法找到某些宝石

提前感谢您的帮助


史蒂夫

这确实为我修正了错误。如果您使用bundler和rvm,请确保您的设置正确。通过快速谷歌rvm capistrano或rvm bundler可以找到更多信息,但我在deploy.rb中的设置如下:

对于RVM,我的设置为:

# Load RVM's capistrano plugin.
require "rvm/capistrano"
set :rvm_path, "$HOME/.rvm"
set :rvm_ruby_string, <Insert your RVM settings here>
set :rvm_type, :user  # Don't use system-wide RVM
# Comment these two lines out if you aren't using bundler
set :bundle_roles, [:app]
require 'bundler/capistrano'

史蒂夫,有什么最新消息吗?我也有类似的问题。