How can you suppress db: load: schema output? Launch
bundle exec rake db:schema:load
with options -s , -q or even VERBOSE=false does not affect the output; the same "create_table ... add_index ..." trash appears that I do not want to see. I am invoking this from within the Rake user task, and I do not want the user to see all this every time.
UPDATE:
I solved the problem with some recommendations from @Deefour using:
system "bundle exec rake db:schema:load -s RAILS_ENV=#{Rails.env} >NUL"
>NUL is for Windows computers, Unix-based can use > /dev/null .
but not
Rake::Task['db:schema:load'].invoke
as I did in my custom task. Please note that this solution applies to Windows machines. For Unix-based computers, I assume that you can use the solution below.
windows ruby-on-rails ruby-on-rails-3 rake
aguazales Aug 22 '12 at 18:44 2012-08-22 18:44
source share