lxc.so is put in lib rather than lib/lxc
jeremiahsnapp opened this issue · 5 comments
When I build and install this gem I can't use it unless I move the lxc.so into the installed gem's lib/lxc directory. Is there something I'm doing wrong? I've tried this with ruby 2.1.0 and ruby 1.9.3p448.
git clone ...
cd ruby-lxc
gem build ruby-lxc.gemspec
gem install ruby-lxc-0.1.0.gem
This is what requiring it looks like for me.
irb(main):001:0> require 'lxc'
LoadError: cannot load such file -- lxc/lxc
from /opt/rubies/ruby-2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /opt/rubies/ruby-2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /opt/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/ruby-lxc-0.1.0/lib/lxc.rb:2:in `<top (required)>'
from /opt/rubies/ruby-2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from /opt/rubies/ruby-2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from /opt/rubies/ruby-2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from (irb):1
from /opt/rubies/ruby-2.1.0/bin/irb:11:in `<main>'
irb(main):002:0>
Moving the .so file works but why?!
mv /opt/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/ruby-lxc-0.1.0/lib/lxc.so /opt/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/ruby-lxc-0.1.0/lib/lxc/
rb(main):001:0> require 'lxc'
=> true
irb(main):002:0>
i am getting this as well. strangely this does not occur if i do bundle
exec irb and then require lxc from there, as it is, without moving the .so
file
On Fri, Jan 3, 2014 at 1:19 PM, Jeremiah Snapp notifications@github.comwrote:
When I build and install this gem I can't use it unless I move the lxc.so
into the installed gem's lib/lxc directory. Is there something I'm doing
wrong? I've tried this with ruby 2.1.0 and ruby 1.9.3p448.git clone ...
cd ruby-lxc
gem build ruby-lxc.gemspec
gem install ruby-lxc-0.1.0.gemThis is what requiring it looks like for me.
irb(main):001:0> require 'lxc'
'
LoadError: cannot load such file -- lxc/lxc
from /opt/rubies/ruby-2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /opt/rubies/ruby-2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
require'
from /opt/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/ruby-lxc-0.1.0/lib/lxc.rb:2:in<top (required)>' from /opt/rubies/ruby-2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in
require'
from /opt/rubies/ruby-2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:inrescue in require' from /opt/rubies/ruby-2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in
require'
from (irb):1
from /opt/rubies/ruby-2.1.0/bin/irb:11:in `
irb(main):002:0>Moving the .so file works but why?!
mv /opt/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/ruby-lxc-0.1.0/lib/lxc.so /opt/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/ruby-lxc-0.1.0/lib/lxc/
rb(main):001:0> require 'lxc'
=> true
irb(main):002:0>—
Reply to this email directly or view it on GitHubhttps://github.com//issues/4
.
I'm not real familiar with how these things are supposed to work. Is there something wrong with what I'm doing? I shouldn't have to use bundler right?
yeah , you dont have to. i just mentioned it to help with debugging. may be we need to add lib path in the gemspec. but im not sure
@jeremiahsnapp can you test this patch