I am trying to use the prawn gem. I am just trying out the basic hello world example, on an ubuntu machine.
require 'prawn'
Prawn::Document.generate("hello.pdf") do
text "Hello World!"
end
First problem was that I was using ruby 1.9.1, it produced an error and said it needed ruby 2.0, so using RVM I updated to 2.2.1. However everytime I run this, I get this error
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
require': cannot load such file -- prawn (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
require' from prawnpdf.rb:1:in `'
Now I am bit a newbie with Ubuntu and ruby for that matter, but I assume the issue is that it is looking in the wrong place for the prawn gem which I have installed ie it is looking in the old verison of ruby.
When I run $ ruby -v
I get
ruby 2.2.1p85 (2015-02-26 revision 49769) [i686-linux]
what am I doing wrong? any help would be most appreicated.