I'm having a problem with a project using bundler and rbenv:
I'm in my projects root dir and enter
bundle install
which installs all bundles according to my Gemfile:
source 'http://rubygems.org'
gem 'rake', '~> 0.9.2'
gem 'nanoc', '~> 3.2.4'
gem 'sass', '~> 3.1.15'
gem 'coderay', '~> 1.0.5'
gem 'nokogiri', '~> 1.4.4'
gem 'yajl-ruby', '~> 0.8.2'
gem 'pygmentize', '~> 0.0.3'
gem 'coderay', '~> 1.0.5'
gem 'fssm', '~>0.2.9'
gem 'coderay_bash', '~>1.0.2'
gem 'kramdown', '~> 0.13.2'
gem 'htmlentities', '~> 4.3.1'
This also claims to install nokogiri. But whenever I run
nanoc compile
I get an error message saying:
LoadError: cannot load such file -- nokogiri
Try installing the 'nokogiri' gem (`gem install nokogiri`) and then re-running the command.
I already tried uninstalling the gem with gem uninstall nokogiri
and running the whole thing again, but nothing worked so far.
This is quite strange. From what I can tell, your setup looks correct. I don’t see a solution immediately, but perhaps removing the Gemfile.lock and re-running “bundle install” may do the trick.
Update: Do you have multiple nanoc versions installed? It might be that the nanoc version that you are using (because it is first in $PATH) is not the one installed by the
gem
from rbenv. Does switching to system ruby, uninstalling the nanoc gem, and then switching back to your rbenv ruby fix nanoc?