Welcome Guest | Login

Template Error only in production server

Hey, I'm receiving this template error, but only when my app is uploaded

ActionView::TemplateError (exit) on line #15 of receipt/_newreceipt.html.erb:
12:    <p><%= text_field_tag 'tags', params[:tags] %></p>
13:    
14:    <div id='box'>
15:     <%= render :partial => 'upload', :object => @receipt.upload %>
16:    </div>
17:    
18:    <div id='newitems'>

   /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.4/lib/inline.rb:70:in `exit'
   /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.4/lib/inline.rb:70:in `rootdir'
   /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.4/lib/inline.rb:84:in `directory'
   /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.4/lib/inline.rb:258:in `so_name'
   /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.4/lib/inline.rb:294:in `load_cache'
   /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.4/lib/inline.rb:675:in `inline'
   /usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:84
   /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
   /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
   vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/image_science_processor.rb:1
   /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
   /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:104:in `require_or_load'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:248:in `load_missing_constant'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:453:in `const_missing'
   vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:87:in `const_get'
   vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:87:in `has_attachment'
   app/models/upload.rb:7
   /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
   /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:104:in `require_or_load'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:248:in `load_missing_constant'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:453:in `const_missing'
   /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:465:in `const_missing'
   /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1748:in `compute_type'
   /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/reflection.rb:125:in `send'
   /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/reflection.rb:125:in `klass'
   /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/reflection.rb:129:in `table_name'
   /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/has_one_association.rb:67:in `construct_sql'
   /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/has_one_association.rb:6:in `initialize'
   /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations.rb:991:in `new'
   /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations.rb:991:in `upload'
   app/views/receipt/_newreceipt.html.erb:15:in `_run_erb_47app47views47receipt47_newreceipt46html46erb'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `send'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `compile_and_render_template'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:365:in `render_template'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:316:in `render_file'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:331:in `render'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/partials.rb:120:in `render_partial'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:352:in `render'
   app/views/receipt/new.html.erb:16:in `_run_erb_47app47views47receipt47new46html46erb'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/helpers/form_helper.rb:248:in `fields_for'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/helpers/form_helper.rb:184:in `form_for'
   app/views/receipt/new.html.erb:14:in `_run_erb_47app47views47receipt47new46html46erb'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `send'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `compile_and_render_template'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:365:in `render_template'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:316:in `render_file'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1100:in `render_for_file'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:836:in `render_with_no_layout'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/layout.rb:262:in `render_without_benchmark'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:51:in `render'
   /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:51:in `render'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1153:in `default_render'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1159:in `perform_action_without_filters'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:697:in `call_filters'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
   /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:199:in `perform_action_without_caching'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:678:in `perform_action'
   /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
   /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/query_cache.rb:8:in `cache'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:677:in `perform_action'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `send'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `process_without_filters'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in `process'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in `process'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in `handle_request'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in `dispatch'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in `dispatch'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:101:in `process_request'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:149:in `with_signal_handler'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:99:in `process_request'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:77:in `process_each_request'
   /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each_cgi'
   /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each'
   /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each_cgi'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:76:in `process_each_request'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:50:in `process!'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:24:in `process!'
   dispatch.fcgi:24

Rendering /home/mylittl/accounts/public/500.html (500 Internal Server Error)

Here my view
<fieldset>
<legend>Add An Expenditure</legend>
 <p>Bank Account</p>
  <%= collection_select 'receipt', 'bank_id', @user.banks, 'id', 'name'  %>
 <p>Expenditure Name</p>
  <p><%= f.text_field :name %></p>
 <p>Date</p>
  <p><%= f.date_select(:date, :default => Time.now) %>
 <p>Notes</p>
  <p><%= f.text_area :note, :cols => 25, :rows => 5 %></p>
 <p>Tags</p>
  <p><%= text_field_tag 'tags', params[:tags] %></p>
 
  <div id='box'>
   <%= render :partial => 'upload', :object => @receipt.upload %>
  </div>
 
  <div id='newitems'>
   <%= render :partial => 'items', :collection => @receipt.items %>
  </div>
 
 <br/>
 <p><%= submit_tag 'Add' %> or <%= link_to "Cancel", :action => 'index' %></p>
</fielset>
Any Ideas? Thanks for your help, Red

2008-02-27 06:54 AM

What do you mean exactly by "but only when my app is uploaded" - your whole rails application folder? uploaded from where to where, by what means?

Are you using script/console to produce this error?

2008-02-27 09:56 AM

Sorry for the poor description, I was in a hurry. Anyway, heres the problem.

In my development environment, when I go to the view (posted above) all works fine.

However

After deploying my rails app, I now receive an error (posted above) when viewing that page.

Thanks, Red

2008-02-28 10:55 AM

First thing, specify mini_magick as the attachment_fu processor.

If that doesn't work, because this is on FastCGI, fire up a mongrel on port 4583 and ask support to proxy to it to see if it fixes the issue.

Either way, I'm curious, fire up the console in both development and production and

app.get('your_controller/your_action')

and see if if gives the error in both cases - I think it might, because I think its an image_science issue.  

2008-02-28 12:17 PM

Ah thanks, as soon as I chose mini magick the problem was fixed.

Thanks again, Red

2008-02-28 01:01 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.