[RubyGems] require fails the first time called and works the second time

B

Brian Takita

Hello,

The first time I try to require a library, I get a "No such file to
load". The second time I do the require, it works.
Does anybody know how I can fix this?

Here is my irb session:

irb(main):001:0> require 'data_view'
LoadError: No such file to load -- dataview
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require__'
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:182:in
`activate'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:181:in `each'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:181:in
`activate'
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:26:in
`require'
from (irb):1
irb(main):002:0> require 'data_view'
=> true

Thank you,
Brian Takita
 
B

Brian Takita

Arg...Theres something wrong with my rake file. I'll post the real
problem and solution when I fix it.
 
B

Brian Takita

AFAICT the problem is that I did not have a file named dataview.rb in
my library folder.
To solve this issue, I created a dataview.rb file that contains:
require 'data_view'

Now I can require 'dataview', instead of require 'data_view' to use
this library.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top