win32utils-devel@rubyforge.org
2004-Nov-04 14:51 UTC
[Win32utils-devel] Attempt to build a gemspec
Hi all, I''m trying to build a gemspec for win32-ipc, using a precompiled binary. Here''s my gemspec file: #win32-ipc.gemspec require "rubygems" spec = Gem::Specification.new do |s| s.name = "win32-ipc" s.version = "0.3.1" s.platform = Gem::Platform::WIN32 s.summary = "A base class for Win32 synchronization objects." s.files = ["ipc.so"] s.require_path = "." s.autorequire = "win32/ipc" s.has_rdoc = true s.extra_rdoc_files = ["README","CHANGES"] opts = ''-S --title A base class for Win32 synchronization objects.'' opts << '' --main README'' s.rdoc_options = opts s.test_files = Dir.glob("test/tc_*.rb") s.author = "Daniel J. Berger" s.email = "djberg96@yahoo.com" s.homepage = "http://www.rubyforge.org/projects/win32utils" end if $0 == __FILE__ Gem.manage_gems Gem::Builder.new(spec).build end It seems to build fine. When I run ''gem install'' however, I get this: C:\eclipse\workspace\win32-ipc>gem install win32-ipc-0.3.1-mswin32.gem Attempting local installation of ''win32-ipc-0.3.1-mswin32.gem'' Successfully installed win32-ipc, version 0.3.1 Installing RDoc documentation for win32-ipc-0.3.1-mswin32... ERROR: While executing gem ... (TypeError) cannot convert Array into String It does seem to install under the ruby/gems directory, though. But, if I try to do "require ''win32/ipc''", it says it can''t find it. What am I doing wrong? Regards, Dan
win32utils-devel@rubyforge.org
2004-Nov-04 19:37 UTC
[Win32utils-devel] Attempt to build a gemspec
Hi Dan, Try this:> s.require_path = "." > ><snip> s.require_path = "lib" <snip>>But, if I try to do "require ''win32/ipc''", it says it can''t find it. > > >require ''rubygems'' require_gem ''win32-ipc''>What am I doing wrong? >Regards, > >HTH,>Dan > >-- shanko
win32utils-devel@rubyforge.org
2004-Nov-04 20:00 UTC
[Win32utils-devel] Attempt to build a gemspec
Forgot one more thing: win32utils-devel@rubyforge.org wrote:> s.rdoc_options = opts > >s.rdoc_options = [opts]> s.test_files = Dir.glob("test/tc_*.rb") > > s.author = "Daniel J. Berger" > s.email = "djberg96@yahoo.com" > s.homepage = "http://www.rubyforge.org/projects/win32utils" > >end > >if $0 == __FILE__ > Gem.manage_gems > Gem::Builder.new(spec).build >end > >It seems to build fine. When I run ''gem install'' however, I get this: > >C:\eclipse\workspace\win32-ipc>gem install win32-ipc-0.3.1-mswin32.gem >Attempting local installation of ''win32-ipc-0.3.1-mswin32.gem'' >Successfully installed win32-ipc, version 0.3.1 >Installing RDoc documentation for win32-ipc-0.3.1-mswin32... >ERROR: While executing gem ... (TypeError) > cannot convert Array into String > >It does seem to install under the ruby/gems directory, though. > >But, if I try to do "require ''win32/ipc''", it says it can''t find it. > >What am I doing wrong? > >Regards, > >Dan > >_______________________________________________ >win32utils-devel mailing list >win32utils-devel@rubyforge.org >http://rubyforge.org/mailman/listinfo/win32utils-devel > > >
win32utils-devel@rubyforge.org
2004-Nov-05 10:01 UTC
[Win32utils-devel] Attempt to build a gemspec
Ok, we''re getting further.> >But, if I try to do "require ''win32/ipc''", it says it can''t find it. > > > > > > > require ''rubygems'' > require_gem ''win32-ipc''First, I thought you didn''t have to do this with gems unless you wanted a specific version. Second, I''m still doing something wrong. When I tried that I got: irb(main):003:0> require_gem "win32-ipc" LoadError: No such file to load -- win32/ipc from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `r equire__'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `r equire'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:148:in `activate'' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:34:in `require_gem'' from (irb):3 Below is the current gemspec (slightly simplified since my last post) require "rubygems" spec = Gem::Specification.new do |s| s.name = "win32-ipc" s.version = "0.3.1" s.platform = Gem::Platform::WIN32 s.summary = "A base class for Win32 synchronization objects." s.files = ["ipc.so","lib/win32/ipc.c","lib/win32/ipc.h"] s.require_path = "lib" s.autorequire = "win32/ipc" s.has_rdoc = true s.extra_rdoc_files = ["README","CHANGES"] s.rdoc_options = ["-S"] s.test_file = "test/tc_ipc.rb" s.author = "Daniel J. Berger" s.email = "djberg96@yahoo.com" s.homepage = "http://www.rubyforge.org/projects/win32utils" end if $0 == __FILE__ Gem.manage_gems Gem::Builder.new(spec).build end
win32utils-devel@rubyforge.org
2004-Nov-05 12:55 UTC
[Win32utils-devel] Attempt to build a gemspec
Dan, It works for me ...see transcript below: win32utils-devel@rubyforge.org wrote:>a specific version. Second, I''m still doing something wrong. When I >tried that I got: > >irb(main):003:0> require_gem "win32-ipc" >LoadError: No such file to load -- win32/ipc > from > >#------------------------------------------ Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\dan\win32utils\win32utils\win32-ipc>type ipc2.gemspec require "rubygems" spec = Gem::Specification.new do |s| s.name = "win32-ipc" s.version = "0.3.1" s.platform = Gem::Platform::WIN32 s.summary = "A base class for Win32 synchronization objects." s.files = ["ipc.so","lib/win32/ipc.c","lib/win32/ipc.h"] s.require_path = "lib" s.autorequire = "win32/ipc" s.has_rdoc = true s.extra_rdoc_files = ["README","CHANGES"] s.rdoc_options = ["-S"] s.test_file = "test/tc_ipc.rb" s.author = "Daniel J. Berger" s.email = "djberg96@yahoo.com" s.homepage = "http://www.rubyforge.org/projects/win32utils" end if $0 == __FILE__ Gem.manage_gems Gem::Builder.new(spec).build end C:\dan\win32utils\win32utils\win32-ipc>ruby ipc2.gemspec Successfully built RubyGem Name: win32-ipc Version: 0.3.1 File: win32-ipc-0.3.1-mswin32.gem C:\dan\win32utils\win32utils\win32-ipc>gem install win32-ipc-0.3.1-mswin32.gem Attempting local installation of ''win32-ipc-0.3.1-mswin32.gem'' Successfully installed win32-ipc, version 0.3.1 Installing RDoc documentation for win32-ipc-0.3.1-mswin32... No definition for ipc_wait_any No definition for ipc_wait_all No definition for ipc_init No definition for ipc_wait C:\dan\win32utils\win32utils\win32-ipc> ------------------------------------------------------------------------