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

Trouble installing Gems

Subscribe to Trouble installing Gems 3 post(s), 2 voice(s)

Avatar cpaltenghe 7 post(s)

I thought I could solve this, but I’m going to need some help.
This is a fall out of trying to run Mongrel as a service (see post Daniels’ original suggestion to use this command… mongrel_rails -N “name_of_service” -p “port” -c “project_directory”
didn’t work, and produced the following error:
ERROR RUNNING ‘-N’: Plugin /-N does not exist in cateogry /commands.

After a little research, I found this article that had more detail on installing mongrel-rails…

The issue is that mongrel_rails (which was installed) needs to have win32-services installed, which wasn’t.
When attempting to execute gem install win32-services, the following error occurs…

ERROR: While executing gem..<gem::remotefetcher:fetcherror> Bad File descriptor – connect(2)(Errno::EBADF)

I had previously set the environment variables to use our corporate proxy with this bat file as follows….

@echo off
set /pHTTP_PROXY=Enter proxy IP
set /p HTTP_PROXY_USER=Enter domain\network ID:
set /p HTTP_PROXY_PASS=Enter password:

I can’t tell if this really is a connection issue or what. Please advise.

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


The correct command is:

mongrel_rails service::install -N “name of service” -p “port” -c “project directory”

You have to execute this command in “Use Ruby” console. If you have Windows Vista you should remember to launch this console as administrator. win32-service and mongrel-service gems are included in 1.0-beta-4 version. You can see the list of the gems installed with:

gem list

Avatar cpaltenghe 7 post(s)

After some more digging, we discovered we actually failed to set the environment variables. We also discovered that our proxy server requires the domain with the network ID. This bat file did the trick…

@echo off
set HTTP_PROXY=http://yourproxyhost:80
set /p HTTP_PROXY_USER=Enter netId:
set /p HTTP_PROXY_PASS=Enter password:

The other thing we discovered is that this only lasts within the ruby command console context, so after executing use_ruby, on must execute the bat file within the console, and then install the gems. This seemed to work.