Hi folks,
I have a directory structure like this:
...Projects/icookware /* main directory for a student project
...Projects/icookware/icwweb /* rails root directory
Now I want to require some files from the icookware directory, lets
say icw_blender.rb
We don''t want to work with absolute paths in our code, since
it''s ugly
and we have different environments and project paths on our computers.
I thought of extending the additional load path in environment.rb:
ADDITIONAL_LOAD_PATHS.concat(Dir["#{RAILS_ROOT}/../"])
in my controller query_controller.rb:
require ''icw_blender''
The problems is: icw_blender reads some data from another file in
Projects/icookware (muster_rezepte)
and rails does not find it:
Errno::ENOENT in Queries#create
No such file or directory - muster_rezepte
/../icw_blender.rb:25:in `initialize''
/../icw_blender.rb:25:in `open''
/../icw_blender.rb:25:in `getMarshalledData''
/../icw_blender.rb:16:in `initialize''
app/controllers/queries_controller.rb:46:in `new''
app/controllers/queries_controller.rb:46:in `create''
./script/server:48
Could please someone help me to understand this?
Cheers,
Ana