-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ruby-fann gem doesn't work on 3.2.0/Ubuntu 22.04 #28
Comments
I also have practically the same problem, however I have Ruby 3.1.3 (on Windows 11)
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! |
Probably a similar problem with ruby 3.2 on openSUSE Tumbleweed. Any ideas? |
Same issue here.
|
I am Windows user and have same issue too.
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:
|
Hello, The problem is still here for me. How can i fix it? Any help. 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 (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 `' |
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 |
Fixed |
I believe I have a clean fann and ruby-fann install.
But for some reason, the test program which I copied from this site crashes as below.
rubyai@enterprise:~/d.ruby.stuff$ apt list | fgrep fann | fgrep installed
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libfann-dev/jammy,now 2.2.0+ds-6 amd64 [installed]
libfann-doc/jammy,jammy,now 2.2.0+ds-6 all [installed]
libfann2/jammy,now 2.2.0+ds-6 amd64 [installed,automatic]
rubyai@enterprise:~/d.ruby.stuff$ ruby --version
ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]
rubyai@enterprise:~/d.ruby.stuff$ gem pristine ruby-fann
Restoring gems to pristine condition...
Building native extensions. This could take a while...
Restored ruby-fann-1.3.2
rubyai@enterprise:~/d.ruby.stuff$ more test2.rb
require 'ruby-fann'
train = RubyFann::TrainData.new(:inputs=>[[0.3, 0.4, 0.5], [0.1, 0.2, 0.3]], :desired_outputs=>[[0.7], [0.8]])
fann = RubyFann::Standard.new(:num_inputs=>3, :hidden_neurons=>[2, 8, 4, 3, 4], :num_outputs=>1)
fann.train_on_data(train, 1000, 10, 0.1) # 1000 max_epochs, 10 errors between reports and 0.1 desired MSE (mean-squared-error)
outputs = fann.run([0.3, 0.2, 0.4])
rubyai@enterprise:~/d.ruby.stuff$ ruby test2.rb
'internal:/home/rubyai/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:88:in
require': cannot load such file -- ruby_fann/ruby_fann (LoadError) from <internal:/home/rubyai/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in
require'from /home/rubyai/local/lib/ruby/gems/3.2.0/gems/ruby-fann-1.3.2/lib/ruby_fann.rb:2:in
<top (required)>' from <internal:/home/rubyai/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in
require'from internal:/home/rubyai/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:88:in
require' from /home/rubyai/local/lib/ruby/gems/3.2.0/gems/ruby-fann-1.3.2/lib/ruby-fann.rb:1:in
<top (required)>'from internal:/home/rubyai/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:162:in
require' from <internal:/home/rubyai/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:162:in
rescue in require'from internal:/home/rubyai/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:152:in
require' from test2.rb:1:in
internal:/home/rubyai/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:88:in
require': cannot load such file -- ruby-fann (LoadError) from <internal:/home/rubyai/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in
require'from test2.rb:1:in `'
The text was updated successfully, but these errors were encountered: