Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Rutger Swarts
RE: hello.rb not working for me [ reply ]  
2005-10-29 20:54
Hi,

Great news, thanks a lot. The samples now mount without error, altough the processes do not exit after umount. This is no problem for me, but if it needs fixing, tell me what information you need.

Thanks a lot (again).

By: Greg Millam
RE: hello.rb not working for me [ reply ]  
2005-10-29 07:54
Hi, you two! FuseFS 0.5 has been released, which (I think) fixes this issue! Thanks for your help with it, and let me know if FuseFS 0.5 does the trick or not.

By: Ron Peterson
RE: hello.rb not working for me [ reply ]  
2005-10-27 12:15
Greg Milliam figured this out. Apparently the fuse API changed a bit in
the latest version (you are using the latest fuse?). I went back to a
previous fuse version, and then everything worked.

By: Rutger Swarts
RE: hello.rb not working for me [ reply ]  
2005-10-27 01:26
I am having this exact same probem. fuse's examples work, but all the examples in the sample directory produce:

# ruby /usr/share/doc/fusefs-0.4/sample/hello.rb tmp/
fusermount: mount failed: Invalid argument
/usr/lib/ruby/site_ruby/1.8/fusefs.rb:13:in `for_fd': no implicit conversion from nil to integer (TypeError)
from /usr/lib/ruby/site_ruby/1.8/fusefs.rb:13:in `run'
from /usr/share/doc/fusefs-0.4/sample/hello.rb:20

I've poked around in it a bit, but my understanding of C is very limited and I don't get any closer to a solution... Any help would be greatly appreciated.

By: Greg Millam
RE: hello.rb not working for me [ reply ]  
2005-10-04 22:48
I meant it *does* work for me.

I'm typing: (hello.rb is the file you pasted earlier)

$ mkdir test
$ ruby hello.rb test &
[1] 13523
$ ls test
hello.txt
$ cat test/hello.txt
Hello, World!

Can you email me the exact file as it is now?

rubyforge@deafcode.com />
Thanks

By: Ron Peterson
RE: hello.rb not working for me [ reply ]  
2005-10-04 22:39
OK, well, I'm glad I'm not just crazy. Err... Well I guess we haven't proved that yet..

Anyway, printing ARGV[0]

1017$ ./hello.rb /mnt/test
fusermount: mount failed: Invalid argument
/usr/local/lib/site_ruby/1.8/fusefs.rb:13:in `for_fd': no implicit conversion from nil to integer (TypeError)
from /usr/local/lib/site_ruby/1.8/fusefs.rb:13:in `run'
from ./hello.rb:21
/mnt/test <======= looks OK.

By: Greg Millam
RE: hello.rb not working for me [ reply ]  
2005-10-04 22:23
This does look odd, and it works for me as well.

Try printing out ARGV[0] to make sure it's what you think it is? I don't see any reason it would be anything other than the first arg you pass (/mnt/tmp) unless you're calling this in some other way.

By: Ron Peterson
RE: hello.rb not working for me [ reply ]  
2005-10-04 22:05
Hi Greg,

(1) /mnt/test is a directory.
1004$ ls -ld /mnt/test |drwxrwxr-x 2 root rpeterso 4096 2005-10-04 15:28 /mnt/test/

(2) /mnt/test isn't mounted. I did 'fusermount -u /mnt/test' also.

1006$ grep test /etc/mtab | wc
0 0 0

(3) fuse module is loaded. (I first statically linked fuse into the kernel, and got a module missing error.)
1007$ lsmod | grep fuse
fuse 29196 0

(4) Vitals
Pentium4 (Dell Latitude C840)
Debian Sarge
Tried FUSE 2.4 (from source) and Sarge's fuse-utils and libfuse2 packages (2.2.1). Since they both behaved the same, I'm back to 2.4 from source.
FuseFS 0.4
Ruby 1.8.2

I just ran the 'hello' example in the fuse source distribution's examples directory as me, on directory /mnt/test, and it worked o.k.

Here's my exact hello.rb. Are there any ruby library dependancies I might be missing? I don't have the whole kit-n-kaboodle installed. I'd think that would throw a different kind of error, though.

(I've done this w/out inheriting from FuseFS::FuseDir also, per the shipped example..)

Best.

#!/usr/bin/env ruby

require 'fusefs'

class HelloDir < FuseFS::FuseDir
def contents(path)
['hello.txt']
end
def file?(path)
path == '/hello.txt'
end
def read_file(path)
"Hello, World!\n"
end
end

root = HelloDir.new
FuseFS.set_root(root)
FuseFS.mount_under(ARGV[0])
FuseFS.run


By: Greg Millam
RE: hello.rb not working for me [ reply ]  
2005-10-04 21:28
Some ideas from what's caused this in the past:

1) Make sure /mnt/test is a directory

2) Is /mnt/test is already mounted? If you ran a fusefs script on it earlier and killed it such that it couldn't unmount itself, your system likely still thinks it's mounted. Try running: "fusermount -u /mnt/test" to unmount it.

3) Is the 'fuse' module loaded in the kernel? FUSE consists of two portions: the kernel module and the library. FuseFS uses the library (-lfuse) and requires the kernel module to be insmod'd

4) Failing all of the above: What CPU (x86, amd?), Linux distro, FUSE, FuseFS and Ruby versions do you have?

Hope that helps,

- Greg

By: Ron Peterson
hello.rb not working for me [ reply ]  
2005-10-04 20:10
Hi,

FuseFS looks very cool. I've installed 0.4 on debian sarge. I'm running linux 2.6.14-rc3.

When I run hello.rb, I get the following error:

999$ ./hello.rb /mnt/test
fusermount: mount failed: Invalid argument
/usr/local/lib/site_ruby/1.8/fusefs.rb:13:in `for_fd': no implicit conversion from nil to integer (TypeError)
from /usr/local/lib/site_ruby/1.8/fusefs.rb:13:in `run'
from ./hello.rb:21

(yeesh, line wraps might look horrible...)

I've tried running as root, and as myself. I have permissions to write to the mountpoint. I don't have nosuid on the filesystem where fusermount lives, or anything like that.

Any ideas? TIA.