How to include gem(timers) in warbler jar?
bin
myapp
(file)lib
/myapp/bin/myapp
content: require 'timers'
timers = Timers::Group.new
five_second_timer = timers.after(5) { puts "Take five" }
$ warble jar
rm -f myapp.jar
Creating myapp.jar
$
java -jar myapp.jar
output: LoadError: no such file to load -- timers
(...)
Try using bundler
gem install bundler
Create the file Gemfile
at the root of your project and write the dependencies on it:
gem 'timers'
Now warbler will add the dependencies correctly.