Forums General

Running As Service - Tracks

Subscribe to Running As Service - Tracks 2 post(s), 2 voice(s)

 
Avatar snafilter 1 post

I’m not much of a Ruby person and installed RubyStack mainly to run Tracks. When I try to run the Tracks application as a service I get the following error:

  1. Logfile created on Mon Mar 24 15:31:45 -0400 2008 by /
    • has_many_polymorphs: rails environment detected
    • has_many_polymorphs: loaded ok
      SwitchEnvironmentController: missing default helper path switch_environment_helper
      UnobtrusiveJavascriptController: missing default helper path unobtrusive_javascript_helper
    • has_many_polymorphs: autoload hook invoked
    • has_many_polymorphs: preloading parent model Tag
    • has_many_polymorphs: associating Tag.taggables
    • has_many_polymorphs: WARNING; possibly critical error preloading Tag: #<runtimeerror: error unknown>
    • has_many_polymorphs: rails environment detected
    • has_many_polymorphs: loaded ok
However when I run it with the “ruby script/server” the application runs correctly:
SwitchEnvironmentController: missing default helper path switch_environment_helper
UnobtrusiveJavascriptController: missing default helper path unobtrusive_javascript_helper
  • has_many_polymorphs: autoload hook invoked
  • has_many_polymorphs: preloading parent model Tag
  • has_many_polymorphs: associating Tag.taggables
  • has_many_polymorphs: injecting dependencies

Processing TodosController#index (for 127.0.0.1 at 2008-03-24 15:57:21) [GET] Session ID: 1b4768d736b1d3970594a09381869d26 Parameters: {“action”=>”index”, “controller”=>”todos”}
Redirected to http://localhost:3000/login
Filter chain halted as [#<actioncontroller::filters::classmethods::symbolfilter:0x4719a68>] returned_false.
Completed in 0.00010 (10000 reqs/sec) | DB: 0.00000 (0%) | 302 Found [http://localhost/]

Here is the command I used to install the service:

mongrel_rails service::install -N “Tracks” -p “3000” -c “C:\Documents and Settings\strivedi\BitNami RubyStack projects\tracks”

Here is what the service Path to Executable states:
“C:/Program Files/BitNami RubyStack/ruby/bin/mongrel_service.exe” single -e development -p 3000 -a 0.0.0.0 -l “log/mongrel.log” -P “log/mongrel.pid” -c “C:/Documents and Settings/username/BitNami RubyStack projects/tracks” -t 0 -r “public” -n 1024

 
Avatar Manuel Administrator 71 post(s)

Hi snafilter,

If you install a RubyStack service like that it won’t work because the Windows service will override the environment variables set by “user_ruby.bat”. I suggest you to try our ready-made Tracks stack http://bitnami.org/stack/tracks. Or you can try to fix the problem yourself adding to the top of your tracks “config/environment.rb” file something similar to the following:

ENV['PATH'] = ENV['PATH'] + 'C:\Program Files\BitNami RubyStack\imagemagick;C:\Program Files\BitNami RubyStack\ruby\bin;C:\Program Files\BitNami RubyStack\subversion\bin;C:\Program Files\BitNami RubyStack\mysql\bin;%PATH%'

You should also ensure that MySQL service is running before launching Mogrel service. Hope this helps .

Manuel

Forums General