Rails rake - setting constant and cache delete

i perform a rake task with a cron, in this task i have 2 problems:

-i using a constant name setting in my config/environment.rb, when i try
to run the rake job on the “environment developer” the constant is read
an the job works fine, but when i try on the “environment production”
the constant seem not include in the job.

-on the cron job i want to delete 3 cache fragments, i try this:
expire_obj = ActionController::Base.new
expire_obj.expire_fragment(%r{(.)part=my_first_part.cache})
expire_obj.expire_fragment(%r{(.
)part== my_first_second.cache})
expire_obj.expire_fragment(%r{(.*)part= my_third_part.cache})
when i run on “environment developer” the fragments are deleted, but
when i try on the “environment production” they aren’t.

any solutions?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs