Transforming simple ruby files into a ruby gem

Update:

Now i use sidekiq to run my main file.

after_initialize do
class MainPlugin
include Sidekiq

require_relative File.expand_path(‘…/lib/gen_all_posts_url.rb’, FILE)
require_relative File.expand_path(‘…/lib/get_tweets.rb’, FILE)
##morecode

end
end

Sidekiq::Cron::Job.create(name: ‘MainPlugin every minute’, cron: ’ *', class:‘MainPlugin’)

But its not working, the strange thing about it is, that i tried for class:‘plugin.rb’ once, which was obviously wrong - so i switched it back, but i am still getting the error message:

Job exception: wrong constant name plugin.rb

I dont get what i am doing wrong here