[Rubygems-developers] Issues, some Windows related:

Austin Ziegler halostatue at gmail.com
Mon Oct 25 10:31:01 EDT 2004


On Mon, 25 Oct 2004 08:19:01 -0400, Jim Weirich
<jim at weirichhouse.org> wrote:
> On Saturday 23 October 2004 09:43 am, Austin Ziegler wrote:
>> 1. Curses. Can we look at adding an ability to check for specific
>>prerequisites that are NOT gems? [...] Thus, when I install
>>'diakonos', I  get:
>> C:\home\Projects\[releases]\diff-lcs> gem install diakonos
>[... some output elided ...]
>> File not found:
>> [Note: I don't know what file it couldn't find.]
> Actually, this error message isn't related to the use of curses.
> AFAICT, diakonos is incorrectly packaged. The gem spec lists
> 'bin/diakonos' as an installable executable, but there is no bin
> directory in the gem package. I suspect that is the reason for the
> (rather unhelpful) "File not found" message. I looked around for
> the code that produces the error (so I can at least add the file
> name to the message), but wasn't able to find it. I'll look deeper
> later.

That may be for the "file not found", but ... 

  c:/Apps/Ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
  `require__': No such file to load -- curses (LoadError)

This is from typing "diakonos". So *something* gets installed, and
it fails when looking for curses (not installed on Windows, by
default).

> But addressing your question of the ability to check for non-gem
> dependencies, I'm not sure how to do that in a non-platform
> specific way. Any suggestions?

Well, I'm not necessarily referring to looking for non-Ruby
dependencies (e.g., GraphViz). I'm referring to looking for Ruby
dependencies (either .so or .rb). Something like this would be
sufficient:

  spec.depends_on = %w(curses rdoc/simple/markup)

Each of these would, in turn, be required to make sure that it's
present. If it isn't present, then the install fails. This could be
backed up with #optional_dependencies (see next paragraph) so that
these things could be downloaded if they are gemified.

Speaking of dependencies, I have a couple of issues. First, I want
to visit the "optional" dependencies I brought up. A good example is
Text::Format, which may use TeX::Hyphen -- but doesn't require it.
Is this in the works? Because I want to do something like:

  spec.optional_dependencies = %w(TeX::Hyphen)

Then, I'll be asked if I want to install optional dependencies.

Second, why are you asking me if I want to install the required
dependencies? Why are you asking me if I want to install each and
every one? If I'm installing foo, that requires bar and baz, then I
shouldn't have a choice as to whether I'm installing bar and baz --
I need them to run foo!

If I am going to be asked -- and again, I'm not sure that I should
be -- I should be asked like:

  Dependencies: bar, baz
  Optional Dependencies: blix, blox

  Do you wish to install required dependencies? (Yes/no/ask)
    [ yes: all required dependencies are installed
      no:  stop the install, roll back
      ask: ask for each required dependency ]
  Do you wish to install optional dependencies? (Yes/no/ask)
  
If you're asking because someone might have it installed otherwise,
I'm not sure that this is a good idea. Maybe, maybe not.

>> 3. Compiles. [... on Windows ...]
> Actually, I have a need to setup a ruby compile environment on my
> windows box at work. I'm hoping someone can help me. I am
> completely at a loss on compiling C extension on that platform.
> Anybody got pointers?

Well, if you're using the VisualStudio environment, then you have to
make sure you start your command-line using the "VisualStudio .NET
2003 Command Prompt". Then, most things that are prepared in a
cross-platform way -- including a couple of RPA packages and Gems
that I've installed -- will compile just fine. There are issues if
third-party libraries are required (e.g., libbz2 for "bz2"), but
that's probably an extension setup problem more than a packaging
issue.

-austin
-- 
Austin Ziegler * halostatue at gmail.com
               * Alternate: austin at halostatue.ca
: as of this email, I have [ 5 ] Gmail invitations


More information about the Rubygems-developers mailing list