# Failing Routes in deployment

**URL:** <https://www.ruby-forum.com/t/failing-routes-in-deployment/190500>\
**Category:** Rails\
**Created:** [June 21, 2010, 7:15pm UTC](https://www.ruby-forum.com/t/failing-routes-in-deployment/190500 "2010-06-21T19:15:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![niczm25](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce73a5/32.png) [@niczm25](https://www.ruby-forum.com/u/niczm25)\
**Post date:** [June 21, 2010, 7:15pm UTC](https://www.ruby-forum.com/t/failing-routes-in-deployment/190500/1 "2010-06-21T19:15:02Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![niczm25](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce73a5/32.png) [@niczm25](https://www.ruby-forum.com/u/niczm25)\
**Post date:** [June 22, 2010, 11:09am UTC](https://www.ruby-forum.com/t/failing-routes-in-deployment/190500/2 "2010-06-22T11:09:52Z")

</div>

Anyone? From what I can see from the guides, what I am doing here is  
correct ([rails.info](http://guides.rails.info/routing.html#controller-namespaces-)  
and-routing)

Does anyone have any pointers?

---

<div class="post-metadata">

**Author:** ![niczm25](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce73a5/32.png) [@niczm25](https://www.ruby-forum.com/u/niczm25)\
**Post date:** [June 24, 2010, 11:44am UTC](https://www.ruby-forum.com/t/failing-routes-in-deployment/190500/3 "2010-06-24T11:44:44Z")

</div>

I have exactly the same problem, works locally (osx) but when deployed  
to Heroku I get a similar error has Neil has detailed above

Rails 3 b4.

John.

---

<div class="post-metadata">

**Author:** ![niczm25](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce73a5/32.png) [@niczm25](https://www.ruby-forum.com/u/niczm25)\
**Post date:** [June 24, 2010, 12:52pm UTC](https://www.ruby-forum.com/t/failing-routes-in-deployment/190500/4 "2010-06-24T12:52:05Z")

</div>

It seems to be dependent on the environment the application is running  
in, development seems to work, I’m seeing a routing failure locally in  
production mode the same as Neil details above and also a ‘staging’  
environment that I’m also running on Heroku

---

<div class="post-metadata">

**Author:** ![niczm25](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce73a5/32.png) [@niczm25](https://www.ruby-forum.com/u/niczm25)\
**Post date:** [June 24, 2010, 3:16pm UTC](https://www.ruby-forum.com/t/failing-routes-in-deployment/190500/5 "2010-06-24T15:16:42Z")

</div>

turns out to be nothing to do with Heroku…pointing the finger too  
early 🙂

Seems to be a problem with Rails 3 Namescope routes (/admin) and the  
right\_aws gem declared in both a production and staging environment in  
the Gemfile.

John.
