# Rake printing instance variable to console

**URL:** <https://www.ruby-forum.com/t/rake-printing-instance-variable-to-console/90379>\
**Category:** Rails\
**Created:** [March 28, 2007, 10:21am UTC](https://www.ruby-forum.com/t/rake-printing-instance-variable-to-console/90379 "2007-03-28T10:21:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sylow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e8c25b/32.png) [@sylow](https://www.ruby-forum.com/u/sylow)\
**Post date:** [March 28, 2007, 10:21am UTC](https://www.ruby-forum.com/t/rake-printing-instance-variable-to-console/90379/1 "2007-03-28T10:21:28Z")

</div>

Hello All,

My small issue is that following rake task is printing my instance  
variable to console, but I do not want any output accept my “put”  
statement.

Data field is a blob and contains binary data and when printed to my  
console it is huge amount of data. I dont wanna see it at all.

Any suggestions? Thanks

```
desc "Migrate images from attachments to fleximage."
task :migrate => [:environment] do |t|
   Asset.find(:all, :conditions=>"parent_id is NULL").each do |a|
     image_file = RAILS_ROOT + "/public" + a.public_name_for
     puts "Working on " + image_file
     i = Image.create(
                   :data => image_file,
                   :author_id => a.author_id,
                   :author_ip => a.author_ip
                   )
     ActiveRecord::Base.connection.execute("update images set id =

```

#{a.id} where id = #{i.id}")  
end  
end
