Top "Rake-task" questions

Task is the basic unit of work in a Rakefile.

How can I run a ruby class from rake file?

I want to run a ruby class from a sample.rake file. Consider myruby.rb is a ruby file. I …

ruby-on-rails ruby rake rake-task rakefile
How to include ActionMailer class in rake task?

I want to use ActionMailer in my rake task in order to send emails to people at a particular time. …

ruby-on-rails ruby actionmailer rake-task
Use environment variables in Rake task

task :some_task, :environment do |t, args| puts Rails.env #=> development, production, etc puts ENV #=> {} end I set …

ruby-on-rails environment-variables rake-task
Does Rails run initializers for rake task?

Are the scripts from config/initializers executed when I run rake task?

ruby-on-rails initializer rake-task
how to force rake task to run under development environment using Whenever gem

I'm using Whenever gem to run a rake task. When I run rake task it runs under development environment, but …

ruby ruby-on-rails-4 rake-task whenever
Rails: rake db:test:prepare Vs rake test:prepare

AS the guides, the command used to prepare test database is bundle exec rake db:test:prepare However, I have …

ruby-on-rails ruby-on-rails-3 rake rake-task