Unicorn can't find gems?

Steve Klabnik steve at steveklabnik.com
Tue Jan 19 16:42:33 EST 2010

Hello all. I've run into a strange problem with Unicorn, and Google
couldn't help me out. Basically, I'm going to switch from Passenger to
Unicorn for the next release of my Rails app. I installed it on my
local machine, and it ran great. But then, as I was building my new
server to deploy on, I ran into a snag.

When I run 'unicorn_rails', I got a strange error. Here's the output
of 'unicorn_rails -d' :

$ unicorn_rails -d
Exception `Errno::EEXIST' at
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/fileutils.rb:243 -
File exists - tmp/cache
Exception `Errno::EEXIST' at
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/fileutils.rb:243 -
File exists - tmp/pids
Exception `Errno::EEXIST' at
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/fileutils.rb:243 -
File exists - tmp/sessions
Exception `Errno::EEXIST' at
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/fileutils.rb:243 -
File exists - tmp/sockets
I, [2010-01-19T21:25:09.748670 #30184]  INFO -- : listening on
addr= fd=3
Exception `LoadError' at
- no such file to load -- Win32API
Exception `LoadError' at
- no such file to load -- Win32API
I, [2010-01-19T21:25:09.758670 #30184]  INFO -- : worker=0 spawning...
I, [2010-01-19T21:25:09.768670 #30184]  INFO -- : master process ready
I, [2010-01-19T21:25:09.768670 #30185]  INFO -- : worker=0 spawned pid=30185
I, [2010-01-19T21:25:09.828670 #30185]  INFO -- : Refreshing Gem list
Exception `Gem::LoadError' at
- can't activate rack (~> 1.0.0, runtime) for ["actionpack-2.3.5",
"rails-2.3.5"], already activated rack-1.1.0 for ["unicorn-0.96.0"]
Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`,
update your RAILS_GEM_VERSION setting in config/environment.rb for the
Rails version you do have installed, or comment out RAILS_GEM_VERSION
to use the latest version installed.
Exception `Errno::EAGAIN' at
- Resource temporarily unavailable
I, [2010-01-19T21:25:09.918670 #30184]  INFO -- : reaped
#<Process::Status: pid=30185,exited(1)> worker=0
Exception `Errno::ECHILD' at
- No child processes

And then it just repeats.

I'm using ree both locally and on the server (as you can see), but I'm
using it through rvm locally.

Any idea what this might be?


More information about the mongrel-unicorn mailing list