5

I have an app that has the following in the routes file:

  namespace "admin" do 
    # ADMINISTRATIVE ROUTES ONLY 
    root :to => 'home#index' 
    resources :comments do 
      member do 
        get :approve 
        get :reject 
      end 
    end 
    resources :users do 
      member do 
        get :block 
        get :unblock 
      end 
    end 
  end 

When browing to /admin locally, I am greeted by the appropriate page. On the same URL on the heroku version I get a 404. The route shows correctly in 'heroku rake routes'

Logs are showing:

ActionController::RoutingError (wrong constant name Admin/ 
homeController): 
/disk1/home/slugs/196384_c95a9e3_4463/mnt/.bundle/gems/gems/ 
activesupport-3.0.0.beta4/lib/active_support/inflector/methods.rb: 
103:in `const_defined?'

Any ideas?

Neil Middleton
  • 22,105
  • 18
  • 80
  • 134

3 Answers3

1

It transpires that this is an issue with the right_aws gem that we had in our Gemfile.

Neil Middleton
  • 22,105
  • 18
  • 80
  • 134
  • I am using Devise which relies on right_aws. Because of this, it is not possible to remove right_aws from our app. How else were you able to succumb to this issue? – Christian Fazzini Mar 29 '11 at 19:45
  • Update: Seems to go away with using right_aws, master branch. i.e. in gem file: gem 'right_aws', :git => 'git://github.com/rightscale/right_aws.git' – Christian Fazzini Mar 29 '11 at 19:52
  • More generally, this error can happen when a gem overwrites Rails's String#camelize method. – Jo Liss Jul 24 '12 at 23:14
0

It looks like it's finding a lowercase "homeController" class, but I don't understand why. Check your file to make sure you've named your class correctly?

Andrew Vit
  • 18,961
  • 6
  • 77
  • 84
0

Looks like a bug in the ActiveSupport beta. Are you running exactly the same rails version?

thomasfedb
  • 5,990
  • 2
  • 37
  • 65