views:

225

answers:

1

I was able to successfully do a cap deploy:setup and cold

Now I went back to send a change to the server. I got all of my files into github fine, my cap deploy went fine, it compled without error, however I get the following screen (passenger error message):

Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.

    Error message:
        Permission denied - /var/www/dailytrailer.net/releases/20100205194321/tmp/attachment_fu
    Exception class:
        Errno::EACCES
    Application root:
        /var/www/dailytrailer.net/current 
    Backtrace:
        #   File    Line    Location
        0   /usr/lib/ruby/1.8/fileutils.rb  243     in `mkdir'
        1   /usr/lib/ruby/1.8/fileutils.rb  243     in `fu_mkdir'
        2   /usr/lib/ruby/1.8/fileutils.rb  217     in `mkdir_p'
        3   /usr/lib/ruby/1.8/fileutils.rb  215     in `reverse_each'
        4   /usr/lib/ruby/1.8/fileutils.rb  215     in `mkdir_p'
        5   /usr/lib/ruby/1.8/fileutils.rb  201     in `each'
        6   /usr/lib/ruby/1.8/fileutils.rb  201     in `mkdir_p'
        7   /var/www/dailytrailer.net/releases/20100205194321/vendor/plugins/attachment_fu/init.rb  14  in `evaluate_init_rb'
        8   /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb     158     in `evaluate_init_rb'
        9   /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/reporting.rb     11  in `silence_warnings'
        10  /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb     154     in `evaluate_init_rb'
        11  /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb     48  in `load'
        12  /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb  38  in `load_plugins'
        13  /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb  37  in `each'
        14  /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb  37  in `load_plugins'
        15  /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb  369     in `load_plugins'
        16  /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb  165     in `process'
        17  /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb  113     in `send'
        18  /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb  113     in `run'
        19  /var/www/dailytrailer.net/releases/20100205194321/config/environment.rb     13  
        20  /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb     31  in `gem_original_require'
        21  /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb     31  in `require'
        22  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/railz/application_spawner.rb  299     in `preload_application'
        23  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/railz/application_spawner.rb  248     in `initialize_server'
        24  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/utils.rb  255     in `report_app_init_status'
        25  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/railz/application_spawner.rb  233     in `initialize_server'
        26  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/abstract_server.rb    194     in `start_synchronously'
        27  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/abstract_server.rb    163     in `start'
        28  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/railz/application_spawner.rb  209     in `start'
        29  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/spawn_manager.rb  262     in `spawn_rails_application'
        30  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/abstract_server_collection.rb     126     in `lookup_or_add'
        31  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/spawn_manager.rb  256     in `spawn_rails_application'
        32  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/abstract_server_collection.rb     80  in `synchronize'
        33  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/abstract_server_collection.rb     79  in `synchronize'
        34  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/spawn_manager.rb  255     in `spawn_rails_application'
        35  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/spawn_manager.rb  154     in `spawn_application'
        36  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/spawn_manager.rb  287     in `handle_spawn_application'
        37  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/abstract_server.rb    352     in `__send__'
        38  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/abstract_server.rb    352     in `main_loop'
        39  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/phusion_passenger/abstract_server.rb    196     in `start_synchronously'
        40  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/bin/passenger-spawn-server  61  

I assume this is a permissions issue, I tried to give the user permission to the entire application directory, etc but nothing seems to work.

Any ideas?

Thank you!

+2  A: 

It seems to me that it's attachment_fu that's causing the error. Line 14 of attachment_fu's init.rb:

FileUtils.mkdir_p Technoweenie::AttachmentFu.tempfile_path

Make sure this that directory is writable by the plugin's unix user and you should be golden.

mjaz
Which directory would this be... in the current/temp ?
Trevor Nederlof
I got it thanks!
Trevor Nederlof
You're very welcome!
mjaz