This project is archived and is in readonly mode.

#4037 ✓stale
kdgundermann

ActionView::TemplateError crashes Ruby 1.9.1 on Windows

Reported by kdgundermann | February 22nd, 2010 @ 05:57 PM

I have just installed ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]
on Windows XP SP3

created a new rails application:

rails niltest cd niltest ruby script\generate controller niltest edit app\controllers\niltest_controller.rb class NiltestController < ApplicationController

def index

@bla = ""

end

end

edit app\views\niltest\index.html.erb

BlaBla test

<%= @blabla.test %>

edit config\environment.rb # remove Active Record and Action Mailer Framework config.frameworks -= [ :active_record, :action_mailer ]

ruby -d script\server .. .. [2010-02-22 18:39:39] INFO WEBrick 1.3.1 [2010-02-22 18:39:39] INFO ruby 1.9.1 (2010-01-10) [i386-mingw32] [2010-02-22 18:39:39] INFO WEBrick::HTTPServer#start: pid=1872 port=3000 C:/Rails/niltest/app/views/niltest/index.html.erb:2: warning: instance variable
@blabla not initialized Exception NoMethodError' at C:/Ruby19/lib/ruby/gems/1.9.1/gems/activesupport-2.<br/> 3.5/lib/active_support/whiny_nil.rb:52 - private methodtest' called for nil:Ni
lClass
Exception NilClass' at C:/Ruby19/lib/ruby/gems/1.9.1/gems/actionpack-2.3.5/lib/<br/> action_view/template.rb:213 -<br/> ActionView::TemplateError (private methodtest' called for nil:NilClass) on lin
e #2 of app/views/niltest/index.html.erb:
1:

BlaBla test


2: <%= @blabla.test %>
app/views/niltest/index.html.erb:2
<internal:prelude>:8:in `synchronize'
C:/Ruby19/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
C:/Ruby19/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
C:/Ruby19

And ruby crashes with :

AppName: ruby.exe AppVer: 1.9.1.0 ModName: msvcrt-ruby191.dll
ModVer: 1.9.1.0 Offset: 000e9b36


When using Ruby without the debug flag everything works fine:

ruby script\server

Comments and changes to this ticket

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:50 PM

    • State changed from “new” to “open”

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:50 PM

    • State changed from “open” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages