joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Oct-08 16:26 UTC
Getting test fixture binary files stored in DB
Hi, db_files is a table that contains binary data. I''m using postgresql 8.1 if it matters. I want to get some binary data into the fixtures that gets loaded into the test database. Here''s my fixture: <% require ''base64'' %> picture_original: id: 1 data: <%Base64::encode64(File.read(''/home/joe/gof21.jpg'')).gsub("\n","").gsub(/\s+/, '''') %> It works with no errors, but the data that gets put into the database is corrupted. Any ideas? Thanks, Joe --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---