Hi Folks,
I've been trying to get camping up and running on dreamhost for the
past six hours, but have had no success. I'd really appreciate any
suggestions!
The camping gem is on the dreamhost server, but just to make sure it
wasn't a dependency issue causing all the problems, I installed
camping + the full set of dependencies in my own gem directory (both
are on the GEM_PATH). Other gems in this directory work fine.
The following script, which really just loads camping, works from the
command line, but gives me a internal server error if I invoke it as a
cgi. When I substitute any other gem for camping (for example gruff)
it runs fine as a cgi.
#!/usr/bin/ruby
require 'rubygems'
require 'camping' # 'gruff'
puts "Content-Type: text/html"
puts
puts "<html>"
puts "<body>"
puts "<h1>Hello World</h1>"
puts "</body>"
puts "</html>"
This next script gives me a "(eval):14:in `initialize': private method
`sub' called for nil:NilClass (NoMethodError)" error on the command
line, and an "internal server error" as a cgi. Of course it runs
perfectly on my dev machine :).
#! /usr/bin/ruby
require 'rubygems'
require 'camping'
Camping.goes :TestPage
module TestPage::Controllers
class Index < R '/'
def get
render :index
end
end
end
module TestPage::Views
def index
h1 "Hello World"
end
end
if __FILE__ == $0
puts TestPage.run
end
Please help - I'd really love to use camping for this project! Thanks!
Dan
_______________________________________________
Camping-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/camping-list