Here are some approaches you can try.
Cleaning
To clear old versions of your gems:
gem cleanup --dryrun
Json
To temporarily see if there is a json gem problem, switch from json (native) to json (pure ruby) and change your Gemfile:
gem install json_pure
native stones
There are several in your gems list that marry me as native:
- Bcrypt
- BSON
- erubis
- ffi (allows many native connections)
- gherkins
- kgio
- smaller
- nokogiri
- rain
- therubyracer (many unpredictable problems IMHO)
- unicorn
Ffi
Your ffi gem is especially interesting - do you know what you are doing with it?
ffi
allows Ruby code to invoke native code, for example, if some part of your Ruby application needs to connect to native libraries.
When you diagnose your problem, I will first look at this stone.
Makefiles
To find any of your gems that have Makefiles, which is a good indicator that they have their own code:
find / | grep "/ruby/gems/" | grep Makefile
To find all your gems, you can remove them:
find / | grep "/ruby/gems/"
nuke rvm
To apply RVM or its fragments, you can use rvm uninstall
, rvm implode
or this script, which destroys RVM and finds any lingering parts:
https:
try rbenv + bundler
I have switched from using rvm to using rbenv + bundler and it works fine for me.
The rbenv tool is a direct competitor of rvm for Ruby version control: https://github.com/sstephenson/rbenv
Bundler is a great way to manage gemset and gem dependencies: http://gembundler.com/
brew
If you're on a Mac and using MacPorts, go to "Homebrew":
http://mxcl.github.com/homebrew/