edge rails: `scan': undefined method `empty?' for nil:NilCla

Anybody possibly know what's going on?

upgrading my existing rails app to edge results in this error

thoughts?

/Users/rogerpack/dev/ruby_186_installed/lib/ruby/1.8/erb.rb:469:in
`scan': undefined method `empty?' for nil:NilClass (NoMethodError)
  from
/Users/rogerpack/dev/ruby_186_installed/lib/ruby/1.8/erb.rb:525:in
`compile'
  from
/Users/rogerpack/dev/ruby_186_installed/lib/ruby/1.8/erb.rb:692:in
`initialize'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/actionpack/lib/action_view/template_handlers/erb.rb:51:in
`new'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/actionpack/lib/action_view/template_handlers/erb.rb:51:in
`compile'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/actionpack/lib/action_view/template_handler.rb:11:in
`call'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/actionpack/lib/action_view/renderable.rb:21:in
`_unmemoized_compiled_source'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/activesupport/lib/active_support/memoizable.rb:53:in
`compiled_source'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/activesupport/lib/active_support/memoizable.rb:21:in
`__send__'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/activesupport/lib/active_support/memoizable.rb:21:in
`memoize_all'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/activesupport/lib/active_support/memoizable.rb:18:in
`each'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/activesupport/lib/active_support/memoizable.rb:18:in
`memoize_all'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/activesupport/lib/active_support/memoizable.rb:13:in
`freeze'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/actionpack/lib/action_view/paths.rb:88:in
`reload!'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/actionpack/lib/action_view/paths.rb:102:in
`templates_in_path'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/actionpack/lib/action_view/paths.rb:100:in
`each'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/actionpack/lib/action_view/paths.rb:100:in
`templates_in_path'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/actionpack/lib/action_view/paths.rb:86:in
`reload!'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/actionpack/lib/action_view/paths.rb:78:in
`load'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/actionpack/lib/action_view/paths.rb:109:in
`load'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/actionpack/lib/action_view/paths.rb:109:in
`each'
  from
/Users/rogerpack/dev/degreesearch/vendor/rails/actionpack/lib/action_view/paths.rb:109:in
`load'
  from
/Users/rogerpack/dev/degreesearch/config/../vendor/rails/railties/lib/initializer.rb:350:in
`load_view_paths'
  from
/Users/rogerpack/dev/degreesearch/config/../vendor/rails/railties/lib/initializer.rb:177:in
`process'
  from
/Users/rogerpack/dev/degreesearch/config/../vendor/rails/railties/lib/initializer.rb:110:in
`send'
  from
/Users/rogerpack/dev/degreesearch/config/../vendor/rails/railties/lib/initializer.rb:110:in
`run'
  from /Users/rogerpack/dev/degreesearch/config/environment.rb:15
  from
/Users/rogerpack/dev/ruby_186_installed/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
  from
/Users/rogerpack/dev/ruby_186_installed/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
  from
/Users/rogerpack/dev/ruby_186_installed/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/rack/adapter/rails.rb:31:in
`load_application'
  from
/Users/rogerpack/dev/ruby_186_installed/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/rack/adapter/rails.rb:23:in
`initialize'
  from
/Users/rogerpack/dev/ruby_186_installed/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/rack/adapter/loader.rb:32:in
`new'
  from
/Users/rogerpack/dev/ruby_186_installed/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/rack/adapter/loader.rb:32:in
`for'
  from
/Users/rogerpack/dev/ruby_186_installed/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/thin/controllers/controller.rb:162:in
`load_adapter'
  from
/Users/rogerpack/dev/ruby_186_installed/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/thin/controllers/controller.rb:66:in
`start'
  from
/Users/rogerpack/dev/ruby_186_installed/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/thin/runner.rb:166:in
`send'
  from
/Users/rogerpack/dev/ruby_186_installed/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/thin/runner.rb:166:in
`run_command'
  from
/Users/rogerpack/dev/ruby_186_installed/lib/ruby/gems/1.8/gems/thin-0.8.2/lib/thin/runner.rb:136:in
`run!'
  from
/Users/rogerpack/dev/ruby_186_installed/lib/ruby/gems/1.8/gems/thin-0.8.2/bin/thin:6
  from /Users/rogerpack/dev/ruby_186_installed/bin/thin:20:in `load'
  from /Users/rogerpack/dev/ruby_186_installed/bin/thin:20

I've been seeing the same problem when trying to upgrade an application
from Rails 2.1.2 to 2.2.2. I had set up a controller to serve static
content wrapped in the site's template. One of the users dropped some
JPEG files into the /app/views/static directory, and that seems to be
jamming up the works with 2.2.2.

Now I know how to solve the problem (by removing the the non-.html.erb
files), but I'm wondering why there is a difference between 2.1.2 and
2.2.2.

--jeff

Now I know how to solve the problem (by removing the the non-.html.erb
files), but I'm wondering why there is a difference between 2.1.2 and
2.2.2.

Theoretically it was to allow for all the erb templates to be loaded up
once at load time [it just happens to attempt this weirdness with non
erb files, too...I'm not sure if it's a bug or not...I believe I filed a
report of it on lighthouse].
Cheers!
-=R

Is there any way to exclude certain template file types (or non-
template files) from being preloaded, say by their file type?
Specifically, I was thinking of jpeg, swf files, etc. which we do not
(!) wish to be loaded/parsed at startup time.
Could there be a configuration option which handles this?

Yitzhak Bar Geva wrote:

Is there any way to exclude certain template file types (or non-
template files) from being preloaded, say by their file type?
Specifically, I was thinking of jpeg, swf files, etc. which we do not
(!) wish to be loaded/parsed at startup time.
Could there be a configuration option which handles this?

I think that trunk was updated recently to handle them better [i.e. only
.rhtml -> compile].

http://rails.lighthouseapp.com/projects/8994/tickets/1187-binary-files-are-attempted-to-be-pre-compiled-as-erb#ticket-1187-2

GL!