1
在我的主應用程序文件(tinyclone.rb)的頂部,Sinatra應用程序中,此散列用於需要幾個寶石和一個文件的髒語。 RB「。髒字文件與tinyclone.rb文件位於同一目錄中。Ruby:與主應用程序文件不在IRB中加載的文件位於同一目錄中
%w(rubygems data_mapper sinatra haml dm-core dm-timestamps dm-types uri restclient xmlsimple dirty_words).each { |lib| require lib}
當我加載IRB
require '/Users/mm/sites/cloning/tinyclone.rb'
的tinyclone.rb文件加載所有這些文件/寶石中的散列,除了dirty_words文件
cannot load such file -- dirty_words
from /Users/mm/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/mm/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/mm/sites/cloning/tinyclone.rb:1:in `block in <top (required)>'
from /Users/mm/sites/cloning/tinyclone.rb:1:in `each'
from /Users/mm/sites/cloning/tinyclone.rb:1:in `<top (required)>'
from /Users/mm/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/mm/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from (irb):1
from /Users/mm/.rvm/rubies/ruby-1.9.3-rc1/bin/irb:16:in `<main>'
能
人解釋爲什麼這一個文件不被正確使用?