0

I added a custom directory to my Padrino application (0.12.4). I added it to the load paths and everything loaded fine. The issue is that Padrino is not reloading changes to the files in my custom path.

boot.rb

Padrino.before_load do
  Padrino.dependency_paths << Padrino.root('app/services/**/*.rb')
end

Padrino.after_load do
end

Padrino.load!
Moemars
  • 4,692
  • 3
  • 27
  • 30

1 Answers1

2

I fixed my own issue and thought I would share because I couldn't find anything.

I had to add the custom load path to my app prerequisites in the after load hook. Once I did that changes to the files in those directories were seen.

boot.rb

Padrino.before_load do
  Padrino.dependency_paths << Padrino.root('app/services/**/*.rb')
end

Padrino.after_load do
  AppModule::App.prerequisites << Padrino.root("app/services/**/*.rb")
end

Padrino.load!

This Github helped me and had some more explanation: https://github.com/padrino/padrino-framework/issues/731

Moemars
  • 4,692
  • 3
  • 27
  • 30