Skip to content
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

"cannot load such file -- wiringpi/wiringpi" in ruby 2.0 #10

Open
unforced opened this issue Mar 3, 2013 · 1 comment
Open

"cannot load such file -- wiringpi/wiringpi" in ruby 2.0 #10

unforced opened this issue Mar 3, 2013 · 1 comment

Comments

@unforced
Copy link

unforced commented Mar 3, 2013

2.0.0-p0 :001 > require 'wiringpi'
LoadError: cannot load such file -- wiringpi/wiringpi
    from /home/pi/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /home/pi/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /home/pi/.rvm/gems/ruby-2.0.0-p0/gems/wiringpi-1.1.0/lib/wiringpi.rb:1:in `<top (required)>'
    from /home/pi/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require'
    from /home/pi/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
    from /home/pi/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
    from (irb):1
    from /home/pi/.rvm/rubies/ruby-2.0.0-p0/bin/irb:16:in `<main>'
@smiler
Copy link

smiler commented Apr 19, 2013

The problem is due to a change in mkmf makefile generator in ruby 2.0. When the gems native extension is installed the makefile doesn't create the lib/wiringpi directory. This causes the install command to copy wiringpi.so to lib/wiringpi instead of lib/wiringpi/wiringpi.so.
An ugly workaround is to create a dummy file in lib/wiringpi and include it in the gem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants