Capistrano fails when precompiling a Rails 3.2 app with Foundation 4.0

261 Views Asked by At

I am using Capistrano to deploy. My Rails 3.2.13 App uses Zurb Foundation 4.0. The relevant part of my Gemfile is

group :assets do
  gem 'sass-rails', "  ~> 3.2.3"
  gem 'coffee-rails', "~> 3.2.1"
  gem 'uglifier', '>=1.0.3'
  gem 'compass-rails'
  gem 'zurb-foundation'
end

My aplication.css.scss includes

/*
*= require_self
*= require foundation_and_overrides
*/

I am getting an error when the deployment script attempts to pre-compile:

   triggering after callbacks for `deploy:update_code'
  * 2013-07-07 23:58:09 executing `deploy:assets:precompile'
    triggering before callbacks for `deploy:assets:precompile'
  * 2013-07-07 23:58:09 executing `deploy:assets:update_asset_mtimes'
  * executing "[ -e /home/stvharman/App-Deployment-Dir/shared/assets/manifest* ] && cat /home/stvharman/App-Deployment-Dir/shared/assets/manifest* || echo"
    servers: ["myserver.com"]
    [myserver.com] executing command
    command finished in 588ms
 ** Updating mtimes for ~124 assets...
    servers: ["myserver.com"]
 ** scp upload # -> /home/stvharman/App-Deployment-Dir/TOUCH_ASSETS
    [myserver.com] /home/stvharman/App-Deployment-Dir/TOUCH_ASSETS
  * scp upload complete
  * executing "cat /home/stvharman/App-Deployment-Dir/TOUCH_ASSETS | while read asset; do touch -c -- \"$asset\"; done && rm -f -- /home/stvharman/App-Deployment-Dir/TOUCH_ASSETS"                                                                                                                                                             
    servers: ["myserver.com"]
    [myserver.com] executing command
    command finished in 950ms
  * executing "cd -- /home/stvharman/App-Deployment-Dir/releases/20130708035806 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile"
    servers: ["myserver.com"]
    [myserver.com] executing command
*** [err :: myserver.com] rake aborted!
*** [err :: myserver.com] couldn't find file 'foundation_and_overrides'
*** [err :: myserver.com] (in /home/stvharman/App-Deployment-Dir/releases/20130708035806/app/assets/stylesheets/application.css.scss:3)
*** [err :: myserver.com] /home/stvharman/App-Deployment-Dir/shared/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:102:in `resolve'
*** [err :: myserver.com] /home/stvharman/App-Deployment-Dir/shared/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:142:in `require_asset'
*** [err :: myserver.com] /home/stvharman/App-Deployment-Dir/shared/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/directive_processor.rb:215:in `process_req

Any help would be greatly appreciated. thanks in advance.

Steve

1

There are 1 best solutions below

0
On

I think that in case of usind the gem zurb-foundation you should issue rails g foundation:install command, which handles stylesheets inclusion. You do not need to include anything in your manifest file application.css. You should include foundation in the other manifest file - application.js like this:

//= require jquery
//= require jquery_ujs
//= require foundation
//= require_tree .

$(function(){ $(document).foundation(); });