mongrel、mongrel_service、win-32 サービスを正常にインストール し、コンピューターにサービスを正常にインストールして、正常に開始しています。
現在抱えている主な問題は、私のアプリケーションが宝石のバンドルを使用しているため、通常の状況ではmongrel_rails startが bundle execで始まることです。サービスが開始されても、mongrels はbundle execで開始する必要がないため開始されません。
私の質問は、Windows サービスを作成するコマンドに bundle exec を含めて、bundle で雑種を開始するにはどうすればよいですか?
自動的にロードされるように、おそらく boot.rb または preinitializer.rb に bundle exec を含める他の方法はありますか? Rails2.3を使用しています。
雑種ログは以下です
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with production environment...
c:/Ruby/lib/ruby/gems/1.8/gems/bundler-1.0.22/lib/bundler/runtime.rb:31:in
`setup': You have already activated mongrel 1.2.0.pre2, but your Gemfile
requires mongrel 1.2.0.pre2. Using bundle exec may solve this.
(Gem::LoadError)
from
c:/Ruby/lib/ruby/gems/1.8/gems/bundler-1.0.22/lib/bundler/runtime.rb:17:in
`setup'
from**strong text**
c:/Ruby/lib/ruby/gems/1.8/gems/bundler-1.0.22/lib/bundler.rb:110:in
`setup'
from c:/xxxxx/xxxxxx/config/../config/preinitializer.rb:17
from c:/xxxxx/xxxxx/config/boot.rb:26:in `load'
from c:/xxxxx/xxxxx/config/boot.rb:26:in `preinitialize'
from c:/xxxxx/xxxxx/config/boot.rb:8:in `boot!'
from c:/xxxxx/xxxxx/config/boot.rb:120
from c:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from c:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from c:/xxxxx/xxxxx/config/environment.rb:5
from c:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from c:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.2.0.pre2-x86-mingw32/bin/../lib/mongrel/rails.rb:147:in
`rails'
from
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.2.0.pre2-x86-mingw32/bin/mongrel_rails:116:in
`cloaker_'
from
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.2.0.pre2-x86-mingw32/bin/../lib/mongrel/configurator.rb:149:in
`call'
from
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.2.0.pre2-x86-mingw32/bin/../lib/mongrel/configurator.rb:149:in
`listener'
from
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.2.0.pre2-x86-mingw32/bin/mongrel_rails:102:in
`cloaker_'
from
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.2.0.pre2-x86-mingw32/bin/../lib/mongrel/configurator.rb:50:in
`call'
from
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.2.0.pre2-x86-mingw32/bin/../lib/mongrel/configurator.rb:50:in
`initialize'
from
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.2.0.pre2-x86-mingw32/bin/mongrel_rails:86:in
`new'
from
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.2.0.pre2-x86-mingw32/bin/mongrel_rails:86:in
`run'
from
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.2.0.pre2-x86-mingw32/bin/../lib/mongrel/command.rb:210:in
`run'
from
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.2.0.pre2-x86-mingw32/bin/mongrel_rails:282
from c:/Ruby/bin/mongrel_rails:19:in `load'
from c:/Ruby/bin/mongrel_rails:19