# Problem with routes.rb in rails 2.3.2

**URL:** <https://www.ruby-forum.com/t/problem-with-routes-rb-in-rails-2-3-2/172168>\
**Category:** Rails\
**Created:** [July 16, 2009, 2:46am UTC](https://www.ruby-forum.com/t/problem-with-routes-rb-in-rails-2-3-2/172168 "2009-07-16T02:46:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sultan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aeb1de/32.png) [@sultan](https://www.ruby-forum.com/u/sultan)\
**Post date:** [July 16, 2009, 2:46am UTC](https://www.ruby-forum.com/t/problem-with-routes-rb-in-rails-2-3-2/172168/1 "2009-07-16T02:46:08Z")

</div>

Problem with routes.rb in rails 2.3.2:

The problems occurs if the rails version is “frozen” or not. I get the  
same problem when the routes are present in the routes.rb file.

In order to try to figure out the problem, I commented out all the  
routes in routes.rb, so the following are the only two statements in  
routes.rb:

ActionController::Routing::Routes.draw do |map|

end

When I run

“# rake routes –trace”

I get:  
(in /home/aksrefle/aks232)  
\*\* Invoke routes (first\_time)  
\*\* Invoke environment (first\_time)  
\*\* Execute environment  
rake aborted!  
interning empty string  
/home/aksrefle/aks232/vendor/rails/actionpack/lib/action\_view/  
template.rb:215:in `to_sym' /home/aksrefle/aks232/vendor/rails/actionpack/lib/action_view/ template.rb:215:in`valid\_locale?’  
/home/aksrefle/aks232/vendor/rails/actionpack/lib/action\_view/  
template.rb:234:in `split' /home/aksrefle/aks232/vendor/rails/actionpack/lib/action_view/ template.rb:113:in`initialize’  
/home/aksrefle/aks232/vendor/rails/actionpack/lib/action\_view/  
template.rb:87:in `new' /home/aksrefle/aks232/vendor/rails/actionpack/lib/action_view/ template.rb:87:in`create\_template’  
/home/aksrefle/aks232/vendor/rails/actionpack/lib/action\_view/  
template.rb:82:in `templates_in_path' /home/aksrefle/aks232/vendor/rails/actionpack/lib/action_view/ template.rb:81:in`each’  
/home/aksrefle/aks232/vendor/rails/actionpack/lib/action\_view/  
template.rb:81:in `templates_in_path' /home/aksrefle/aks232/vendor/rails/actionpack/lib/action_view/ template.rb:64:in`load!’  
/home/aksrefle/aks232/vendor/rails/activesupport/lib/active\_support/  
dependencies.rb:147:in `to_proc' /home/aksrefle/aks232/vendor/rails/actionpack/lib/action_view/paths.rb: 40:in`each’  
/home/aksrefle/aks232/vendor/rails/actionpack/lib/action\_view/paths.rb:  
40:in `load!' /home/aksrefle/aks232/config/../vendor/rails/railties/lib/ initializer.rb:381:in`load\_view\_paths’  
/home/aksrefle/aks232/config/…/vendor/rails/railties/lib/  
initializer.rb:192:in `process' /home/aksrefle/aks232/config/../vendor/rails/railties/lib/ initializer.rb:113:in`send’  
/home/aksrefle/aks232/config/…/vendor/rails/railties/lib/  
initializer.rb:113:in `run' /home/aksrefle/aks232/config/environment.rb:19 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in`gem\_original\_require’  
/usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:31:in `require' /home/aksrefle/aks232/vendor/rails/activesupport/lib/active_support/ dependencies.rb:156:in`require’  
/home/aksrefle/aks232/vendor/rails/activesupport/lib/active\_support/  
dependencies.rb:521:in `new_constants_in' /home/aksrefle/aks232/vendor/rails/activesupport/lib/active_support/ dependencies.rb:156:in`require’  
/home/aksrefle/aks232/vendor/rails/railties/lib/tasks/misc.rake:4  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `call' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in`execute’  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in`execute’  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in  
`invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in`synchronize’  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in  
`invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:588:in`invoke\_prerequisites’  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in`invoke\_prerequisites’  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:577:in  
`invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in`synchronize’  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in  
`invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:in`invoke’  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in  
`invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in`top\_level’  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in`top\_level’  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in  
`standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1999:in`top\_level’  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in`standard\_exception\_handling’  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31 /usr/bin/rake:19:in`load’  
/usr/bin/rake:19

---

<div class="post-metadata">

**Author:** ![sultan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aeb1de/32.png) [@sultan](https://www.ruby-forum.com/u/sultan)\
**Post date:** [July 16, 2009, 5:13am UTC](https://www.ruby-forum.com/t/problem-with-routes-rb-in-rails-2-3-2/172168/2 "2009-07-16T05:13:21Z")

</div>

On Jul 15, 5:45 pm, sultan [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> end
> 
> When I run
> 
> “# rake routes –trace”
> 
> I get:

Why are you even trying that? Don’t.

-eric

---

<div class="post-metadata">

**Author:** ![sultan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aeb1de/32.png) [@sultan](https://www.ruby-forum.com/u/sultan)\
**Post date:** [July 16, 2009, 2:59pm UTC](https://www.ruby-forum.com/t/problem-with-routes-rb-in-rails-2-3-2/172168/3 "2009-07-16T14:59:59Z")

</div>

I get the same error on the website. This was my attempt at trying to  
figure out where the problem is. At first I thought it was in  
environment.rb, now I am thinking it has something to do with  
routes.rb.

---

<div class="post-metadata">

**Author:** ![sultan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aeb1de/32.png) [@sultan](https://www.ruby-forum.com/u/sultan)\
**Post date:** [July 16, 2009, 8:40pm UTC](https://www.ruby-forum.com/t/problem-with-routes-rb-in-rails-2-3-2/172168/4 "2009-07-16T20:40:49Z")

</div>

Given the second method down in the trace, I’d say you’ve not set the  
locale on your machine. See the section on locales here:

[http://articles.slicehost.com/2008/4/25/ubuntu-hardy-setup-page-2](http://articles.slicehost.com/2008/4/25/ubuntu-hardy-setup-page-2)

–Matt J.

---

<div class="post-metadata">

**Author:** ![sultan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aeb1de/32.png) [@sultan](https://www.ruby-forum.com/u/sultan)\
**Post date:** [July 20, 2009, 3:53pm UTC](https://www.ruby-forum.com/t/problem-with-routes-rb-in-rails-2-3-2/172168/5 "2009-07-20T15:53:29Z")

</div>

Matt, thanks for you response.  
Initially I thought the problem was with locale, but I am using the  
default locale and have not changed anything in the configuration.  
Eventually, I created a new rails 2.3.2 project and added my  
application, one controller at a time. At each step I ran “rake  
routes” and made sure it worked. I must have run a hundred “rake  
routes” (well, maybe twenty) and eventually I had almost the whole  
application working. I finally ran into the problem again when I moved  
into the views/layouts directory a layout erb file that had no  
corresponding controller and views with the same name. As soon as I  
deleted the “extra” layouts, it worked again. I am not sure if this  
was the root cause, but my application is now working under rails  
2.3.2.
