Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to use prawn on maglev
    primarykey
    data
    text
    <p>Being new to maglev I wanted to start with a small, but still useful example. So i decided to start moving the ruby classes I use to generate my invoices to maglev. However I ran in an unexpected problem using the (excellent) prawn PDF-library.</p> <p>Being on rvm I generated a gemset for the application which is setup in a .rvmrc for the invoice directory. It gets used when I cd into it:</p> <pre><code>Using /Users/patru/.rvm/gems/maglev-head with gemset invoice </code></pre> <p>When I install prawn everything starts out fine, the gem seems to be installed and the ri-docs are being generated. However, trouble starts when rdoc should be created, the maglev provided gem command gives me</p> <pre><code> gem install prawn [INFO] The MagLev team publishes customized versions of some gems. ... Successfully installed prawn-0.12.0 1 gem installed Installing ri documentation for prawn-0.12.0... RDoc failure in lib/prawn/images/jpg.rb at or around line 20 column 26 Before reporting this, could you check that the file you're documenting compiles cleanly--RDoc is not a full Ruby parser, and gets confused easily if fed invalid programs. The internal error was: ERROR: While generating documentation for prawn-0.12.0 ... MESSAGE: global $@ is a read-only variable ... RDOC args: --ri --op /Users/patru/.rvm/gems/maglev-head@invoice/doc/prawn-0.12.0/ri --title Prawn Documentation --main README -q lib README.md LICENSE COPYING GPLv2 GPLv3 --title prawn-0.12.0 Documentation --quiet a RubySystemExit occurred (error 2752) </code></pre> <p>No big deal to live without documentation, it is good enough, but something else seems to go wrong, gem list says</p> <pre><code>Ascii85 (1.0.1) bundler (1.0.21) erector (0.8.3) pdf-reader (0.10.1) polyglot (0.3.3) prawn (0.12.0) rake (0.9.2) treetop (1.4.10) ttfunk (1.0.3) </code></pre> <p>so all seems to be well, but if I do</p> <pre><code>require 'ruby gems' require 'prawn' </code></pre> <p>in irb (which works perfectly on my ree-1.8.7) I get a strange</p> <pre><code>NoMethodError: NoMethodError: undefined method `ruby_18' for from /Users/patru/.rvm/gems/maglev-head@invoice/gems/prawn-0.12.0/lib/prawn/core/object_store.rb:246:in `__compileClass' from /Users/patru/.rvm/gems/maglev-head@invoice/gems/prawn-0.12.0/lib/prawn/core/object_store.rb:14:in `__compileClass' from /Users/patru/.rvm/gems/maglev-head@invoice/gems/prawn-0.12.0/lib/prawn/core/object_store.rb:13:in `__compileClass' from /Users/patru/.rvm/gems/maglev-head@invoice/gems/prawn-0.12.0/lib/prawn/core/object_store.rb:12 from /Users/patru/.rvm/rubies/maglev-head/src/kernel/bootstrap/Kernel.rb:831:in `gem_original_require' from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:57:in `require' from /Users/patru/.rvm/gems/maglev-head@invoice/gems/prawn-0.12.0/lib/prawn/core.rb:78 from /Users/patru/.rvm/rubies/maglev-head/src/kernel/bootstrap/Kernel.rb:831:in `gem_original_require' from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:57:in `require' from /Users/patru/.rvm/gems/maglev-head@invoice/gems/prawn-0.12.0/lib/prawn.rb:11 from /Users/patru/.rvm/rubies/maglev-head/src/kernel/bootstrap/Kernel.rb:831:in `gem_original_require' from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `require' from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:57:in `require' from /Users/patru/.rvm/rubies/maglev-head/src/kernel/bootstrap/Kernel.rb:831:in `gem_original_require' from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:57:in `require' from (irb):5:in `__compileEval' from (irb):7:in `__compileEval' from /Users/patru/.rvm/rubies/maglev-head/src/kernel/bootstrap/Kernel.rb:394:in `eval' from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/1.8/irb.rb:159:in `eval_input' ... </code></pre> <p>I am probably missing something obvious here. Suffice it to say that the 'erector' gem I installed as well (see the gem list above) can be required without problems, so I do not do everything wrong ;-)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload