PLEASE! Need help with my RoR app

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 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

On Jun 15, 10:37 am, RoR_Nb [email protected] 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

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:inmap’
/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:ingenerate’
/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:inrewrite_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:inrewrite’
/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:insend’
/home/25926/data/rubygems/gems/gems/actionpack-2.1.0/lib/
action_view/helpers/url_helper.rb:71:in url_for' (eval):17:inthoughts_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:inpolymorphic_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:inurl_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:inexecute’
/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:inrender’
/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:inrender_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:inrender_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:inrender_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:inrender’
/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:inrender’
/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:incustom’
/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:inrespond’
/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:inrespond’
/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:inindex’
/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:inperform_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:inperform_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:inmeasure’
/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:inperform_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:incache’
/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:inperform_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:inprocess_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:inprocess’
/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:inhandle_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:insynchronize’
/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:indispatch_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:inprocess’
/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:inprocess’
/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:ineach’
/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:inrun’
/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:innew’
/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:ininitialize’
/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:inrun’
/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:ineach’
/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:inrun’
/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

On Jun 15, 11:51 am, RoR_Nb [email protected] 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

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.

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, 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?

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