Ich verwende ror 3.1 rc4, irgendwie, wenn ich in einen Produktionsserver bereitstellen, die Verzeichnisse für Bilder, Stylesheets und Javascript werden nicht gefunden, und Bereitstellung schlägt fehl. Ich habe den notwendigen Code in deploy.rb
namespace :deploy do
task :start do ; end
task :stop do ; end
desc "Restarting mod_rails with restart.txt"
task :restart, :roles => :app, :except => { :no_release => true } do
run "touch #{current_path}/tmp/restart.txt"
end
task :precompile do
run "cd #{release_path}; RAILS_ENV=production rake assets:precompile"
end
end
after 'deploy:update_code', 'deploy:precompile'
Und hier ist die Fehlermeldung, die ich erhalte
executing "find /var/www/nattyvelo/releases/20110624033801/public/images /var/www/nattyvelo/releases/20110624033801/public/stylesheets /var/www/nattyvelo/releases/20110624033801/public/javascripts -exec touch -t 201106240338.03 {} ';'; true"
servers: ["66.228.39.243"]
[66.228.39.243] executing command
** [out :: 66.228.39.243] find: `/var/www/nattyvelo/releases/20110624033801/public/images'
** [out :: 66.228.39.243] : No such file or directory
** [out :: 66.228.39.243] find: `/var/www/nattyvelo/releases/20110624033801/public/stylesheets'
** [out :: 66.228.39.243] : No such file or directory
** [out :: 66.228.39.243] find: `/var/www/nattyvelo/releases/20110624033801/public/javascripts'
** [out :: 66.228.39.243] : No such file or directory
command finished in 705ms
triggering after callbacks for `deploy:update_code'
* executing `bundle:install'
* executing "ls -x /var/www/nattyvelo/releases"
servers: ["66.228.39.243"]
[66.228.39.243] executing command
command finished in 595ms
* executing "cd /var/www/nattyvelo/releases/20110624033801 && bundle install --gemfile /var/www/nattyvelo/releases/20110624033801/Gemfile --path /var/www/nattyvelo/shared/bundle --deployment --quiet --without development test"
servers: ["66.228.39.243"]
[66.228.39.243] executing command
** [out :: 66.228.39.243] bash: bundle: command not found
command finished in 604ms
*** [deploy:update_code] rolling back
* executing "rm -rf /var/www/nattyvelo/releases/20110624033801; true"