Routing error

10 views
Skip to first unread message

Yuri Redaelli

unread,
May 12, 2016, 8:49:23 AM5/12/16
to rubyonra...@googlegroups.com
Hi all,

for first sorry for my english.

I've a Rails app with a namespaced route that works fine on localhost
but does not work on remote Server.

This is my error:

ActionController::RoutingError (uninitialized constant
Monitor::PapTagsController):

My routes.rb

namespace :monitor do
resources :pap_tags do
resources :pap_tag_rules
end
end

file is: pap_tags_controller.rb

class PapTagsController < ApplicationController
...
end

It's very strange, can you help me?

thanks.

--
Posted via http://www.ruby-forum.com/.

Neo Elit

unread,
May 12, 2016, 9:22:51 AM5/12/16
to Ruby on Rails: Talk
Your PapTagsController should be inside monitor module. I don't how it worked in local server without that.

file: /app/controllers/monitor/pap_tags_controller.rb

module Monitor

  class PapTagsController < ApplicationController
    ...
  end
end

Emmanuel Abia

unread,
May 12, 2016, 5:27:42 PM5/12/16
to rubyonrails-talk@googlegroups com

What routing error are you getting on the server?

> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bb7068001ae39b25499e6845a1c6c8dd%40ruby-forum.com.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages