This is what I'm trying:
require "active_support"
desc "test"
task :foo => [:environment] do
parse(:categories) do |hash|
# cleanup name
hash[:name] = titlecase(hash[:name])
# ...
end
end
This is the error I'm getting:
undefined method `titlecase' main:Object
I've also tried:
ActiveSupport::Inflector::titlecase...
Is there a command line switch I'm missing?
At the moment I'm having to do this:
#task :install => :build do
task :install do
end
...
How can I call specified 1st app's rake task from second one.
Case:
User on baseapp.com (RoR), fills up the reg.form
BaseApp validates and stores data
Than, with delayed_job/resque I should call subapp's rake db:bootstrap FORM_PARAM1 FORM_PARAM2 ... FORM_PARAM3
...
Hi!
Why when i run task :
my_project> rake import:twitter
Task.path: lib/task/import_twitter.rake
namespace :import do
task :twitter => :environment do
puts "importing...."
end
end
then tests also run?
In the console output:
importing....
Loaded suite C:/Ruby/bin/rake
Started
Finished in 0.001 secon...
I use crontab to invoke rake task at some time for example:
every 3 hour
I want to ensure that when crontab ready to execute the rake task
it can check the rake task is running. if it is so don't execute.
how to do this. thanks.
...
Hi there,
I have a rake task that I created to populate my database with fake data. One of my models has a before_validation callback method which uses the blank? method. When I run my rake task, the task is aborted with the following message:
rake aborted!
undefined method `blank' for #<BigDecimal:101848c10,'0.35E2',9(18)>
...