Welcome Guest | Login

no such file to load -- FileUtils

Hi,
I'm having an issue when I put my site up in production. I have a controller with the line

require 'FileUtils'

This works fine in my dev env, but up on HostingRails, I get the error

no such file to load -- FileUtils

Isn't FileUtils part of the ruby/rails core?  Or am I missing something?

Any ideas?

Thanks

2008-11-11 06:06 PM

Hi Jim, just a syntax issue here - try all lowercase

irb(main):001:0> require 'fileutils'
=> true
irb(main):002:0>

2008-11-11 10:49 PM

I made the change to the controller file and did a "killall dispatch.fcgi".  I'm still getting the same error.  I checked the controller file on the server with "vi" to make sure that it uploaded properly, and it did.  

So I tried "killall -umyusername dispatch.fcgi" and "killall -9 dispatch.fcgi".

It seems like something is still cached somewhere, as the error still references 'FileUtils' instead of 'fileutils'.  Is there something I'm missing here?

As an aside, the fastcgi.crash.log file shows that the last time the fastcgi was restarted was over 24 hours ago, even though I've done numerous killalls since then.  Is this not the correct log to monitor this?


Thanks

2008-11-12 06:18 AM

Hi Jim, the fastcgi crash log usually doesn't say anything useful.  If FastCGI is running and you do "killall -9 dispatch.fcgi" twice - the second time you should see at the bottom "no processes killed"

Do you have that include in a controller or method somewhere?  Where in your app are you using FileUtils methods?  

2008-11-12 10:32 AM

The include is in a controller (in the members_controller.rb to be exact).  This is the only place in the app that uses FileUtils.  I'll have to try the killall 2x later tonight (I'm behind a firewall and proxy atm, so can't get in through putty).

Thanks

2008-11-12 12:15 PM

Ok - let me know how that goes. Can you just use the Dir methods in that controller to accomplish the same thing?  

2008-11-12 06:30 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.