I installed the libxml-ruby gem, with the --platform=x86_64 flag, and whenever I try to require 'xml' I get an error.
Ruby24-x64/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require':
126: The specified module could not be found.
- I:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/libxml-ruby-3.0.0/lib/libxml_ruby.so (LoadError)
I checked, and libxml_ruby.so is in that directory. Any ideas on how to fix this?
I am using Ruby version 2.4.1 on Windows 10.
Related
I'm trying to require the gem 'cerebrum'. I tried requiring it using the irb, and that worked, and also running the program in JRuby worked too. However, Ruby throws a LoadError.
C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- cerebrum (LoadError)
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
What am I doing wrong? Has anyone had that issue too?
You get the load error when gem is not installed. First check if this gem is installed in this ruby version using gem list cerebrum. It may be installed in your jruby that's why it didn't throw error.
I am using Ubuntu 12.04.4
Here is my gem list:
gem list
*** LOCAL GEMS ***
dicom (0.9.5)
gsl (1.15.3)
narray (0.6.0.8)
rb-gsl (1.16.0)
rmagick (2.13.2)
I have installed the gsl library in my home directory.
I then open irb and "require gsl" where I get the following error message:
require 'gsl'
LoadError: no such file to load -- gsl
from (irb):1:in `require'
from (irb):1
from :0
Any ideas on why this error appears.
Thanks for your time
Check the value of $LOAD_PATH in irb. This will tell you where require is looking for files. I'm guessing that your ruby/irb/gem environments have conflicting versions.
I want to use the ImageSpec gem so have the following in a file:
require 'imagespec'
but get the following load error at runtime:
`require': cannot load such file -- imagespec (LoadError)
gem list ruby-imagespec shows:
*** LOCAL GEMS ***
ruby-imagespec (0.3.1)
but gem which ruby-imagespec gives:
ERROR: Can't find ruby library file or shared library ruby-imagespec
How do I require the file?
You need to use require 'image_spec'. See the init.rb file for the gem.
I tried to connect to the database using Ruby (under Windows).
For that:
install Ruby in C:\Ruby193
install devkit (c:\ruby193\devkit). Run "ruby dk.rb init", "ruby dk.rb install"
downloaded rubygems (1.8.25). Executed ruby setup.rb
and: gem install rubyfb (adapter Ruby for Firebird)
After that I wrote short rb-script:
require 'rubygems'
require 'rubyfb'
include Rubyfb
db = Database.new('test.gdb')
And got error:
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': 126: Can't find module - C:/Ruby193/lib/ruby/gems/1.9.1/gems/rubyfb-0.6.7/lib/rubyfb_lib.so (LoadError)
This is the file exists, but Ruby can not find it.
All my attempts to rectify the situation failed.
I installed another adapter, but the situation repeated - Ruby can not find another file.
Please advise.
I was having the same problem. All I had to do was copying C:\Program Files\Firebird\Firebird_2_5\bin\fbclient.dll to C:\Ruby\bin.
I've got a problem with running an additional gem under ubuntu 11.04. I installed spiceweasel via gem install - which put it in /var/lib/gems/1.8/gems/spiceweasel. When I try to run it, I get:
`require': no such file to load -- spiceweasel/version (LoadError)
The file is in /var/lib/gems/1.8/gems/spiceweasel-0.7.1/lib/spiceweasel/version.rb but cannot be loaded. This happens both with and without -rubygems.
How do I fix this?
It seems to be the same problem like here: Ruby: require 'irbtools' raises LoadError
The gem author published the gem with wrong permissions. You should contact the gem author.