so why didn't the file I linked to have to do that? i.e. the cancan gem
require'ing its sub-directory files?
On Sun, Sep 23, 2012 at 6:50 PM, 7stud -- wrote:

I've never seen that require in any gems on the web
That's because most of the time when you require something, it is a gem,
and gems are installed in specific directories that ruby searches when
you require something. You can see a list of the directories ruby
searches when you require something by doing this:


p $LOAD_PATH

If one of those directories isn't your current directory, and you want
to require a file in your current directory, then your require has to
specify the path(absolute or relative) to the file.

require './your_file.rb'

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 7 of 11 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedSep 23, '12 at 9:30p
activeSep 24, '12 at 2:16a
posts11
users4
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase