[Nitro] Problem on Nitro's tutorial, Part 2
Doug Gorley
douggorley at shaw.ca
Fri Aug 5 12:32:13 EDT 2005
Greeting list,
I'm having the same problem as mentioned this morning in "Problem on Nitro's tutorial" (sorry, just joined the list a couple minutes ago, so I didn't have that email to reply to. I'm using Ubuntu Hoary 5.04, and have nitro 0.21.2 installed from rubygems. To make this easy to repro, I set up my example in a bash script. My problem is the same as the OP's; when I try to start the app with run.tb, nothing happens.
##################################################
# Create the new web app
nitrogen app ~/test_app
# Make a lib/ folder for the Feeds class
mkdir ~/test_app/lib
# Create the Feeds class
cat <<EOF >~/test_app/lib/feeds.rb
include Nitro
class Feeds < Controller
def opml
o.opml {
o.comment 'My blog opml'
o.body {
o.outline("Nitro bloggers rule") {
o.outline(
:title => "Foo",
:htmlUrl => "http://localhost:9999/entries/foo",
:xmlUrl => "http://localhost:9999/feeds/rss/foo")
}
}
}
@context.content_type = 'text/xml'
end
end
EOF
# Modify the run.rb file as shown in the example.
cat <<EOF >~/test_app/run.rb
#!/usr/bin/env ruby
require 'nitro'
require 'feeds'
a = App.new
a.map['/feeds'] = Feeds
a.start
EOF
##################################################
Doug Gorley | douggorley at shaw.ca
More information about the Nitro-general
mailing list