Sintra app in a gem
Posted
by JP
on Stack Overflow
See other posts from Stack Overflow
or by JP
Published on 2010-04-06T09:59:54Z
Indexed on
2010/04/06
10:03 UTC
Read the original article
Hit count: 246
I have a Sinatra application I've created and I'd like to package it as a gem-based binary.
I have my gemspec and gem set up to generate a suitable executable that points to the my_sinatra_app.rb
(which is executable) but the sinatra server never runs. Any ideas why and how to make it work?
my_sinatra_app
executable:
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
#
# This file was generated by RubyGems.
require 'rubygems'
version = ">= 0"
if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
version = $1
ARGV.shift
end
gem 'my_sinatra_app', version
load Gem.bin_path('my_sinatra_app', 'my_sinatra_app', version)
© Stack Overflow or respective owner