Giter VIP home page Giter VIP logo

Comments (7)

git-steven avatar git-steven commented on May 27, 2024 1

Fixed

from ruby-fann.

EntropicBlackhole avatar EntropicBlackhole commented on May 27, 2024

I also have practically the same problem, however I have Ruby 3.1.3 (on Windows 11)
To replicate:
-Run gem install ruby-fann in the working dir terminal
-Make a .rb file, and require 'ruby-fann', run it and you get this error:

<internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:88:in `require': cannot load such file -- ruby_fann/ruby_fann (LoadError)
        from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ruby-fann-1.3.2/lib/ruby_fann.rb:2:in `<top (required)>'
        from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
        from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ruby-fann-1.3.2/lib/ruby-fann.rb:1:in `<top (required)>'
        from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:162:in `require'
        from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:162:in `rescue in require'
        from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:152:in `require'
        from neural-net.rb:1:in `<main>'
<internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:88:in `require': cannot load such file -- ruby-fann (LoadError)
        from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
        from neural-net.rb:1:in `<main>'

I'm literally new to Ruby as I just installed it yesterday, and was following a guide, when running I run into this error, although my conclusion would be that perhaps the gem isn't compatible with the Ruby version? Not sure, again I'm on 3.1.3, any help would be appreciated!

from ruby-fann.

cmirnow avatar cmirnow commented on May 27, 2024

Probably a similar problem with ruby 3.2 on openSUSE Tumbleweed. Any ideas?

from ruby-fann.

SergeySc avatar SergeySc commented on May 27, 2024

Same issue here.
Ruby: 3.2.1

<internal:C:/Apps/Ruby32-x64/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require': cannot load such file -- ruby_fann/ruby_fann (LoadError)

from ruby-fann.

19CVn avatar 19CVn commented on May 27, 2024

I am Windows user and have same issue too.
I moved the "ruby-fann.rb" and "ruby_fann.rb" files from the "ruby-fann-1.3.2\lib" directory to "ruby-fann-1.3.2\lib\ruby_fann". Afterwards, I wrote like this

$LOAD_PATH.unshift("D:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/ruby-fann-1.3.2/lib/ruby_fann")
require 'ruby-fann'

Then I ran the training example provided on https://tangledpath.github.io/ruby-fann/index.html, and it worked without issue. Ruby was able to successfully load both files.

However, a new error has since arisen. The following information pertains to this error:

n.rb:3:in `<main>': uninitialized constant RubyFann::TrainData (NameError)

  train = RubyFann::TrainData.new(:inputs=>[[0.3, 0.4, 0.5], [0.1, 0.2, 0.3]], :desired_outputs=>[[0.7], [0.8]])

from ruby-fann.

ustuntas avatar ustuntas commented on May 27, 2024

Hello,

The problem is still here for me. How can i fix it? Any help.
My ruby version is 3.2.1 the gem file version 1.3.2.

The error:
internal:/home/ustuntas/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:85:in require': cannot load such file -- ruby_fann/ruby_fann (LoadError) from <internal:/home/ustuntas/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in require'
from /home/ustuntas/.gem/ruby/3.2.0/gems/ruby-fann-1.3.2/lib/ruby_fann.rb:2:in <top (required)>' from <internal:/home/ustuntas/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in require'
from internal:/home/ustuntas/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:85:in require' from /home/ustuntas/.gem/ruby/3.2.0/gems/ruby-fann-1.3.2/lib/ruby-fann.rb:1:in <top (required)>'
from internal:/home/ustuntas/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:159:in require' from <internal:/home/ustuntas/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:159:in rescue in require'
from internal:/home/ustuntas/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:39:in require' from tester.rb:1:in

'
internal:/home/ustuntas/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:85:in require': cannot load such file -- ruby-fann (LoadError) from <internal:/home/ustuntas/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in require'
from tester.rb:1:in `'

from ruby-fann.

xhs345 avatar xhs345 commented on May 27, 2024

I encountered the same issue on Ruby 2.7 and Debian 11. So far I seem to have gotten it fixed while the following change: master...xhs345:ruby-fann:master

from ruby-fann.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.