Hey folks,
I’m using Windows XP, InstantRails 1.4, Rails 1.1.6, RadRails and
Mongrel.
Everything is set up fine and works (at least for my usual RoR-stuff),
but trying to run the example “Intranet” from the book “Ajax on Rails” -
O’Reilly (Linkt to book:
http://www.oreilly.com/catalog/9780596527440/index.html, Example as
.zip-file: examples / Ajax on Rails · GitLab) - i get a
mongrel-error concerning the routes.rb file:
Running Mongrel server in development mode at 0.0.0.0:3002
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:617:in
method_missing': undefined method
resources’ for
#ActionController::Routing::RouteSet:0x3388018 (NoMethodError)
from ./config/…/config/routes.rb:4
from
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:591:in
draw' from ./config/../config/routes.rb:1 from D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in
load’
from
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:574:in
reload' from D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:239:in
initialize_routing’
from
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:105:in
process' from D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:42:in
run’
from ./config/environment.rb:5
from
D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
require' from D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/bin/mongrel_rails:78:in
configure_rails’
from
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/bin/mongrel_rails:143:in
run' from D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/lib/mongrel/command.rb:163:in
run’
from
D:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/bin/mongrel_rails:228
from D:\InstantRails\ruby\bin\mongrel_rails:18
from -e:3
The /config/routes.rb:
ActionController::Routing::Routes.draw do |map|
A resource for each post type
map.resources :messages, :plans, :documents, :projects, :contacts,
:member => { :download => :get }
A comments resource under every post type; e.g., /messages/comments
and /documents/comments
map.resources :comments, :path_prefix => “/:post_type/:post_id”
User and session resources
map.resources :sessions
map.resources :users, :collection => { :statuses => :get }, :member =>
{ :status => :any }
Home and default routes
map.home ‘’, :controller => ‘messages’, :action => ‘home’
map.connect ‘:controller/:action/:id’
end
To me this seems like some issue of using the REST-ful-Link-engine
properly, but unfortunately I’m not yet firm with that concept and hope,
somebody has already fixed this issue or knows a workaround to get the
“intranet” going.
Thanks a lot !
taz