Help with attachment_fu, why this error?

hi, i’m trying to play with attachment_fu using imagescience, and…it
works, partially…
when i send the form the image is uploaded and it’s resized and the
thumb made, and inserted in the db.
But after this an error is occurred (every time):

TypeError (singleton can’t be dumped):
/usr/lib/ruby/1.8/pstore.rb:349:in dump' /usr/lib/ruby/1.8/pstore.rb:349:indump’
/usr/lib/ruby/1.8/pstore.rb:330:in transaction' /usr/lib/ruby/1.8/cgi/session/pstore.rb:81:inupdate’
/usr/lib/ruby/1.8/cgi/session/pstore.rb:88:in close' /usr/lib/ruby/1.8/cgi/session.rb:324:inclose’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1184:in
close_session' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1228:inprocess_cleanup_without_flash’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/flash.rb:146:in
process_cleanup_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:662:inprocess_cleanup_without_session_management_support’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:124:in
process_cleanup_without_components' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/components.rb:178:inprocess_cleanup’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:435:in
process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:inprocess_without_session_management_support’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in
process' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:inprocess’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:113:inhandle_dispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:79:in
service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:inservice’
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
/usr/lib/ruby/1.8/webrick/server.rb:162:in start' /usr/lib/ruby/1.8/webrick/server.rb:162:instart_thread’
/usr/lib/ruby/1.8/webrick/server.rb:95:in start' /usr/lib/ruby/1.8/webrick/server.rb:92:ineach’
/usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:instart’
/usr/lib/ruby/1.8/webrick/server.rb:82:in start' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:63:indispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/webrick.rb:59
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
require' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:innew_constants_in’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
require' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' ./script/server:3 -e:4:inload’
-e:4

this is the controller:

def aaaaa
@image = Image.new
end

def bbbbb
@image = Image.new(params[:image])
if @image.save
flash[:notice] = ‘image was successfully created.’
redirect_to :action => :aaaaa
else
render :action => :new
end
end

model:

has_attachment :content_type => :image,
:storage => :file_system,
:max_size => 500.kilobytes,
:resize_to => ‘320x200>’,
:thumbnails => { :thumb => ‘100x100>’ }

validates_as_attachment

view:

<%= error_messages_for :image %>

<% form_for(:image, :url => {:action => :bbbbb}, :html => { :multipart
=> true }) do |f| -%>

Upload An image: <%= f.file_field :uploaded_data %>

<%= submit_tag 'Create' %>

<% end -%>

table:

create_table :images do |t|
  t.column :parent_id,  :integer
  t.column :content_type, :string
  t.column :filename, :string
  t.column :thumbnail, :string
  t.column :size, :integer
  t.column :width, :integer
  t.column :height, :integer
end

it’s about 3 hours i’m trying to fix this, but without any result…and
the code is the same i found here:
http://clarkware.com/cgi/blosxom/2007/02/24
can anyone help me? please :frowning:
thanks

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs