Home > Back-end >  Ruby Not Requiring C Extension
Ruby Not Requiring C Extension

Time:07-23

I have a gem I published a while ago that I'm trying to upgrade (https://github.com/fny/xorcist). Right now I'm wrestling with a require issue that I haven't seen before. I'm following the same instructions I have from prior updates.

git clone https://github.com/fny/xorcist && cd xorcist
rbenv install 3.1.2
rbenv shell 3.1.2
rake test
#=> ~/.rbenv/versions/2.7.6/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in
`require': cannot load such file -- xorcist/xorcist (LoadError)

This is strange. It looks like xorcist loads perfectly, but the C extension does not, which is where require 'xorcist/xorcist' refers.

CodePudding user response:

If you just run rake, it runs both the compile and then the test task.

task :default => [:compile, :test]
  •  Tags:  
  • ruby
  • Related