Hello all,
Here's the LOAD_PATH for my desktop:
/usr/local/lib/ruby/site_ruby/1.8
/usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.10.0
/usr/local/lib/ruby/site_ruby
/usr/local/lib/ruby/1.8
/usr/local/lib/ruby/1.8/powerpc-darwin8.10.0
.
Here's the LOAD_PATH for my laptop:
/usr/local/lib/ruby/site_ruby/1.8
/usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.9.1
/usr/local/lib/ruby/site_ruby
/usr/local/lib/ruby/1.8
/usr/local/lib/ruby/1.8/i686-darwin8.9.1
.
Installed gem 'flacinfo-rb' and the path looks like this on both
machines:
/usr/local/lib/ruby/gems/1.8/gems/flacinfo-rb-0.3/flacinfo.rb
(although I would have expected to find it here:
/usr/local/lib/ruby/site_ruby/1.8/flacinfo.rb)
On my laptop success with:
irb(main):001:0> require 'flacinfo'
=> true
On my desktop this:
irb(main):001:0> require 'flacinfo'
LoadError: no such file to load -- flacinfo
from (irb):1:in `require'
from (irb):1
If I move the gem to site_ruby on my desktop, the load succeeds. My
question is why the inconsistency?
If the install location is incorrect why does require work on one
machine and not the other?
Here's the result of the install command on both machines:
Successfully installed flacinfo-rb-0.3
Installing ri documentation for flacinfo-rb-0.3...
File not found: lib
Is that last bit significant?
Thanks for any info,
Dan J.
Daniel Jewett wrote:
If I move the gem to site_ruby on my desktop, the load succeeds. My
question is why the inconsistency?
If the install location is incorrect why does require work on one
machine and not the other?
Here's the result of the install command on both machines:
Successfully installed flacinfo-rb-0.3
Installing ri documentation for flacinfo-rb-0.3...
File not found: lib
Is that last bit significant?
Thanks for any info,
Dan J.
Hi Daniel,
Did you tried by using "gem" command ?
(gem instead of require_gem, which is obsolete)
Maybe in one machine, by default, that lib is loaded and on the other
one, not?
I'm just guessing.
All the best,
Alin
···
--
Posted via http://www.ruby-forum.com/\.
You need to require 'rubygems' first. This probably isn't required
because you have RUBYOPT set on your desktop, but not your laptop
···
On 7/12/07, Daniel Jewett <dan@solidether.net> wrote:
Hello all,
Here's the LOAD_PATH for my desktop:
/usr/local/lib/ruby/site_ruby/1.8
/usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.10.0
/usr/local/lib/ruby/site_ruby
/usr/local/lib/ruby/1.8
/usr/local/lib/ruby/1.8/powerpc-darwin8.10.0
.
Here's the LOAD_PATH for my laptop:
/usr/local/lib/ruby/site_ruby/1.8
/usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.9.1
/usr/local/lib/ruby/site_ruby
/usr/local/lib/ruby/1.8
/usr/local/lib/ruby/1.8/i686-darwin8.9.1
.
Installed gem 'flacinfo-rb' and the path looks like this on both
machines:
/usr/local/lib/ruby/gems/1.8/gems/flacinfo-rb-0.3/flacinfo.rb
(although I would have expected to find it here:
/usr/local/lib/ruby/site_ruby/1.8/flacinfo.rb)
On my laptop success with:
irb(main):001:0> require 'flacinfo'
=> true
On my desktop this:
irb(main):001:0> require 'flacinfo'
LoadError: no such file to load -- flacinfo
from (irb):1:in `require'
from (irb):1
If I move the gem to site_ruby on my desktop, the load succeeds. My
question is why the inconsistency?
If the install location is incorrect why does require work on one
machine and not the other?
Here's the result of the install command on both machines:
Successfully installed flacinfo-rb-0.3
Installing ri documentation for flacinfo-rb-0.3...
File not found: lib
Is that last bit significant?
Thanks for any info,
Dan J.
--
Chris Carter
concentrationstudios.com
brynmawrcs.com
In article <46e285d2c6a7f2ca596e69a120d355b5@ruby-forum.com>, Alin Popa
Daniel Jewett wrote:
> If I move the gem to site_ruby on my desktop, the load succeeds. My
> question is why the inconsistency?
> If the install location is incorrect why does require work on one
> machine and not the other?
>
> Here's the result of the install command on both machines:
> Successfully installed flacinfo-rb-0.3
> Installing ri documentation for flacinfo-rb-0.3...
> File not found: lib
>
> Is that last bit significant?
>
> Thanks for any info,
> Dan J.
Hi Daniel,
Did you tried by using "gem" command ?
(gem instead of require_gem, which is obsolete)
Maybe in one machine, by default, that lib is loaded and on the other
one, not?
I'm just guessing.
All the best,
Alin
Thanks Alin,
Here's the result of my experiment with the gem command:
$ irb
irb(main):001:0> gem 'flacinfo'
NoMethodError: undefined method `gem' for main:Object
from (irb):1
irb(main):002:0> require 'rubygems'
=> true
irb(main):003:0> gem 'flacinfo'
Gem::LoadError: Could not find RubyGem flacinfo (>= 0.0.0)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:304:in
`report_activate_error'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:238:in
`activate'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:76:in
`active_gem_with_options'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:50:in `gem'
from (irb):3
irb(main):004:0> gem 'flacinfo-rb'
=> true
irb(main):005:0> song = FlacInfo.new("dread.flac")
NameError: uninitialized constant FlacInfo
from (irb):5
'require' and 'gem' really want to find the library under 'site_ruby.'
If I move it there, everything works. I just still can't figure out why
it works without being in 'site_ruby.' on my other machine.
The
installations of ruby, rubygems, etc. where exactly the same on both.
Dan J.
···
<alin.popa@gmail.com> wrote:
In article
<86987bdf0707120938r7121cb59o3404386a44758cf8@mail.gmail.com>, Chris
> Hello all,
>
> Here's the LOAD_PATH for my desktop:
> /usr/local/lib/ruby/site_ruby/1.8
> /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.10.0
> /usr/local/lib/ruby/site_ruby
> /usr/local/lib/ruby/1.8
> /usr/local/lib/ruby/1.8/powerpc-darwin8.10.0
> .
>
> Here's the LOAD_PATH for my laptop:
> /usr/local/lib/ruby/site_ruby/1.8
> /usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.9.1
> /usr/local/lib/ruby/site_ruby
> /usr/local/lib/ruby/1.8
> /usr/local/lib/ruby/1.8/i686-darwin8.9.1
> .
>
> Installed gem 'flacinfo-rb' and the path looks like this on both
> machines:
> /usr/local/lib/ruby/gems/1.8/gems/flacinfo-rb-0.3/flacinfo.rb
> (although I would have expected to find it here:
> /usr/local/lib/ruby/site_ruby/1.8/flacinfo.rb)
>
> On my laptop success with:
> irb(main):001:0> require 'flacinfo'
> => true
>
> On my desktop this:
> irb(main):001:0> require 'flacinfo'
> LoadError: no such file to load -- flacinfo
> from (irb):1:in `require'
> from (irb):1
>
> If I move the gem to site_ruby on my desktop, the load succeeds. My
> question is why the inconsistency?
> If the install location is incorrect why does require work on one
> machine and not the other?
>
> Here's the result of the install command on both machines:
> Successfully installed flacinfo-rb-0.3
> Installing ri documentation for flacinfo-rb-0.3...
> File not found: lib
>
> Is that last bit significant?
>
> Thanks for any info,
> Dan J.
>
>
You need to require 'rubygems' first. This probably isn't required
because you have RUBYOPT set on your desktop, but not your laptop
Thanks Chris,
I did try that...
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'flacinfo'
LoadError: no such file to load -- flacinfo
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from (irb):2
This isn't necessarily a show stopper, because of course I can just
move the library, but I'm trying to understand the process.
Dan
···
Carter <cdcarter@gmail.com> wrote:
On 7/12/07, Daniel Jewett <dan@solidether.net> wrote:
How about:
require 'rubygems'
require 'flacinfo-rb'
?
···
On 7/12/07, Daniel Jewett <dan@solidether.net> wrote:
In article
<86987bdf0707120938r7121cb59o3404386a44758cf8@mail.gmail.com>, Chris
Carter <cdcarter@gmail.com> wrote:
> On 7/12/07, Daniel Jewett <dan@solidether.net> wrote:
> > Hello all,
> >
> > Here's the LOAD_PATH for my desktop:
> > /usr/local/lib/ruby/site_ruby/1.8
> > /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.10.0
> > /usr/local/lib/ruby/site_ruby
> > /usr/local/lib/ruby/1.8
> > /usr/local/lib/ruby/1.8/powerpc-darwin8.10.0
> > .
> >
> > Here's the LOAD_PATH for my laptop:
> > /usr/local/lib/ruby/site_ruby/1.8
> > /usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.9.1
> > /usr/local/lib/ruby/site_ruby
> > /usr/local/lib/ruby/1.8
> > /usr/local/lib/ruby/1.8/i686-darwin8.9.1
> > .
> >
> > Installed gem 'flacinfo-rb' and the path looks like this on both
> > machines:
> > /usr/local/lib/ruby/gems/1.8/gems/flacinfo-rb-0.3/flacinfo.rb
> > (although I would have expected to find it here:
> > /usr/local/lib/ruby/site_ruby/1.8/flacinfo.rb)
> >
> > On my laptop success with:
> > irb(main):001:0> require 'flacinfo'
> > => true
> >
> > On my desktop this:
> > irb(main):001:0> require 'flacinfo'
> > LoadError: no such file to load -- flacinfo
> > from (irb):1:in `require'
> > from (irb):1
> >
> > If I move the gem to site_ruby on my desktop, the load succeeds. My
> > question is why the inconsistency?
> > If the install location is incorrect why does require work on one
> > machine and not the other?
> >
> > Here's the result of the install command on both machines:
> > Successfully installed flacinfo-rb-0.3
> > Installing ri documentation for flacinfo-rb-0.3...
> > File not found: lib
> >
> > Is that last bit significant?
> >
> > Thanks for any info,
> > Dan J.
> >
>
> You need to require 'rubygems' first. This probably isn't required
> because you have RUBYOPT set on your desktop, but not your laptop
Thanks Chris,
I did try that...
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'flacinfo'
LoadError: no such file to load -- flacinfo
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from (irb):2
This isn't necessarily a show stopper, because of course I can just
move the library, but I'm trying to understand the process.
Dan
--
Chris Carter
concentrationstudios.com
brynmawrcs.com
quoth the Daniel Jewett:
Thanks Chris,
I did try that...
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'flacinfo'
LoadError: no such file to load -- flacinfo
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from (irb):2
This isn't necessarily a show stopper, because of course I can just
move the library, but I'm trying to understand the process.
Dan
Hi Daniel,
As the author of flacinfo, and as one who is not overly familiar with the
inner workings of gems, would not overlook that this may be a problem with
the gem itself. It does seem to work fine on the (Linux) system that I tested
it on.
Does your problem occur with all gems or just flacinfo?
Thanks,
-d
···
--
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972
Or even:
require 'rubygems'
gem 'flacinfo-rb'
require 'flacinfo'
···
On 7/12/07, Chris Carter <cdcarter@gmail.com> wrote:
On 7/12/07, Daniel Jewett <dan@solidether.net> wrote:
> In article
> <86987bdf0707120938r7121cb59o3404386a44758cf8@mail.gmail.com>, Chris
> Carter <cdcarter@gmail.com> wrote:
>
> > On 7/12/07, Daniel Jewett <dan@solidether.net> wrote:
> > > Hello all,
> > >
> > > Here's the LOAD_PATH for my desktop:
> > > /usr/local/lib/ruby/site_ruby/1.8
> > > /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.10.0
> > > /usr/local/lib/ruby/site_ruby
> > > /usr/local/lib/ruby/1.8
> > > /usr/local/lib/ruby/1.8/powerpc-darwin8.10.0
> > > .
> > >
> > > Here's the LOAD_PATH for my laptop:
> > > /usr/local/lib/ruby/site_ruby/1.8
> > > /usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.9.1
> > > /usr/local/lib/ruby/site_ruby
> > > /usr/local/lib/ruby/1.8
> > > /usr/local/lib/ruby/1.8/i686-darwin8.9.1
> > > .
> > >
> > > Installed gem 'flacinfo-rb' and the path looks like this on both
> > > machines:
> > > /usr/local/lib/ruby/gems/1.8/gems/flacinfo-rb-0.3/flacinfo.rb
> > > (although I would have expected to find it here:
> > > /usr/local/lib/ruby/site_ruby/1.8/flacinfo.rb)
> > >
> > > On my laptop success with:
> > > irb(main):001:0> require 'flacinfo'
> > > => true
> > >
> > > On my desktop this:
> > > irb(main):001:0> require 'flacinfo'
> > > LoadError: no such file to load -- flacinfo
> > > from (irb):1:in `require'
> > > from (irb):1
> > >
> > > If I move the gem to site_ruby on my desktop, the load succeeds. My
> > > question is why the inconsistency?
> > > If the install location is incorrect why does require work on one
> > > machine and not the other?
> > >
> > > Here's the result of the install command on both machines:
> > > Successfully installed flacinfo-rb-0.3
> > > Installing ri documentation for flacinfo-rb-0.3...
> > > File not found: lib
> > >
> > > Is that last bit significant?
> > >
> > > Thanks for any info,
> > > Dan J.
> > >
> >
> > You need to require 'rubygems' first. This probably isn't required
> > because you have RUBYOPT set on your desktop, but not your laptop
>
> Thanks Chris,
> I did try that...
>
> irb(main):001:0> require 'rubygems'
> => true
> irb(main):002:0> require 'flacinfo'
> LoadError: no such file to load -- flacinfo
> from
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `gem_original_require'
> from
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `require'
> from (irb):2
>
> This isn't necessarily a show stopper, because of course I can just
> move the library, but I'm trying to understand the process.
>
> Dan
>
How about:
require 'rubygems'
require 'flacinfo-rb'
?
--
Chris Carter
concentrationstudios.com
brynmawrcs.com
--
Chris Carter
concentrationstudios.com
brynmawrcs.com
In article
<86987bdf0707121014q884fa0dld5f91258a5d345e1@mail.gmail.com>, Chris
> In article
> <86987bdf0707120938r7121cb59o3404386a44758cf8@mail.gmail.com>, Chris
>
> > > Hello all,
> > >
> > > Here's the LOAD_PATH for my desktop:
> > > /usr/local/lib/ruby/site_ruby/1.8
> > > /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.10.0
> > > /usr/local/lib/ruby/site_ruby
> > > /usr/local/lib/ruby/1.8
> > > /usr/local/lib/ruby/1.8/powerpc-darwin8.10.0
> > > .
> > >
> > > Here's the LOAD_PATH for my laptop:
> > > /usr/local/lib/ruby/site_ruby/1.8
> > > /usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.9.1
> > > /usr/local/lib/ruby/site_ruby
> > > /usr/local/lib/ruby/1.8
> > > /usr/local/lib/ruby/1.8/i686-darwin8.9.1
> > > .
> > >
> > > Installed gem 'flacinfo-rb' and the path looks like this on both
> > > machines:
> > > /usr/local/lib/ruby/gems/1.8/gems/flacinfo-rb-0.3/flacinfo.rb
> > > (although I would have expected to find it here:
> > > /usr/local/lib/ruby/site_ruby/1.8/flacinfo.rb)
> > >
> > > On my laptop success with:
> > > irb(main):001:0> require 'flacinfo'
> > > => true
> > >
> > > On my desktop this:
> > > irb(main):001:0> require 'flacinfo'
> > > LoadError: no such file to load -- flacinfo
> > > from (irb):1:in `require'
> > > from (irb):1
> > >
> > > If I move the gem to site_ruby on my desktop, the load succeeds. My
> > > question is why the inconsistency?
> > > If the install location is incorrect why does require work on one
> > > machine and not the other?
> > >
> > > Here's the result of the install command on both machines:
> > > Successfully installed flacinfo-rb-0.3
> > > Installing ri documentation for flacinfo-rb-0.3...
> > > File not found: lib
> > >
> > > Is that last bit significant?
> > >
> > > Thanks for any info,
> > > Dan J.
> > >
> > >
> >
> >
> > You need to require 'rubygems' first. This probably isn't required
> > because you have RUBYOPT set on your desktop, but not your laptop
>
> Thanks Chris,
> I did try that...
>
> irb(main):001:0> require 'rubygems'
> => true
> irb(main):002:0> require 'flacinfo'
> LoadError: no such file to load -- flacinfo
> from
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `gem_original_require'
> from
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `require'
> from (irb):2
>
> This isn't necessarily a show stopper, because of course I can just
> move the library, but I'm trying to understand the process.
>
> Dan
>
>
How about:
require 'rubygems'
require 'flacinfo-rb'
?
Yeah, I tried that too. The load succeeds but then the methods fail:
Should work like this:
irb(main):001:0> require 'flacinfo'
=> true
irb(main):002:0> song = FlacInfo.new("dread.flac")
=> #<FlacInfo:0x19208 (STREAMINFO size=34 offset=8) (SEEKTABLE size=486
offset=46) (VORBIS_COMMENT size=235 offset=536) (PADDING size=4065
offset=775)>
irb(main):003:0> song.print_tags
ARTIST: 10cc
TRACKNUMBER: 01
DATE: 1978
vendor_tag: reference libFLAC 1.1.2 20050205
ALBUM: Bloody Tourists
TOTALTRACKS: 13
TITLE: Dreadlock Holiday
YEAR: 1978
GENRE: Rock
offset: 536
block_size: 235
COMMENT: High Quality, EAC secure, Lossless flac
=> nil
But instead I get:
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> gem 'flacinfo-rb'
=> true
irb(main):003:0> song = FlacInfo.new("dread.flac")
NameError: uninitialized constant FlacInfo
from (irb):3
···
Carter <cdcarter@gmail.com> wrote:
On 7/12/07, Daniel Jewett <dan@solidether.net> wrote:
> Carter <cdcarter@gmail.com> wrote:
> > On 7/12/07, Daniel Jewett <dan@solidether.net> wrote:
In article <200707121153.11612.bulliver@badcomputer.org>, darren kirby
Hi Daniel,
As the author of flacinfo, and as one who is not overly familiar with the
inner workings of gems, would not overlook that this may be a problem with
the gem itself. It does seem to work fine on the (Linux) system that I tested
it on.
Does your problem occur with all gems or just flacinfo?
Thanks,
-d
Hi Darren,
It did actually occur to me along the way that I should ask you about
this. 
I haven't had this problem with other gems that I know of. One thing I
wonder about is whether the gem is correctly placed during the install,
because I believe that 3rd-party gems are supposed to go under
site_ruby. (On my machine: /usr/local/lib/ruby/site_ruby/1.8)
Here's the install:
sudo gem install -r flacinfo-rb
Successfully installed flacinfo-rb-0.3
Installing ri documentation for flacinfo-rb-0.3...
File not found: lib
Which puts it here:
/usr/local/lib/ruby/gems/1.8/gems/flacinfo-rb-0.3
I can move flacinfo.rb to site_ruby/1.8 and everything works fine.
The odd thing is that on one machine (my Intel Mac), require 'flacinfo'
works without being moved, but on my desktop machine it doesn't.
And finally, the REAL problem is me making a mountain out of a molehill!
Regards,
Dan J.
···
<bulliver@badcomputer.org> wrote:
require 'flacinfo' (or 'flacinfo-rb') after the gem line. 'gem' just
activates the gem, you still need to require it.
···
On 7/12/07, Daniel Jewett <dan@solidether.net> wrote:
In article
<86987bdf0707121014q884fa0dld5f91258a5d345e1@mail.gmail.com>, Chris
Carter <cdcarter@gmail.com> wrote:
> On 7/12/07, Daniel Jewett <dan@solidether.net> wrote:
> > In article
> > <86987bdf0707120938r7121cb59o3404386a44758cf8@mail.gmail.com>, Chris
> > Carter <cdcarter@gmail.com> wrote:
> >
> > > On 7/12/07, Daniel Jewett <dan@solidether.net> wrote:
> > > > Hello all,
> > > >
> > > > Here's the LOAD_PATH for my desktop:
> > > > /usr/local/lib/ruby/site_ruby/1.8
> > > > /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.10.0
> > > > /usr/local/lib/ruby/site_ruby
> > > > /usr/local/lib/ruby/1.8
> > > > /usr/local/lib/ruby/1.8/powerpc-darwin8.10.0
> > > > .
> > > >
> > > > Here's the LOAD_PATH for my laptop:
> > > > /usr/local/lib/ruby/site_ruby/1.8
> > > > /usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.9.1
> > > > /usr/local/lib/ruby/site_ruby
> > > > /usr/local/lib/ruby/1.8
> > > > /usr/local/lib/ruby/1.8/i686-darwin8.9.1
> > > > .
> > > >
> > > > Installed gem 'flacinfo-rb' and the path looks like this on both
> > > > machines:
> > > > /usr/local/lib/ruby/gems/1.8/gems/flacinfo-rb-0.3/flacinfo.rb
> > > > (although I would have expected to find it here:
> > > > /usr/local/lib/ruby/site_ruby/1.8/flacinfo.rb)
> > > >
> > > > On my laptop success with:
> > > > irb(main):001:0> require 'flacinfo'
> > > > => true
> > > >
> > > > On my desktop this:
> > > > irb(main):001:0> require 'flacinfo'
> > > > LoadError: no such file to load -- flacinfo
> > > > from (irb):1:in `require'
> > > > from (irb):1
> > > >
> > > > If I move the gem to site_ruby on my desktop, the load succeeds. My
> > > > question is why the inconsistency?
> > > > If the install location is incorrect why does require work on one
> > > > machine and not the other?
> > > >
> > > > Here's the result of the install command on both machines:
> > > > Successfully installed flacinfo-rb-0.3
> > > > Installing ri documentation for flacinfo-rb-0.3...
> > > > File not found: lib
> > > >
> > > > Is that last bit significant?
> > > >
> > > > Thanks for any info,
> > > > Dan J.
> > > >
> > >
> > > You need to require 'rubygems' first. This probably isn't required
> > > because you have RUBYOPT set on your desktop, but not your laptop
> >
> > Thanks Chris,
> > I did try that...
> >
> > irb(main):001:0> require 'rubygems'
> > => true
> > irb(main):002:0> require 'flacinfo'
> > LoadError: no such file to load -- flacinfo
> > from
> > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> > `gem_original_require'
> > from
> > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> > `require'
> > from (irb):2
> >
> > This isn't necessarily a show stopper, because of course I can just
> > move the library, but I'm trying to understand the process.
> >
> > Dan
> >
>
> How about:
> require 'rubygems'
> require 'flacinfo-rb'
>
> ?
Yeah, I tried that too. The load succeeds but then the methods fail:
Should work like this:
irb(main):001:0> require 'flacinfo'
=> true
irb(main):002:0> song = FlacInfo.new("dread.flac")
=> #<FlacInfo:0x19208 (STREAMINFO size=34 offset=8) (SEEKTABLE size=486
offset=46) (VORBIS_COMMENT size=235 offset=536) (PADDING size=4065
offset=775)>
irb(main):003:0> song.print_tags
ARTIST: 10cc
TRACKNUMBER: 01
DATE: 1978
vendor_tag: reference libFLAC 1.1.2 20050205
ALBUM: Bloody Tourists
TOTALTRACKS: 13
TITLE: Dreadlock Holiday
YEAR: 1978
GENRE: Rock
offset: 536
block_size: 235
COMMENT: High Quality, EAC secure, Lossless flac
=> nil
But instead I get:
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> gem 'flacinfo-rb'
=> true
irb(main):003:0> song = FlacInfo.new("dread.flac")
NameError: uninitialized constant FlacInfo
from (irb):3
--
Chris Carter
concentrationstudios.com
brynmawrcs.com
quoth the Daniel Jewett:
In article <200707121153.11612.bulliver@badcomputer.org>, darren kirby
> Hi Daniel,
>
> As the author of flacinfo, and as one who is not overly familiar with the
> inner workings of gems, would not overlook that this may be a problem
> with the gem itself. It does seem to work fine on the (Linux) system that
> I tested it on.
>
> Does your problem occur with all gems or just flacinfo?
>
> Thanks,
> -d
Hi Darren,
It did actually occur to me along the way that I should ask you about
this. 
I haven't had this problem with other gems that I know of. One thing I
wonder about is whether the gem is correctly placed during the install,
because I believe that 3rd-party gems are supposed to go under
site_ruby. (On my machine: /usr/local/lib/ruby/site_ruby/1.8)
Here's the install:
sudo gem install -r flacinfo-rb
Successfully installed flacinfo-rb-0.3
Installing ri documentation for flacinfo-rb-0.3...
File not found: lib
Which puts it here:
/usr/local/lib/ruby/gems/1.8/gems/flacinfo-rb-0.3
I can move flacinfo.rb to site_ruby/1.8 and everything works fine.
The odd thing is that on one machine (my Intel Mac), require 'flacinfo'
works without being moved, but on my desktop machine it doesn't.
And finally, the REAL problem is me making a mountain out of a molehill!
Nope. It's a bug...
Regards,
Dan J.
After a bit of poking around I can say this is certainly a problem with the
gem itself. In the latest version (0.3) I have forgotten to place the source
file itself in a 'lib' subdirectory as recommended by the 'Creating your own
gems' example in the pickaxe book.
I am going to build a 0.3.1 gem release which will address this bug (but not
change any functionality of the library itself) and will try to get it up on
Rubyforge in the next hour or so.
Thanks for bringing this to my attention 
-d
···
<bulliver@badcomputer.org> wrote:
--
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972
In article
<86987bdf0707121031p4268ce77v7b95cac792475a4b@mail.gmail.com>, Chris
> In article
> <86987bdf0707121014q884fa0dld5f91258a5d345e1@mail.gmail.com>, Chris
>
> > > In article
> > > <86987bdf0707120938r7121cb59o3404386a44758cf8@mail.gmail.com>, Chris
> > >
> > > > > Hello all,
> > > > >
> > > > > Here's the LOAD_PATH for my desktop:
> > > > > /usr/local/lib/ruby/site_ruby/1.8
> > > > > /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.10.0
> > > > > /usr/local/lib/ruby/site_ruby
> > > > > /usr/local/lib/ruby/1.8
> > > > > /usr/local/lib/ruby/1.8/powerpc-darwin8.10.0
> > > > > .
> > > > >
> > > > > Here's the LOAD_PATH for my laptop:
> > > > > /usr/local/lib/ruby/site_ruby/1.8
> > > > > /usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.9.1
> > > > > /usr/local/lib/ruby/site_ruby
> > > > > /usr/local/lib/ruby/1.8
> > > > > /usr/local/lib/ruby/1.8/i686-darwin8.9.1
> > > > > .
> > > > >
> > > > > Installed gem 'flacinfo-rb' and the path looks like this on both
> > > > > machines:
> > > > > /usr/local/lib/ruby/gems/1.8/gems/flacinfo-rb-0.3/flacinfo.rb
> > > > > (although I would have expected to find it here:
> > > > > /usr/local/lib/ruby/site_ruby/1.8/flacinfo.rb)
> > > > >
> > > > > On my laptop success with:
> > > > > irb(main):001:0> require 'flacinfo'
> > > > > => true
> > > > >
> > > > > On my desktop this:
> > > > > irb(main):001:0> require 'flacinfo'
> > > > > LoadError: no such file to load -- flacinfo
> > > > > from (irb):1:in `require'
> > > > > from (irb):1
> > > > >
> > > > > If I move the gem to site_ruby on my desktop, the load succeeds. My
> > > > > question is why the inconsistency?
> > > > > If the install location is incorrect why does require work on one
> > > > > machine and not the other?
> > > > >
> > > > > Here's the result of the install command on both machines:
> > > > > Successfully installed flacinfo-rb-0.3
> > > > > Installing ri documentation for flacinfo-rb-0.3...
> > > > > File not found: lib
> > > > >
> > > > > Is that last bit significant?
> > > > >
> > > > > Thanks for any info,
> > > > > Dan J.
> > > > >
> > > > >
> > > >
> > > >
> > > > You need to require 'rubygems' first. This probably isn't required
> > > > because you have RUBYOPT set on your desktop, but not your laptop
> > >
> > > Thanks Chris,
> > > I did try that...
> > >
> > > irb(main):001:0> require 'rubygems'
> > > => true
> > > irb(main):002:0> require 'flacinfo'
> > > LoadError: no such file to load -- flacinfo
> > > from
> > > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> > > `gem_original_require'
> > > from
> > > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> > > `require'
> > > from (irb):2
> > >
> > > This isn't necessarily a show stopper, because of course I can just
> > > move the library, but I'm trying to understand the process.
> > >
> > > Dan
> > >
> > >
> >
> > How about:
> > require 'rubygems'
> > require 'flacinfo-rb'
> >
> > ?
>
> Yeah, I tried that too. The load succeeds but then the methods fail:
> Should work like this:
>
> irb(main):001:0> require 'flacinfo'
> => true
> irb(main):002:0> song = FlacInfo.new("dread.flac")
> => #<FlacInfo:0x19208 (STREAMINFO size=34 offset=8) (SEEKTABLE size=486
> offset=46) (VORBIS_COMMENT size=235 offset=536) (PADDING size=4065
> offset=775)>
> irb(main):003:0> song.print_tags
> ARTIST: 10cc
> TRACKNUMBER: 01
> DATE: 1978
> vendor_tag: reference libFLAC 1.1.2 20050205
> ALBUM: Bloody Tourists
> TOTALTRACKS: 13
> TITLE: Dreadlock Holiday
> YEAR: 1978
> GENRE: Rock
> offset: 536
> block_size: 235
> COMMENT: High Quality, EAC secure, Lossless flac
> => nil
>
> But instead I get:
>
> irb(main):001:0> require 'rubygems'
> => true
> irb(main):002:0> gem 'flacinfo-rb'
> => true
> irb(main):003:0> song = FlacInfo.new("dread.flac")
> NameError: uninitialized constant FlacInfo
> from (irb):3
>
>
require 'flacinfo' (or 'flacinfo-rb') after the gem line. 'gem' just
activates the gem, you still need to require it.
Alas, no joy.
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> gem 'flacinfo-rb'
=> true
irb(main):003:0> require 'flacinfo'
LoadError: no such file to load -- flacinfo
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
same result for require 'flacinfo-rb'
Weird. Last night I did a near clean install of ruby, et al. on both
machines to try and narrow down the possibilities. Didn't seem to make
a difference. My MacBook Pro doesn't care if flacinfo.rb is under
site_ruby but my destop does. ??
Thanks again for your help.
Dan J.
···
Carter <cdcarter@gmail.com> wrote:
On 7/12/07, Daniel Jewett <dan@solidether.net> wrote:
> Carter <cdcarter@gmail.com> wrote:
> > On 7/12/07, Daniel Jewett <dan@solidether.net> wrote:
> > > Carter <cdcarter@gmail.com> wrote:
> > > > On 7/12/07, Daniel Jewett <dan@solidether.net> wrote:
In article <200707121306.09308.bulliver@badcomputer.org>, darren kirby
···
<bulliver@badcomputer.org> wrote:
Thanks for bringing this to my attention 
Darren, I'm glad I helped (if rather unwittingly). I'll look for the
new version.
Dan J.
On 7/12/07, Daniel Jewett <dan@solidether.net> wrote:My MacBook Pro
doesn't care if flacinfo.rb is under
site_ruby but my destop does. ??
Thanks again for your help.
Dan J.
This is a long shot, but is there a significant difference between the
environment variables on each OSX installation?
In article
<eaeff8c10707121111r36321e67o66a3e288dfb2e58c@mail.gmail.com>, Todd
···
Benson <caduceass@gmail.com> wrote:
This is a long shot, but is there a significant difference between the
environment variables on each OSX installation?
They are identical.