How to set library path for FileUtils

M

Mark Macdonald

What is the correct way to set library paths to remove this error when
using FileUtils?

'require': no such file to load -- FileUtils (LoadError)

-----------------------------

Here is the environment listing:

ruby1.9.1 -e "puts $:"
/var/lib/gems/1.9.1/gems/kramdown-0.10.0/bin
/var/lib/gems/1.9.1/gems/kramdown-0.10.0/lib
/usr/local/lib/site_ruby/1.9.1
/usr/local/lib/site_ruby/1.9.1/i486-linux
/usr/local/lib/site_ruby
/usr/lib/ruby/vendor_ruby/1.9.1
/usr/lib/ruby/vendor_ruby/1.9.1/i486-linux
/usr/lib/ruby/vendor_ruby
/usr/lib/ruby/1.9.1
/usr/lib/ruby/1.9.1/i486-linux
 
R

Robert Klemme

2010/8/19 Mark Macdonald said:
What is the correct way to set library paths to remove this error when
using FileUtils?

Normally there should be no change necessary since it's part of the std lib.
'require': no such file to load -- FileUtils (LoadError)

-----------------------------

Here is the environment listing:

ruby1.9.1 -e "puts $:"
/var/lib/gems/1.9.1/gems/kramdown-0.10.0/bin
/var/lib/gems/1.9.1/gems/kramdown-0.10.0/lib
/usr/local/lib/site_ruby/1.9.1
/usr/local/lib/site_ruby/1.9.1/i486-linux
/usr/local/lib/site_ruby
/usr/lib/ruby/vendor_ruby/1.9.1
/usr/lib/ruby/vendor_ruby/1.9.1/i486-linux
/usr/lib/ruby/vendor_ruby
/usr/lib/ruby/1.9.1
/usr/lib/ruby/1.9.1/i486-linux
.

??? That should not happen. Since /usr/lib/ruby/1.9.1 is in $: it
must be found. How exactly do you require?

Kind regards

robert
 
X

Xavier Noria

What is the correct way to set library paths to remove this error when
using FileUtils?

'require': no such file to load -- FileUtils (LoadError)

Use:

require 'fileutils'

The FileUtils module is defined in the "fileutils.rb" file, hence the lowercase.

-- fxn
 
M

Mark Macdonald

Xavier said:
require 'fileutils'

The FileUtils module is defined in the "fileutils.rb" file, hence the
lowercase.

Thank you - this was the problem. Uppercase works on my Windows
installation of Ruby, hence the confusion.
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top