0

I have a Padrino app which doesn't seem to be aware of its own root path. The app works fine, but when I try to require a file I wrote and put into the models folder, it says it cannot find it. The file is required from within another file in the models folder: DvdActor.rb. I can use any of these paths and it won't find it:

/app/models/file.rb
file.rb
models/file.rb
app/models/fie.rb
...

It will only find it if I use:

"#{Padrino.root}/app/models/file.rb"

Furthermore, the Thnking Sphinx gem will also have problems writing its configuration file or indexing (if I hardcode the path to the config file).

And when I have Padrino generate a Model, it will create a new model folder in the root folder insted of in the app folder itself.

I could recreate my app from scratch and copy the files over but I already have Heroku and git setup, etc. and don't want to recreate all this (sometimes simply copying the files over doesn't work properly).

Is there a way to reset this?

kakubei
  • 5,321
  • 4
  • 44
  • 66

0 Answers0