Roman
Roman

Reputation: 10403

Need a ruby daemon

I'm trying to follow Skinny Daemon tutorial from Head Labs since it does exactly what I need. I also like how the app is make as a gem, but it contains a thin server so I can get my app's pulse if I need it.

I've followed the tutorial and fiddled with it until the point where the gem can be built and installed. But when I try to start my gem it using the following command I get this:

$ myservice start
-bash: myservice: command not found

I suspect the tutorial is a little old and for some reason the gem installer doesn't add the gem location to my path.

How can I make this tutorial work?

Upvotes: 1

Views: 209

Answers (1)

Hauleth
Hauleth

Reputation: 23556

Firstly, using Jeweler is a little bit obsolete. Use bundle gem instead. Also I don't see in tutorial to specify in .gemfile that there is executable file in bin. How to do this you have here http://guides.rubygems.org/make-your-own-gem/#adding-an-executable. But if you use Bundler to create your gem scaffold then it will be automatically set to:

gem.files         = `git ls-files`.split($\)
gem.executables   = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }

Upvotes: 1

Related Questions