This forum is no longer active. Please post your questions to our new community site

Problem running application from mongrel_rails service on windows

Subscribe to Problem running application from mongrel_rails service on windows 3 post(s), 2 voice(s)

Avatar migmartri 7 post(s)

I have created a couple of mongrel_rails services and I can start them succesfully, but when I access to the application localhost:xxxx I receive a 500 error and this message in the development/log.

/!\ FAILSAFE /!\ Fri Dec 03 05:01:31 -0300 2010
Status: 500 Internal Server Error
126: No se puede encontrar el m䵬o especificado. – C:/rubystack/ruby/lib/ruby/gems/1.8/gems/mysql-2.8.1-x86-mingw32/lib/1.8/

If I start the application using ruby script/server -p xxxx it works.

Any clue?

Thank you.

Avatar Beltrán Rueda Administrator 3,714 post(s)


It is possible that your application requires to set some environment variables. To a mongrel_rails service loads any environment variables you should do the following:

1. Create a ruby file where you set the viariables. The following example is used in Redmine Stack to load the ImageMagick environment variables:


ENV['PATH'] = ENV['PATH'] + ';C:\path\to\ImageMagick'                                                         
ENV['MAGICK_CODER_MODULE_PATH'] = 'C:\path\to\ImageMagick\modules\coders'                                 
require 'rubygems'                                                                                                   
require 'RMagick'

2. When you install the mongrel_rails service you should specify the script location:

mongrel_rails service::install -S “C:\path\to\mongrel_rails_envvars” (other options)

Not sure if in your case it is necessary to specify MySQL path. I hope it helps.

Avatar migmartri 7 post(s)

Hello Beltran.

Thank you for the information but finally I fixed it copying the libmysql.dll file from mysql\bin to ruby\bin as I he did in this thread 1.

I think the best option is to load the environment variables while starting mongrel rails service as you suggested but I am not familiar with that so it is not going to be easy to me.

Thank you for your help.