Error running simple Markaby example

I have installed Markaby using gem, when I try running the example
code for Markaby…

$ ruby markaby.rb
./markaby.rb:5: uninitialized constant Markaby (NameError)
from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require’
from markaby.rb:3

#markaby.rb
require ‘markaby’

mab = Markaby::Builder.new
mab.html do
head { title “Boats.com” }
body do
h1 “Boats.com has great deals”
ul do
li “$49 for a canoe”
li “$39 for a raft”
li “$29 for a huge boot that floats and can fit 5 people”
end
end
end
puts mab.to_s

Tony K. wrote:

#markaby.rb
li “$29 for a huge boot that floats and can fit 5 people”
end
end
end
puts mab.to_s

Try using

require ‘rubygems’

at the top of the script?

-Justin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs