warbler
warbler copied to clipboard
not able to find library files
#!/usr/bin/env ruby
$: << File.dirname(__FILE__) + '/../lib'
require 'my-project/class'
directory structure is lib/my-project/class.rb. and bin/my-project
when I run warble, and java -Djruby.compat.version=1.9 -jar my-project.jar I get errors saying:
LoadError: no such file to load -- my-project/class
Any ideas why this would be?
gemspec looks like this
# ...
gem.files = `git ls-files`.split($\)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.require_paths = ["lib"]
# ...
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
OK, after playing around it seems there's a bug around the hyphen in the library name.
require 'my-project' didn't work either despite there being a lib/my-project
So I tried removing the hyphen, and that works fine :/
same problem occurs with underscores.
Same here, but I would not like to rename my library