Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
What's the difference between require and require_dependency?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dan Bikle  
View profile  
 More options Nov 25 2005, 5:30 pm
Newsgroups: comp.lang.ruby
From: Dan Bikle <dan.bi...@gmail.com>
Date: Sat, 26 Nov 2005 07:30:23 +0900
Local: Fri, Nov 25 2005 5:30 pm
Subject: What's the difference between require and require_dependency?
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Florian Frank  
View profile  
 More options Nov 25 2005, 6:00 pm
Newsgroups: comp.lang.ruby
From: "Florian Frank" <fl...@nixe.ping.de>
Date: Sat, 26 Nov 2005 08:00:03 +0900
Local: Fri, Nov 25 2005 6:00 pm
Subject: Re: What's the difference between require and require_dependency?

Dan Bikle wrote:
>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.

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:

http://wiki.rubyonrails.com/rails/pages/RequireDependency

--
Florian Frank


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Schoen  
View profile  
 More options Nov 25 2005, 9:18 pm
Newsgroups: comp.lang.ruby
From: Michael Schoen <scho...@earthlink.net>
Date: Sat, 26 Nov 2005 11:18:18 +0900
Local: Fri, Nov 25 2005 9:18 pm
Subject: Re: What's the difference between require and require_dependency?

> 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.

"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).

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »