I have a gem that requires a 'Cms' namespace to be present when running.
However, when running rake tasks, nothing works as this Cms namespace isn't present. How do I get my rake tasks to work?
From stackoverflow
-
You can either, load your project source into the Rakefile (like Rails would do) or define a dummy module with the name Cms on your project.
# Rakefile module Cms; end task :my_task do # .. endIf you are on rails, and this gem is a dependency, you just have to make your task dependent of the :environment rails' task.
# some_task.rake task :my_task => :environment do # .. endHope this helps.
0 comments:
Post a Comment