```ruby
module SitemapGenerator
  class Railtie < Rails::Railtie
    rake_tasks do
      require File.expand_path('../tasks', __FILE__)
    end
  end
end
```

Load the rake task instead of requiring them
user
```ruby
module SitemapGenerator
  class Railtie < Rails::Railtie
    rake_tasks do
      load "tasks/sitemap_generator_tasks.rake"
    end
  end
end
```
assistant