# PLEASE! Need help with my RoR app

**URL:** <https://www.ruby-forum.com/t/please-need-help-with-my-ror-app/140505>\
**Category:** Rails\
**Created:** [June 15, 2008, 11:40am UTC](https://www.ruby-forum.com/t/please-need-help-with-my-ror-app/140505 "2008-06-15T11:40:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![RoR\_Nb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@RoR\_Nb](https://www.ruby-forum.com/u/RoR_Nb)\
**Post date:** [June 15, 2008, 11:40am UTC](https://www.ruby-forum.com/t/please-need-help-with-my-ror-app/140505/1 "2008-06-15T11:40:32Z")

</div>

Hi there, this is my first time setting up a ruby on rails container,  
ran script/generate controller main index, its working fine,  
but then i ran script/generate scaffold thoughts title:string  
body:text (just to test it), then i ran rake db:migrate and everything  
is still ok.

but then i goto [myapp.com/thoughts](http://myapp.com/thoughts) and t displays the following  
message.

We’re sorry, but something went wrong.

We’ve been notified about this issue and we’ll take a look at it  
shortly.

PLEASE NEED HELP, i’ve been 2 freeking weeks, and it’s driving me nuts  
to the point that suicide seems to be the only solution to my problem

thanks

---

<div class="post-metadata">

**Author:** ![RoR\_Nb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@RoR\_Nb](https://www.ruby-forum.com/u/RoR_Nb)\
**Post date:** [June 15, 2008, 11:44am UTC](https://www.ruby-forum.com/t/please-need-help-with-my-ror-app/140505/2 "2008-06-15T11:44:40Z")

</div>

On Jun 15, 10:37 am, RoR\_Nb [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> We’ve been notified about this issue and we’ll take a look at it  
> shortly.

The real error message should be in your log files somewhere (in your  
app’s log folder)

> PLEASE NEED HELP, i’ve been 2 freeking weeks, and it’s driving me nuts  
> to the point that suicide seems to be the only solution to my problem

I doubt that would actually help.

Fred

---

<div class="post-metadata">

**Author:** ![RoR\_Nb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@RoR\_Nb](https://www.ruby-forum.com/u/RoR_Nb)\
**Post date:** [June 15, 2008, 12:52pm UTC](https://www.ruby-forum.com/t/please-need-help-with-my-ror-app/140505/3 "2008-06-15T12:52:12Z")

</div>

this is weird because i dont have this kind of problems in my local  
pc,  
Here’s what the error says:

ActionView::TemplateError (undefined method `to\_sym’ for nil:NilClass)  
on line #15 of thoughts/index.html.erb:  
12:

\<%=h thoughts.title %\>  
13: \<%=h thoughts.body %\>  
14:   
15: \<% end %\>  
16:   
17:  
18:   

```
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/

```

action\_controller/routing/route.rb:145:in `extra_keys' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/routing/route.rb:145:in`map’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/routing/route.rb:145:in `extra_keys' generated code (/home/25926/data/rubygems/gems/gems/ actionpack-2.1.0/lib/action_controller/routing/route.rb:45):3:in`generate’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/routing/route\_set.rb:337:in `generate' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/url_rewriter.rb:131:in`rewrite\_path’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/url\_rewriter.rb:110:in `rewrite_url' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/url_rewriter.rb:88:in`rewrite’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/base.rb:621:in `url_for' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_view/helpers/url_helper.rb:71:in`send’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_view/helpers/url\_helper.rb:71:in `url_for' (eval):17:in`thoughts\_path’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/polymorphic\_routes.rb:101:in `send!' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/polymorphic_routes.rb:101:in`polymorphic\_url’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/polymorphic\_routes.rb:108:in `polymorphic_path' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_view/helpers/url_helper.rb:79:in`url\_for’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_view/helpers/url\_helper.rb:199:in `link_to' app/views/thoughts/index.html.erb:15:in`\_run\_erb\_47app47views47thoughts47index46html46erb’  
app/views/thoughts/index.html.erb:10:in `each' app/views/thoughts/index.html.erb:10:in`\_run\_erb\_47app47views47thoughts47index46html46erb’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_view/base.rb:338:in `send' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_view/base.rb:338:in`execute’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_view/template\_handlers/compilable.rb:29:in `send' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_view/template_handlers/compilable.rb:29:in`render’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_view/template.rb:35:in `render' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_view/template.rb:22:in`render\_template’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_view/base.rb:245:in `render_file' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/base.rb:1108:in`render\_for\_file’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/base.rb:865:in `render_with_no_layout' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/base.rb:880:in`render\_with\_no\_layout’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/layout.rb:251:in `render_without_benchmark' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/benchmarking.rb:51:in`render’  
/home/25926/data/rubygems/gems/gems/activesupport-2.1.0/lib/  
active\_support/core\_ext/benchmark.rb:8:in `realtime' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/benchmarking.rb:51:in`render’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/mime\_responds.rb:131:in `send' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/mime_responds.rb:131:in`custom’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/mime\_responds.rb:160:in `call' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/mime_responds.rb:160:in`respond’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/mime\_responds.rb:154:in `each' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/mime_responds.rb:154:in`respond’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/mime\_responds.rb:107:in `respond_to' app/controllers/thoughts_controller.rb:7:in`index’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/base.rb:1162:in `send' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/base.rb:1162:in`perform\_action\_without\_filters’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/filters.rb:580:in `call_filters' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/filters.rb:573:in`perform\_action\_without\_benchmark’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/benchmarking.rb:68:in  
`perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in`measure’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/benchmarking.rb:68:in  
`perform_action_without_rescue' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/rescue.rb:201:in`perform\_action\_without\_caching’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/caching/sql\_cache.rb:13:in `perform_action' /home/25926/data/rubygems/gems/gems/activerecord-2.1.0/lib/ active_record/connection_adapters/abstract/query_cache.rb:33:in`cache’  
/home/25926/data/rubygems/gems/gems/activerecord-2.1.0/lib/  
active\_record/query\_cache.rb:8:in `cache' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/caching/sql_cache.rb:12:in`perform\_action’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/base.rb:529:in `send' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/base.rb:529:in`process\_without\_filters’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/filters.rb:569:in  
`process_without_session_management_support' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/session_management.rb:130:in`process’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/base.rb:389:in `process' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/dispatcher.rb:149:in`handle\_request’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/dispatcher.rb:107:in `dispatch' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/dispatcher.rb:104:in`synchronize’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/dispatcher.rb:104:in `dispatch' /home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/ action_controller/dispatcher.rb:120:in`dispatch\_cgi’  
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/  
action\_controller/dispatcher.rb:35:in `dispatch' /home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/ mongrel/rails.rb:76:in`process’  
/home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/  
mongrel/rails.rb:74:in `synchronize' /home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/ mongrel/rails.rb:74:in`process’  
/home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/  
mongrel.rb:159:in `process_client' /home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/ mongrel.rb:158:in`each’  
/home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/  
mongrel.rb:158:in `process_client' /home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/ mongrel.rb:285:in`run’  
/home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/  
mongrel.rb:285:in `initialize' /home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/ mongrel.rb:285:in`new’  
/home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/  
mongrel.rb:285:in `run' /home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/ mongrel.rb:268:in`initialize’  
/home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/  
mongrel.rb:268:in `new' /home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/ mongrel.rb:268:in`run’  
/home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/  
mongrel/configurator.rb:282:in `run' /home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/ mongrel/configurator.rb:281:in`each’  
/home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/  
mongrel/configurator.rb:281:in `run' /home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/bin/ mongrel_rails:128:in`run’  
/home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/lib/  
mongrel/command.rb:212:in `run’  
/home/25926/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/bin/  
mongrel\_rails:281

Rendering /home/25926/containers/rails/ets/public/500.html (500  
Internal Server Error)

And the actual view has this code:

# Listing thoughts

\<% for thoughts in @thoughts %\>

\<% end %\>

| Title | Body | Thought date |
| --- | --- | --- |
| \<%=h thoughts.title %\> | \<%=h thoughts.body %\> |

  

\<%= link\_to ‘New thoughts’, new\_thought\_path %\>

Thanks for replying my msn

---

<div class="post-metadata">

**Author:** ![RoR\_Nb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@RoR\_Nb](https://www.ruby-forum.com/u/RoR_Nb)\
**Post date:** [June 15, 2008, 1:48pm UTC](https://www.ruby-forum.com/t/please-need-help-with-my-ror-app/140505/4 "2008-06-15T13:48:01Z")

</div>

On Jun 15, 11:51 am, RoR\_Nb [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> this is weird because i dont have this kind of problems in my local  
> pc,  
> Here’s what the error says:

looks like it’s not liking your new\_thought\_path.

Fred

---

<div class="post-metadata">

**Author:** ![RoR\_Nb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@RoR\_Nb](https://www.ruby-forum.com/u/RoR_Nb)\
**Post date:** [June 15, 2008, 5:46pm UTC](https://www.ruby-forum.com/t/please-need-help-with-my-ror-app/140505/5 "2008-06-15T17:46:46Z")

</div>

I’d also add that you’re running in production mode. You should run in  
development mode while you are developing. That’ll make life easier.

How you do that depends on what server software you’re using. If  
you’re using mongrel or webrick, use

script/server -edevelopment

or set your RAILS\_ENV variable to development.

---

<div class="post-metadata">

**Author:** ![RoR\_Nb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@RoR\_Nb](https://www.ruby-forum.com/u/RoR_Nb)\
**Post date:** [June 15, 2008, 8:53pm UTC](https://www.ruby-forum.com/t/please-need-help-with-my-ror-app/140505/6 "2008-06-15T20:53:35Z")

</div>

Yeah, i thought it was not liking my link, but that’s very weird  
because that’s the way it is in my local

“map.resources :thoughts” is what i have in my routes/rb,  
and as far as i know the map.resources should create the basics links.  
exacly like the way it is right now.

I’m using mongrel.

I switched to the development environment and it seems to works,  
BUT, when i submit data it gives me more problems,  
so i go back to [myapp.com/thoughts](http://myapp.com/thoughts), and the application  
displays thedata i ust submitted.

weird. i guess that the way i should keep working with it is in  
development mode and then read  
the logs to solve it, right?

---

<div class="post-metadata">

**Author:** ![RoR\_Nb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@RoR\_Nb](https://www.ruby-forum.com/u/RoR_Nb)\
**Post date:** [June 15, 2008, 9:50pm UTC](https://www.ruby-forum.com/t/please-need-help-with-my-ror-app/140505/7 "2008-06-15T21:50:50Z")

</div>

I’ve seen this behaviour when I’ve found myself running in production  
mode without thinking - the production database (sqlite3 in my case)  
is empty and you get 500 errors - once the db schema is cloned to  
pruduction - using rake, I think… - you’ll see results in  
production.

J
