Search code examples
ruby-on-railsrubyrake

Rake aborted! Error even though the file run successfully [Rails]


I write a really simple rake file named testing.rake, on my Ruby on Rails app to see whether or not i can run rake file successfully from command line. But when i ran my code by using command "rake testing", an error popup at the end of the output eventhough the code in the file executed successfully.

Below is the code and the file screenshot:

enter image description here

Below is the output of when i ran the code, together with the result and error that pops up:

enter image description here

As you can see, the code and the result are totally fine. So, I am confused why there is still error comes out?

Thanks!


Solution

  • a rake task should be like this:

    task :testing do
      puts "hello, world!"
    end
    

    You can get more info from here