Problem in Setting up Thin as a Windows service
Added by Davide Mazzaglia about 8 years ago
Hi All!
I'm writing to you to ask you help for setting up Thin as a Windows service.
I am working on Windows Server 2008 R2 64 bit.
I'm following the guide in the link:
Installing Redmine on Windows Server 2008 R2 and Apache w...
I've arrived to "Setting up Thin as a Windows service and configuring Apache"
The step n.1 correctly worked (so "thin start -e production -p 3000" correctly worked)
The problem is step n.4:
i've created service "SC create MyService binPath= "C:\path to\srvany.exe" DisplayName= "My Custom Service" "
with this command: SC create rubyForRedmine binPath= "C:\Ruby22-x64\bin\srvany.exe" DisplayName= "rubyForRedmine"
i've created the three registry keys:
STRING: AppDirectory
DATA: path to your Redmine root folder for example: C:\Webserver\Redmine
MY KEY: C:\Root\redmine
STRING: Application
DATA: path to your Ruby.exe for example: C:\Webserver\Ruby193\bin\ruby.exe
MY KEY: C:\Ruby22-x64\bin\ruby.exe
STRING: AppParameters
DATA: Thin startup settings and path for example: C:\Webserver\Ruby193\bin\thin start -e production -p 3001
MY KEY: C:\Ruby22-x64\bin\thin start -e production -p 3001 -c C:\Root\redmine
when i launch "start" for my service, it gives error and says:
"The rubyForRedmine service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs".
I'm going crazy and can't find something useful on web... i'm pretty new in this argument, so i ask you, if you can help me! thank you very much,
Davide
p.s. here my gem list, if it can help:
C:\Root\redmine>gem list
- LOCAL GEMS ***
actioncable (5.0.0.1)
actionmailer (5.0.0.1, 4.2.7.1)
actionpack (5.0.0.1, 4.2.7.1)
actionpack-action_caching (1.1.1)
actionpack-xml_parser (1.0.2)
actionview (5.0.0.1, 4.2.7.1)
activejob (5.0.0.1, 4.2.7.1)
activemodel (5.0.0.1, 4.2.7.1)
activerecord (5.0.0.1, 4.2.7.1)
activesupport (5.0.0.1, 4.2.7.1)
addressable (2.4.0)
arel (7.1.4, 6.0.3)
bigdecimal (default: 1.2.6)
builder (3.2.2)
bundler (1.13.6)
cgi_multipart_eof_fix (2.5.0)
coderay (1.1.1)
concurrent-ruby (1.0.2)
css_parser (1.4.6)
daemons (1.2.4)
erubis (2.7.0)
eventmachine (1.2.0.1 x64-mingw32, 1.0.9.1)
globalid (0.3.7)
htmlentities (4.3.1)
i18n (0.7.0)
io-console (default: 0.4.3)
jquery-rails (3.1.4)
json (2.0.2, 1.8.3, default: 1.8.1)
loofah (2.0.3)
mail (2.6.4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (3.2016.0521)
mimemagic (0.3.2)
mini_portile2 (2.1.0)
minitest (5.9.1, 5.4.3)
mysql2 (0.4.5 x64-mingw32, 0.3.21 x64-mingw32)
net-ldap (0.12.1)
nio4r (1.2.1)
nokogiri (1.6.8.1 x64-mingw32)
power_assert (0.2.2)
protected_attributes (1.1.3)
psych (default: 2.0.8)
rack (1.6.4)
rack-openid (1.4.2)
rack-test (0.6.3)
rails (5.0.0.1, 4.2.7.1)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (2.0.1, 1.0.7)
rails-html-sanitizer (1.0.3)
railties (5.0.0.1, 4.2.7.1)
rake (11.3.0, default: 10.4.2)
rbpdf (1.19.0)
rbpdf-font (1.19.0)
rdoc (default: 4.2.0)
redcarpet (3.3.4)
request_store (1.0.5)
rmagick (2.16.0)
roadie (3.2.0)
roadie-rails (1.1.1)
ruby-openid (2.3.0)
sprockets (3.7.0)
sprockets-rails (3.2.0)
test-unit (3.0.8)
thin (1.7.0)
thor (0.19.1)
thread_safe (0.3.5)
tzinfo (1.2.2)
tzinfo-data (1.2016.8)
websocket-driver (0.6.4)
websocket-extensions (0.1.2)