G
Gudni Hilmarsson
Hi..
I am trying to get IRb to load a file. I am running a fresh install of
Mac OS X Leopard and I have updated my gems and RubyGems. Below is the
Class file ( From the Pickaxe and saved under /Users/gudni/Song.rb ) and
the results from my previous attempts.
Attempt 1:
--> LoadError: no such file to load -- /Users/gudni/Song.rb
from (irb):3:in `load'
from (irb):3
Attempt 2:
-->LoadError: no such file to load -- /Users/gudni/Song.rb
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `require'
from (irb):5
I can't get it to work. According to the pickaxe it should be enough to
give the full path to the file, but it doesn't seem to work for me. Any
help would be much appreciated
P.S. Happy holidays
class Song
def initialize(name, artist, duration)
@name = name
@artist = artist
@duration = duration
end
def to_s
"Song: #@name--#@artist (#@duration)"
end
end
Content of my $:
/Library/Ruby/Gems/1.8/gems/wirble-0.1.2/bin
/Library/Ruby/Gems/1.8/gems/wirble-0.1.2/.
/Library/Ruby/Site/1.8
/Library/Ruby/Site/1.8/powerpc-darwin9.0
/Library/Ruby/Site/1.8/universal-darwin9.0
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/powerpc-darwin9.0
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0
I am trying to get IRb to load a file. I am running a fresh install of
Mac OS X Leopard and I have updated my gems and RubyGems. Below is the
Class file ( From the Pickaxe and saved under /Users/gudni/Song.rb ) and
the results from my previous attempts.
Attempt 1:
--> LoadError: no such file to load -- /Users/gudni/Song.rb
from (irb):3:in `load'
from (irb):3
Attempt 2:
-->LoadError: no such file to load -- /Users/gudni/Song.rb
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `require'
from (irb):5
I can't get it to work. According to the pickaxe it should be enough to
give the full path to the file, but it doesn't seem to work for me. Any
help would be much appreciated
P.S. Happy holidays
class Song
def initialize(name, artist, duration)
@name = name
@artist = artist
@duration = duration
end
def to_s
"Song: #@name--#@artist (#@duration)"
end
end
Content of my $:
/Library/Ruby/Gems/1.8/gems/wirble-0.1.2/bin
/Library/Ruby/Gems/1.8/gems/wirble-0.1.2/.
/Library/Ruby/Site/1.8
/Library/Ruby/Site/1.8/powerpc-darwin9.0
/Library/Ruby/Site/1.8/universal-darwin9.0
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/powerpc-darwin9.0
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0