Auto Download
You need to define Services::User::Foo inside app/services/services/user/foo.rb
If you do not need this strange copy of a subfolder, you can also move services to app/models/services or lib/services .
You can also leave foo.rb in app/services/user/foo.rb , but it should define User::Foo .
Unwanted loading
If you don't need magic with class names and names, it's pretty simple:
Dir[Rails.root.join('app/services/**/*.rb')].each{|rb| require rb}
This will load any Ruby script inside app/services and any subfolder.
source share