# Cannot run file.mount\_enclosing\_volume with arguments

**URL:** <https://www.ruby-forum.com/t/cannot-run-file-mount-enclosing-volume-with-arguments/211644>\
**Category:** Ruby-Gnome 2\
**Created:** [September 9, 2011, 4:46pm UTC](https://www.ruby-forum.com/t/cannot-run-file-mount-enclosing-volume-with-arguments/211644 "2011-09-09T16:46:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [September 9, 2011, 4:46pm UTC](https://www.ruby-forum.com/t/cannot-run-file-mount-enclosing-volume-with-arguments/211644/1 "2011-09-09T16:46:15Z")

</div>

Hello,

Whenever I run something like

file.mount\_enclosing\_volume 0, mop

I get

Exception `TypeError’ at gfselect.rb:53 - GMountMountFlags is not a  
GFlags

passing in the GLib ‘NONE’ constant does not make any difference.

Any solution?

ii gvfs-bin 1.8.2-1smbdom1 userspace  
virtual filesystem - binaries  
gio2 (1.0.0)

Thanks

Michal

$ irb  
irb(main):001:0\> remote = GLib::File.new\_for\_commandline\_arg  
“smb://server/share”  
=\> #\<#Class:0x7fd2d20abea8:0x7fd2d20abca0 ptr=0x11e2e70\>  
irb(main):002:0\> remote.mount\_enclosing\_volume  
=\> #\<#Class:0x7fd2d20abea8:0x7fd2d20abca0 ptr=0x11e2e70\>  
irb(main):003:0\> remote.mount\_enclosing\_volume  
=\> #\<#Class:0x7fd2d20abea8:0x7fd2d20abca0 ptr=0x11e2e70\>  
irb(main):004:0\> remote.mount\_enclosing\_volume 0  
TypeError: GMountMountFlags is not a GFlags  
from (irb):4:in `mount_enclosing_volume' from (irb):4 irb(main):005:0> remote.mount_enclosing_volume GLib::Mount::MOUNT_NONE TypeError: GMountMountFlags is not a GFlags from (irb):5:in`mount\_enclosing\_volume’  
from (irb):5

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [September 10, 2011, 2:21pm UTC](https://www.ruby-forum.com/t/cannot-run-file-mount-enclosing-volume-with-arguments/211644/2 "2011-09-10T14:21:11Z")

</div>

On Fri, Sep 9, 2011 at 16:45, Michal S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> irb(main):005:0\> remote.mount\_enclosing\_volume GLib::Mount::MOUNT\_NONE  
> TypeError: GMountMountFlags is not a GFlags  
> from (irb):5:in `mount\_enclosing\_volume’  
> from (irb):5

This has been fixed in SVN.

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [September 10, 2011, 3:38pm UTC](https://www.ruby-forum.com/t/cannot-run-file-mount-enclosing-volume-with-arguments/211644/3 "2011-09-10T15:38:30Z")

</div>

On 9 September 2011 16:45, Michal S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> passing in the GLib ‘NONE’ constant does not make any difference.

I don’t understand.

Why is GMountMountFlags not a GFlags but GFIleQueryInfoFlags is?

Where is that defined?

```
    G_DEF_CLASS(G_TYPE_MOUNT_MOUNT_FLAGS, "MountFlags", mount);
    G_DEF_CONSTANTS(mount, G_TYPE_MOUNT_MOUNT_FLAGS, "G_MOUNT_");

```

#define RVAL2GMOUNTMOUNTFLAGS(value)   
RVAL2GFLAGS((value), G\_TYPE\_MOUNT\_MOUNT\_FLAGS)  
#define RVAL2GMOUNTMOUNTFLAGSDEFAULT(value)   
RVAL2TYPE\_WITH\_DEFAULT((value),   
RVAL2GMOUNTMOUNTFLAGS,   
G\_MOUNT\_MOUNT\_NONE)

```
    G_DEF_CLASS(G_TYPE_FILE_QUERY_INFO_FLAGS, "QueryInfoFlags", 

```

file);  
G\_DEF\_CONSTANTS(file, G\_TYPE\_FILE\_QUERY\_INFO\_FLAGS, “G\_FILE\_”);  
#define RVAL2GFILEMONITORFLAGSDEFAULT(value)   
RVAL2TYPE\_WITH\_DEFAULT((value),   
RVAL2GFILEMONITORFLAGS,   
G\_FILE\_MONITOR\_NONE)

#define RVAL2GFILEQUERYINFOFLAGS(value)   
RVAL2GFLAGS((value), G\_TYPE\_FILE\_QUERY\_INFO\_FLAGS)

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [September 10, 2011, 3:40pm UTC](https://www.ruby-forum.com/t/cannot-run-file-mount-enclosing-volume-with-arguments/211644/4 "2011-09-10T15:40:22Z")

</div>

On 10 September 2011 14:20, Nikolai W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Fri, Sep 9, 2011 at 16:45, Michal S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > irb(main):005:0\> remote.mount\_enclosing\_volume GLib::Mount::MOUNT\_NONE  
> > TypeError: GMountMountFlags is not a GFlags  
> > from (irb):5:in `mount\_enclosing\_volume’  
> > from (irb):5
> 
> This has been fixed in SVN.

Oh, now I can see I guess 😉

Thanks

Michal

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [September 10, 2011, 4:40pm UTC](https://www.ruby-forum.com/t/cannot-run-file-mount-enclosing-volume-with-arguments/211644/5 "2011-09-10T16:40:21Z")

</div>

On Sat, Sep 10, 2011 at 15:37, Michal S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I don’t understand.
> 
> Why is GMountMountFlags not a GFlags but GFIleQueryInfoFlags is?
> 
> Where is that defined?

Yeah, I know. It’s an unfortunate naming, I think. Perhaps this will  
change once GMountMountFlags gains flags beyond NONE.
