У меня есть решение для вас, если вам нужно что-то делать со скрепкой.Включите этот класс в вашу папку lib как heroku_compliant_file.rb
class HerokuCompliantFile < StringIO
def initialize(str,filename,content_type)
@original_filename = filename
@content_type = content_type
super(str)
end
end
В вашей модели, содержащей скрепку -
def insert_a_hunk_of_string_into_paperclip(some_object)
f = HerokuCompliantFile.new(some_object.render,"myfile_#{Process.pid}","application/pdf")
self.paperclip_model = f
save
end