8

I am trying to run a rails app via

unicorn -c config/environments/<env>/unicorn.rb -e <env>

but I keep getting this error.

<app_root>/vendor/bundle/ruby/1.9.1/gems/kgio-2.7.4/lib/kgio.rb:21:in `require': cannot load such file -- kgio_ext (LoadError)

Any ideas?

I am running unicorn (4.3.1) with kgio (2.7.4) in a rails (3.2.3) app.

John Starrt
  • 81
  • 1
  • 3

4 Answers4

2

Are you running on a Mac with Lion or Mountain Lion? If so, make sure you have the entire xcode installed, not JUST the command line tools. KGIO requires this. After that, be sure to run bundle install.

Tom
  • 21
  • 2
1

In my case the problem was that i updated rvm and the unicorn couldn't find so files. I deleted the gemset and created a new one and after bundle install everything worked.

bonyiii
  • 2,833
  • 29
  • 25
0

Looks like you are using Ruby 1.9.1, may be incompatible. Try switching Ruby version.

Seyhun Akyürek
  • 851
  • 9
  • 17
  • The final 1 in 1.9.1 is the compatability version, see http://stackoverflow.com/a/13274357/335847 – ian Jan 31 '13 at 18:29
0

I had the same issue and it seems that Bundler with RVM is not integrating well with gems that use native extensions. I've changed to Thin and hit a similar issue with eventmachine. My question for unicorn here and Thin here

I've worked around the problem with the solution in my Thin question.

Regards, Nuno Valente.

Isikyus
  • 73
  • 1
  • 6
Nuno Valente
  • 35
  • 1
  • 4