Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Problem with building gem, require path
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Daniel Berger  
View profile  
 More options Jun 3 2005, 9:26 pm
Newsgroups: comp.lang.ruby
From: "Daniel Berger" <djber...@gmail.com>
Date: 3 Jun 2005 18:26:21 -0700
Local: Fri, Jun 3 2005 9:26 pm
Subject: Problem with building gem, require path
Hi all,

Windows XP
Ruby 1.8.2

I'm having a bit of trouble building a proper gem for one of the
Win32Utils packages (win32-ipc).  This is a C extension.  Everything
appears to be fine, except that it installs the shared library (.so)
under "lib", instead of "lib/win32".  I've set the Gem#required_paths,
so I'm not sure what I'm doing wrong.

Here is the spec:

require "rubygems"

spec = Gem::Specification.new do |gem|
        gem.name         = "win32-ipc"
        gem.version      = "0.4.1"
        gem.author       = "Daniel J. Berger"
        gem.email        = "djber...@gmail.com"
        gem.homepage     = "http://www.rubyforge.org/projects/win32utils"
        gem.platform     = Gem::Platform::WIN32
        gem.summary      = "A base class for Win32 synchronization objects."
        gem.require_paths << "lib/win32"
        gem.test_file    = "test/tc_ipc.rb"
        gem.has_rdoc     = true
        gem.extra_rdoc_files  = ["CHANGES","README"]
        gem.extensions        = ["extconf.rb"]
        gem.rubyforge_project = "win32utils"

        files = Dir["doc/*"] + Dir["examples/*"] + Dir["lib/win32/*"]
        files += Dir["test/*"] + Dir["[A-Z]*"]
        files.delete_if{ |item| item.include?("CVS") }
        gem.files = files
end

if $0 == __FILE__
        Gem.manage_gems
        Gem::Builder.new(spec).build
end

The result is ipc.so installed under
c:/ruby/lib/ruby/gems/1.8/gems/win32-ipc-0.4.1-mswin32/lib instead of
the desired
c:/ruby/lib/ruby/gems/1.8/gems/win32-ipc-0.4.1-mswin32/lib/win32.

Any ideas?  I've tried a few things for 'required_libs' without
success.

Regards,

Dan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stefan Achatz  
View profile  
 More options Jun 5 2005, 3:05 pm
Newsgroups: comp.lang.ruby
From: Stefan Achatz <era...@mitochondrien.de>
Date: Sun, 05 Jun 2005 21:05:23 +0200
Local: Sun, Jun 5 2005 3:05 pm
Subject: Re: Problem with building gem, require path

Daniel Berger wrote:
> I'm having a bit of trouble building a proper gem for one of the
> Win32Utils packages (win32-ipc).  This is a C extension.  Everything
> appears to be fine, except that it installs the shared library (.so)
> under "lib", instead of "lib/win32".  I've set the Gem#required_paths,
> so I'm not sure what I'm doing wrong.
> gem.require_paths << "lib/win32"

Hello,

i found that rubygems copies the libraries in the first require_path,
regardless which path stands in the mkmf create_makefile command. Thats
because installer.rb of rubygems overrides the RUBYARCHDIR and RUBYLIBDIR
variables of the resulting Makefile not considering the target_prefix.
I think its meant to require all files with the autorequire, so the actual
location of the library doesn't matter.
Try gem.require_paths = ['lib/win32','.'] or something to make sure your
desired path is in front or nevermind at all.
I mentioned the use of target_prefix in the Makefile on
Rubygems-developers-mailinglist, but nobody seems to notice.
Stefan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »