Capistrano for Rails 3.1
Asked Answered
A

1

7

I am using Rails 3.1 and Capistrano, I get

No such file or directory

errors for /public/images, /public/stylesheets, and public/javascripts

errors. Searching the Internet, I found a number of blog posts suggesting

set :normalize_asset_timestamps, false

which removed these problems. However, I am not sure if I am doing the right thing since precompile still fails and I am new to Rails 3.1.

rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile

still fails on the production server.

I set

load 'deploy/assets'
set :rake,      "bundle exec rake"

in deploy.rb but it doesn't help. Still cap deploy complains that it cannot find certain gems

Thanks in advance for any help.

Steve

Annadiana answered 14/10, 2011 at 23:39 Comment(1)
Any update on this Steve? I'm having similar issues.Haga
U
0

That does indeed fix the error for me. If you're using bundler and rvm make sure your settings are correct. More info can be found with a quick google of rvm capistrano or rvm bundler but my settings in deploy.rb are below:

For RVM my settings are:

# 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

My bundler settings are:

# Comment these two lines out if you aren't using bundler
set :bundle_roles, [:app]
require 'bundler/capistrano'
Unborn answered 23/11, 2011 at 17:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.