Ubuntu ruby gem location -


i trying use prawn gem. trying out basic hello world example, on ubuntu machine.

require 'prawn' prawn::document.generate("hello.pdf") text "hello world!" end 

first problem was using ruby 1.9.1, produced error , said needed ruby 2.0, using rvm updated 2.2.1. everytime run this, error

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- prawn (loaderror) /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' prawnpdf.rb:1:in `'

now bit newbie ubuntu , ruby matter, assume issue is looking in wrong place prawn gem have installed ie looking in old verison of ruby.

when run $ ruby -v

ruby 2.2.1p85 (2015-02-26 revision 49769) [i686-linux] 

what doing wrong? appreicated.

follow given step.

1: rvm list

rvm rubies     ruby-2.0.0-p643 [ x86_64 ]    ruby-2.2.1 [ x86_64 ] =* ruby-2.2.4 [ x86_64 ] 

2: rvm use < ruby-version > # instances ruby-1.9.3-p125

rvm use 2.2.1 

3: gem install prawn

would work !!!


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -