Open xian7 opened 11 years ago
thanks for reporting this!
I have the same error. production.log says:
Processing Admin::SnippetFilesController#index (for 79.235.83.126 at 2013-08-28 17:40:57) [GET]
Parameters: {"controller"=>"admin/snippet_files", "action"=>"index"}
Rendering template within layouts/application
Rendering admin/snippet_files/index
ActionView::TemplateError (undefined method `any?' for nil:NilClass) on line #12 of /usr/local/rvm/gems/ruby-1.9.3-p448@meine-domain/gems/radiant-snippets-extension-1.1.1/app/views/admin/snippet_files/index.html.haml:
9: - thead.title_header do
10: %th.name= t('snippet')
11: %tbody
12: - if @snippet_files.any?
13: - @snippet_files.each do |snippet|
14: %tr[snippet]
15: - render_region :tbody, :locals => {:snippet => snippet} do |tbody|
/usr/local/rvm/gems/ruby-1.9.3-p448@meine-domain/gems/radiant-snippets-extension-1.1.1/app/views/admin/snippet_files/index.html.haml:12:in `_run_haml_47usr47local47rvm47gems47ruby45146946345p44864einfacher45studieren47gems47radiant45snippets45extension45146146147app47views47admin47snippet_files47index46html46haml'
haml (3.1.8) lib/haml/helpers/action_view_mods.rb:13:in `render_with_haml'
haml (3.1.8) lib/haml/helpers/action_view_mods.rb:13:in `render_with_haml'
radiant (1.1.3) lib/radiant/resource_responses.rb:18:in `response_for'
radiant (1.1.3) app/controllers/admin/resource_controller.rb:47:in `index'
/usr/local/rvm/gems/ruby-1.9.3-p448@meine-domain/gems/compass-rails-1.0.3/lib/compass-rails/railties/2_3.rb:9:in `process_with_compass'
sass (3.2.10) lib/sass/plugin/rack.rb:54:in `call'
<internal:prelude>:10:in `synchronize'
passenger (4.0.14) lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request'
passenger (4.0.14) lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request'
passenger (4.0.14) lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'
passenger (4.0.14) lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'
Rendering /var/customers/webs/rvmuser/meine-domain-de/public/500.html (500 Internal Server Error)
I just pushed up a new gem which should fix this: bundle update radiant-snippets-extension
Thanks for fixing it so quick!
I did "bundle update" but now I can't start it:
Config definition error: 'defaults.snippet.filter' is defined twice:
1. /usr/local/rvm/gems/ruby-1.9.3-p448@meine-domain/gems/radiant-snippets-extension-1.1.2/config/initializers/radiant_config.rb:2:in `block in <top (required)>'
2. /usr/local/rvm/gems/ruby-1.9.3-p448@meine-domain/gems/radiant-1.1.3/config/initializers/radiant_config.rb:10:in `block in <top (required)>'
(LoadError)
/usr/local/rvm/gems/ruby-1.9.3-p448@meine-domain/gems/radiant-1.1.3/app/models/radiant/config.rb:192:in `define'
[.....]
What did I wrong?
You did nothing wrong. I removed that config setting from radiant core on the master branch because it did not belong there. We should probably backport that and release 1.1.4
I just merged the commit that removes this config entry from core into the 1.1.3 branch; https://github.com/radiant/radiant/commit/204968452b6828e7ab1b4b72d10e52ae93312164
@jomz Did you also update the gem on rubygems?
No, not yet, there's a failing spec I'd like to fix first. I'll try to release today.
Fixed and pushed. @saturnflyer could you build and release 1.1.4? This issue can be closed then.
@saturnflyer scrap that, Travis failed on the 1.x branch, investigating.
While we get radiant fixed up and the specs running for a new release, I pushed up a new version of radiant-snippets-extension. Update your Gemfile to use version 1.1.3 and you should be ok.
Summary: Clicking on "Sinppet Files" in a fresh new project results in a 500 "Application error."
Radiant Version: 1.1.3 Database: PostgreSQL 9.2 System: FreeBSD 8.3
Details:
Here is the exception from the production log file:
Thoughts: So, yeah... @snippet_files is nil when it is probably expected to be an empty enumeration.