# I'm restarting to work with ruby on rails, but having configurations problems

**URL:** <https://www.ruby-forum.com/t/im-restarting-to-work-with-ruby-on-rails-but-having-configurations-problems/176198>\
**Category:** Rails\
**Created:** [September 26, 2009, 7:30am UTC](https://www.ruby-forum.com/t/im-restarting-to-work-with-ruby-on-rails-but-having-configurations-problems/176198 "2009-09-26T07:30:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Delirium\_tremens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/2acd7d/32.png) [@Delirium\_tremens](https://www.ruby-forum.com/u/Delirium_tremens)\
**Post date:** [September 26, 2009, 7:30am UTC](https://www.ruby-forum.com/t/im-restarting-to-work-with-ruby-on-rails-but-having-configurations-problems/176198/1 "2009-09-26T07:30:58Z")

</div>

I have the Shovell source code from the book Simply Rails 2, but I’m  
having problems running it.

```
"Getting started
Here’s how to get rolling:

   1.
      Create your databases and edit config/database.yml

      Rails needs to know your login and password.
   2.
      Use script/generate to create your models and controllers

      To see all available options, run it without parameters.
   3.
      Set up a default route and remove or rename this file

      Routes are set up in config/routes.rb."
```

I took step 1, then since the models and controllers are already  
generated for a source code that already exists, I skipped step 2 and  
since a default route is already set for a source code that already  
exists, I skipped step 3.

My config/roubes.rb has map.root :controller =\> “stories”, but  
[http://localhost:3000/](http://localhost:3000/) still doesn’t load the stories controller  
index. Why?

---

<div class="post-metadata">

**Author:** ![Delirium\_tremens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/2acd7d/32.png) [@Delirium\_tremens](https://www.ruby-forum.com/u/Delirium_tremens)\
**Post date:** [September 26, 2009, 7:49am UTC](https://www.ruby-forum.com/t/im-restarting-to-work-with-ruby-on-rails-but-having-configurations-problems/176198/2 "2009-09-26T07:49:07Z")

</div>

On 26 set, 02:29, Delirium tremens [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 1. 
> 
> since a default route is already set for a source code that already  
> exists, I skipped step 3.
> 
> My config/roubes.rb has map.root :controller =\> “stories”, buthttp://localhost:3000/still doesn’t load the stories controller  
> index. Why?

I hadn’t deleted public/index.html, but now I’m getting the error  
message [http://pastie.org/631341](http://pastie.org/631341) How to solve?

---

<div class="post-metadata">

**Author:** ![Delirium\_tremens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/2acd7d/32.png) [@Delirium\_tremens](https://www.ruby-forum.com/u/Delirium_tremens)\
**Post date:** [September 26, 2009, 12:42pm UTC](https://www.ruby-forum.com/t/im-restarting-to-work-with-ruby-on-rails-but-having-configurations-problems/176198/3 "2009-09-26T12:42:55Z")

</div>

I do not follow that book although it is updated for Rails 2.0.  
Make sure you have map.resources :stories on routes,rb

---

<div class="post-metadata">

**Author:** ![Delirium\_tremens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/2acd7d/32.png) [@Delirium\_tremens](https://www.ruby-forum.com/u/Delirium_tremens)\
**Post date:** [September 26, 2009, 8:04am UTC](https://www.ruby-forum.com/t/im-restarting-to-work-with-ruby-on-rails-but-having-configurations-problems/176198/4 "2009-09-26T08:04:20Z")

</div>

On 26 set, 02:47, Delirium tremens [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > 1. Routes are set up in config/routes.rb."  
> > messagehttp://pastie.org/631341How to solve?  
> > After deleting public/index.html, I renamed application.rb to  
> > application\_controller.rb, then used rake to migrate my data with rake  
> > db:migrated and it worked!

---

<div class="post-metadata">

**Author:** ![Delirium\_tremens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/2acd7d/32.png) [@Delirium\_tremens](https://www.ruby-forum.com/u/Delirium_tremens)\
**Post date:** [September 26, 2009, 12:52pm UTC](https://www.ruby-forum.com/t/im-restarting-to-work-with-ruby-on-rails-but-having-configurations-problems/176198/5 "2009-09-26T12:52:52Z")

</div>

> **[LMGTFY - Let Me Google That For You](https://lmgtfy.app/?q=uninitialized%2Bconstant%2BApplicationController)**
>
> For all those people who find it more convenient to bother you with their question rather than to Google it for themselves.

This code must be from before 2.3… you need to update it:

:; rake rails:update

Or, you can rename the controllers/application.rb file to  
controllers/application\_controller.rb - but you’re better off running  
the  
command. Depending on how old the code is, you might create a whole new  
rails app, then copy your code to it or replace config files with the  
new  
ones and create any missing folders.

Lots of folks went through this upgrading to 2.3 or 2.3.2… google it a  
bit.

Richard

Try the first link, you might read up on
