2

I'm using RVM and previously RBENV on OSX. I have my gems installed relative to my project path in ./gems

I am using the aws-sdk and attempting to use the s3 client results in a LoadError from nokogiri/nokogiri. Specifically the error is:

/gems/ruby/1.9.1/gems/backports-2.6.7/lib/backports/tools.rb:314:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)

There has been a few discussions around the internet about this, but not a whole lot of answers. The odd thing is that this works, in its current configuration on Heroku.

I don't know if it helps, but I previously had an issue with bcrypt-ruby, where it was not finding bcrypt_ext in the same manner, LoadError, cannot find such file. The only resolution to that was seemingly to go into the gem folder and manually make install the file.

tessi
  • 13,313
  • 3
  • 38
  • 50
nullfox
  • 597
  • 1
  • 4
  • 16

1 Answers1

0

after changing to project directory run:

GEM_PATH=$GEM_PATH:$PWD/.gems
mpapis
  • 52,729
  • 14
  • 121
  • 158
  • That didn't seem to help, regardless of running that in terminal it still complains about nokogiri. I've found that if I install the gems to the system folder via bundle install --system that it works, but once I change back to a relative gem directory it breaks again. – nullfox May 08 '13 at 05:51
  • it is important to understand how your tools work, RVM will use gemsets and you need to run `rvm use ruby[@gemset]` to get access to the gems, if you use `bundler` to install gems then you need to also run them using `bundle exec` like `bundle exec rake`. – mpapis May 08 '13 at 07:31