People,
What’s the difference between require and require_dependency?
I looked here for clues:
http://www.ruby-doc.org/core/
and I could not find either one.
-Dan
People,
What’s the difference between require and require_dependency?
I looked here for clues:
http://www.ruby-doc.org/core/
and I could not find either one.
-Dan
Dan B. wrote:
People,
What’s the difference between require and require_dependency?I looked here for clues:
RDoc Documentation
and I could not find either one.
require loads a file (shared object or ruby source) once from the load
path.
require_dependency isn’t a ruby core feature, it’s part of rails. It
remembers the given
file and loads it on each new server request (like load “path/file.rb”
does), if development mode is enabled:
What’s the difference between require and require_dependency?
I looked here for clues:
RDoc Documentation
and I could not find either one.
“require” is standard ruby. “require_dependency” is a Rails extension
that works some magic when operating in development mode (in which Rails
reloads most of the app classes with each request).
can require_dependency be made to reload all of the applicaiton not just
the
things in the app directory? Editing plugin files or css requires
restarting
webrick which is a pain.
-Peter
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs