Since RubyGems is throwing the error and not Facets I'm not sure what
the cause is. Have you tried 'gem update --system' to update to the
lastest RubyGems version?
Brian, am I right to guess that you are running Windows? Looks like
Facets has files called, for example, "empty?.rb", which is not valid
on Windows. I don't know of a way that you can get Facets to run on
Windows if that's the case, but perhaps its author has prior
experience making it work.
···
On 4/18/05, Brian Buckley <briankbuckley@gmail.com> wrote:
Hello,
I am getting an error when I attempt to install the "facets" gem. When I
enter
gem install facets
I get the following error message:
ERROR: While executing gem ... (Errno::EINVAL)
Invalid argument - llib/facet/nil/empty?
Are others seeing this (or am I guilty of user error)?
Since RubyGems is throwing the error and not Facets I'm not sure what
the cause is. Have you tried 'gem update --system' to update to the
lastest RubyGems version?
I have the most current RubyGems and I have the same message installing Facets.
Ah. Thanks Chad. That was what I was starting to conclude myself.
I've tried to keep the file name as close as reasonably possible to the
main method name(s) of the facet. But I know that RDoc via Rake also
chokes on a couple of the names. I think that all modern file systems
now allow fully arbitrary file names (Although there may yet be some
limitations on this I am unaware of.). So the appearent reason is that
quotes aren't being used by programs when they shell out commands. For
instance, the invalid argument above should probably be:
I think that all modern file systems
now allow fully arbitrary file names (Although there may yet be some
limitations on this I am unaware of.).
If that is the case, Windows XP still lacks a modern OS. Several characters are forbidden, among them the question mark, asterisk and colon. Some of the restrictions are in NTFS and the kernel, some are part of the Win32 API subsystem.
Windows filesystems do NOT allow a long series of characters
(/:?\<>).
Anyone who names a *file* with a question mark or an asterisk should
simply be shot.
As should anyone who has both a README and a Readme or a Makefile
and a makefile.
-austin
···
On 4/18/05, Trans <transfire@gmail.com> wrote:
Ah. Thanks Chad. That was what I was starting to conclude myself.
I've tried to keep the file name as close as reasonably possible
to the main method name(s) of the facet. But I know that RDoc via
Rake also chokes on a couple of the names. I think that all modern
file systems now allow fully arbitrary file names (Although there
may yet be some limitations on this I am unaware of.). So the
appearent reason is that quotes aren't being used by programs when
they shell out commands. For instance, the invalid argument above
should probably be:
Anyone who names a *file* with a question mark or an asterisk should
simply be shot.
Sorry Austin, but that's just a completely asinine statement. First of
all, some might say such things about method names too! --which is what
these file names are based on. Secondly, let's back up a couple decades
and try statements like, "Anyone who names a *file* with more then 8
characters should simply be shot." You may think of filenames as
nothing more the special grepable_computer_ id keys, but the reality is
_people_ have to use them to give documents recognizable names. But
alas as far as I'm concerned we're still in the dark ages when it comes
to managing our data. Why it's not stored in RDBMS yet is beyond me.
Anyhow, this is taking us away from the real issue.
Thanks for the info on the limitations of Window's filenames. I did not
realize they still existed.
So now I have to change the file names. Great! Well, I'll let you all
know when the fixes are uploaded.
At least for the cases of foo?-type methods I'd suggest the Schemish convention of the -p suffix ('p' here stands for predicate), e.g., foo? => foo-p. It should work on all platforms and reflects the heritage of Ruby method names such as using the bang (exclamation mark) suffix for mutators.
Thanks Binkley. I'm working on a solution now. So you're suggesting I
use '-p' for '?' and '-x' for '!', I take it? I'm debating either that
or just dropping the '?' and '!' from the file name altogether. I
figure if there are multiple methods of the sort #x and #x? they ought
to be related enough to coexit in the same "atomic" facet file.
The other one I'm not sure about is '[].rb'. Windows does accept this
as a valid file name, but I worry perhaps some other systems may choke
on it. I'm just not sure what to rename it.
Thanks Binkley. I'm working on a solution now. So you're suggesting I
use '-p' for '?' and '-x' for '!', I take it? I'm debating either that
AFAICT the exclamation point is actually ok for filesystems. It's the question mark which draws trouble, curled in a cipher as it is. So my suggestion, pending validation on all Ruby platforms, is:
Of course, a more general and possibly practical suggestion rather than a table of special cases is to translate punctuation marks into their ASCII value:
foo! => foo-21.rb
foo? => foo-3f.rb
=> -5b-5d.rb
Or some similar scheme with a suitable escape marking character (yes, using the minus sign is kind of lame). But I might be drifting in the land of excess engineering.
Or some similar scheme with a suitable escape marking character (yes, using the minus sign is kind of lame). But I might be drifting in the land of excess engineering.
That only works if you don't see any problems telling people that if they want the redefined methods then they need to type