Hi Raimon,

I did a quick test this morning and it looks like some change in Camping after version 2.0 impacted RESTstop. By reverting to camping-2.0 I was able to run the blog example. I will need to investigate what the issue is. Also I realized that a couple things need to be done: a) publish a new version of the reststop gem (as the current one no longer matches the current camping/reststop project code on GitHub b) merge some of my changes from March re: the RESTR library and publish a new gem

Philippe

PS - eventually I will write a blog post on this ;-)

On 6/9/2010 12:31 AM, Raimon Fernandez wrote:
Hi Bartosz,

On 8jun, 2010, at 20:31 , Bartosz Dziewoński wrote:

It should come with the gem, in examples directory. You can also find
it here: http://github.com/camping/camping/blob/master/examples/blog.rb
This version doesn't use reststop.

The one that is included in the examples, it does, but has some errors:

MacBook-ProII-2:examples montx$ camping blog.rb
** Starting Mongrel on 0.0.0.0:3301
!! Error loading /Users/montx/Documents/Camping/reststop/examples/blog.rb:
NameError: uninitialized constant Logger
/Library/Ruby/Site/1.8/reststop.rb:43
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
/Users/montx/Documents/Camping/reststop/examples/blog.rb:32
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:60:in
 `load'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:60:in
 `load_apps'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:105:in
 `reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:180:in
 `reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:179:in
 `each'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:179:in
 `reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:158:in
 `update'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:157:in 
`find_scripts'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:161:in 
`reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:169:in 
`call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:47:in `_call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:35:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in `call'
...

So I've added:

require 'Logger'

and started again camping:

MacBook-ProII-2:examples montx$ camping blog.rb
** Starting Mongrel on 0.0.0.0:3301
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:172:
 warning: already initialized constant VERSION
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:174:
 warning: already initialized constant ProgName
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:181:
 warning: already initialized constant DEBUG
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:182:
 warning: already initialized constant INFO
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:183:
 warning: already initialized constant WARN
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:184:
 warning: already initialized constant ERROR
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:185:
 warning: already initialized constant FATAL
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:186:
 warning: already initialized constant UNKNOWN
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:424:
 warning: already initialized constant SEV_LABEL
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:436:
 warning: already initialized constant Format
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:537:
 warning: already initialized constant SiD
Creating RESTful controller for "posts" using Reststop pull version number here
Creating RESTful controller for "comments" using Reststop pull version number 
here
Creating RESTful controller for "sessions" using Reststop pull version number 
here
127.0.0.1 - - [09/Jun/2010 08:28:07] "GET / HTTP/1.1" 404 45 0.4875

And in the browser, I see:

Camping problem!
/not found


and If I force the login:

http://127.0.0.1:3301/login

Plenty of errors again ...

RuntimeError: Can't find template _login
        (eval):16:in `camping_render'
        /Library/Ruby/Site/1.8/reststop.rb:135:in `render'
        /Users/montx/Documents/Camping/reststop/examples/blog.rb:101:in `get'
        (eval):27:in `send'
        (eval):27:in `camping_service'
        (eval):27:in `catch'
        (eval):27:in `camping_service'
        /Library/Ruby/Site/1.8/reststop.rb:53:in `service'
        (eval):38:in `call'
        /Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/session/cookie.rb:37:in 
`call'
        (eval):42:in `call'
        
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:176:in 
`call'
        /Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:47:in `_call'
        /Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:35:in `call'
        /Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in 
`call'
        /Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in 
`call'
        
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:242:in 
`call'
        /Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in 
`call'
        /Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/chunked.rb:15:in `call'
        
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/handler/mongrel.rb:67:in 
`process'
        
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in
 `process_client'
        
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
 `each'
        
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
 `process_client'
        
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
 `run'
        
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
 `initialize'
        
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
 `new'
        
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
 `run'
        
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
 `initialize'
        
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
 `new'
        
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
 `run'
        
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/handler/mongrel.rb:38:in `run'
        /Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:155:in `start'
        
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:144:in 
`start'
        /Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:83:in `start'
        /Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/camping:9
        /usr/bin/camping:19:in `load'
        /usr/bin/camping:19



So, this versions is 'ready for test' ????

:-)

thanks,


regards,

raimon
_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to