require 'libsvm' fails (MS windows)
I've installed ruby, devkit and rubygems and sucessfully installed the rb-libsvm gem. When I try to run the examples or go require 'libsvm' in irb i get this:
C:\dev>ruby
require 'libsvm'
^Z
c:/dev/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': 193: %1 is not a valid Win32 application. - c:/dev/ruby193/lib/ruby/gems/1.9.1/gems/rb-libsvm-1.0.8/lib/libsvm/libsvm_ext.so (LoadError)
from c:/dev/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from c:/dev/ruby193/lib/ruby/gems/1.9.1/gems/rb-libsvm-1.0.8/lib/libsvm.rb:2:in `'
from c:/dev/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from c:/dev/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from c:/dev/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from -:1:in `'
I don't have access to a Windows machine, so I can't really help. Patches would be welcome.
I'll look into it. I suppose the module does not compile properly for windows.
On 6 September 2012 21:52, Florian Ebeling [email protected] wrote:
I don't have access to a Windows machine, so I can't really help. Patches would be welcome.
— Reply to this email directly or view it on GitHubhttps://github.com/febeling/rb-libsvm/issues/10#issuecomment-8345049.
I only have access to windows via a virtual machine. I'll see if I have everything I need to try to do it.
On Thu, Sep 6, 2012 at 12:52 PM, Florian Ebeling [email protected]:
I don't have access to a Windows machine, so I can't really help. Patches would be welcome.
— Reply to this email directly or view it on GitHubhttps://github.com/febeling/rb-libsvm/issues/10#issuecomment-8345049.
I installed the libsvm-ruby-swig (0.4.0) gem (both gems installed) and the error changed.
C:\dev\Ruby193\lib\ruby\gems\1.9.1\gems\rb-libsvm-1.0.8\examples>ruby toy.rb toy.rb:4:in `': uninitialized constant Libsvm::Problem (NameError) C:\dev\Ruby193\lib\ruby\gems\1.9.1\gems\rb-libsvm-1.0.8\examples>ruby text.rb text.rb:30:in `block in ': uninitialized constant Libsvm::Node (NameError) from text.rb:28:in `each' from text.rb:28:in ` ' C:\dev\Ruby193\lib\ruby\gems\1.9.1\gems\rb-libsvm-1.0.8\examples>gem list
Need MS windows version also
when You install libsvm-ruby-swig, it loads libsvm.rb file, not extension. When You have rb-libsvm only - it tries to load libsvm_ext.so but fails on windows
This package, rb-libsvm, doesn't support Windows, unfortunately (unless somebody supplies a patch).
Please note that libsvm-ruby-swig and rb-libsvm packages are alternatives and not meant to be used together.
Just saw that rake-compiler has support for cross-compiling now, and also provides a special rake-compiler-dev-box VM for this. Might make implementing this thing easier.
https://github.com/rake-compiler/rake-compiler#cross-compilation---the-future-is-now
I don't find the time to do this. So the new status pretty much is: PR welcome.
@jeppevb - Not really an answer to your issue, but I'll share with you my experience. Using Ruby on Windows makes it more difficult than Mac or Ubuntu. I suggest installing Ubuntu in Windows. It is very simple and you do not need dual boot.
@Kraviscloud What is gp?