twg/comfortable-mexican-sofa — Issue #100: Issue with Creating Site Layout Content.
Author: srivastp
Created: 2011-10-10 23:41:40+00:00
State: open

Hello,

I downloaded the src and created a Rails Project in RubyMine on Windows using Jruby 1.6.4. I modified the Gemfile to look something like this:

************
source 'http://rubygems.org'

gem 'rails', '3.1.0'
gem 'active_link_to'
gem 'paperclip'
gem 'comfortable_mexican_sofa'

gem 'activerecord-jdbcsqlite3-adapter'

group :test do
gem 'jeweler'
end
*******************

I was able to follow the steps upto - 'Creating the Site'

On clicking the Create site - i get the error. The logs show that it failed to create a site in the database. Any thought?

Here is the log:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Started POST "/cms-admin/sites" for 127.0.0.1 at 2011-10-10 17:32:40 -0600

Processing by CmsAdmin::SitesController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"zjXMJFKnrE4Nb7brGm63ul2UDVIVf2poqo4Mm4kLVaA=", "site"=>{"label"=>"users", "hostname"=>"localhost", "path"=>"/cms-admin/users", "locale"=>"en", "is_mirrored"=>"0"}, "commit"=>"Create Site"}

(16.0ms) SELECT name
FROM sqlite_master
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
(0.0ms) SELECT 1 FROM "cms_sites" WHERE ("cms_sites"."hostname" = 'localhost' AND "cms_sites"."path" = '/cms-admin/users') LIMIT 1
(0.0ms) SELECT last_insert_rowid()

SQL (0.0ms) INSERT INTO "cms_sites" ("hostname", "is_mirrored", "label", "locale", "path") VALUES ('localhost', 'f', 'users', 'en', '/cms-admin/users')
CACHE (0.0ms) SELECT last_insert_rowid()
Redirected to http://localhost:3000/cms-admin/sites/1/layouts
Completed 302 Found in 312ms

Error during failsafe response: ActionView::Template::Error
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb:1:in `____dev_pace_jruby____lib_ruby_gems_____gems_actionpack_______lib_action_dispatch_middleware_templates_rescues__request_and_response_erb__1269350625_6826'
org/jruby/RubyBasicObject.java:1697:in `__send__'
org/jruby/RubyKernel.java:2121:in `send'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/template.rb:144:in `render'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/activesupport-3.1.0/lib/active_support/notifications.rb:55:in `instrument'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/template.rb:142:in `render'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/template_renderer.rb:40:in `render_template'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/abstract_renderer.rb:33:in `instrument'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/activesupport-3.1.0/lib/active_support/notifications.rb:53:in `instrument'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/activesupport-3.1.0/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/activesupport-3.1.0/lib/active_support/notifications.rb:53:in `instrument'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/abstract_renderer.rb:33:in `instrument'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/template_renderer.rb:39:in `render_template'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/template_renderer.rb:47:in `render_with_layout'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/template_renderer.rb:38:in `render_template'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/template_renderer.rb:12:in `render'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/abstract_renderer.rb:22:in `wrap_formats'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/template_renderer.rb:9:in `render'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/renderer.rb:36:in `render_template'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/renderer.rb:17:in `render'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/helpers/rendering_helper.rb:24:in `render'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb:10:in `____dev_pace_jruby____lib_ruby_gems_____gems_actionpack_______lib_action_dispatch_middleware_templates_rescues_diagnostics_erb___1214621493_6818'
org/jruby/RubyBasicObject.java:1697:in `__send__'
org/jruby/RubyKernel.java:2121:in `send'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/template.rb:144:in `render'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/activesupport-3.1.0/lib/active_support/notifications.rb:55:in `instrument'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/template.rb:142:in `render'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/template_renderer.rb:40:in `render_template'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/abstract_renderer.rb:33:in `instrument'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/activesupport-3.1.0/lib/active_support/notifications.rb:53:in `instrument'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/activesupport-3.1.0/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/activesupport-3.1.0/lib/active_support/notifications.rb:53:in `instrument'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/abstract_renderer.rb:33:in `instrument'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/template_renderer.rb:39:in `render_template'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/template_renderer.rb:47:in `render_with_layout'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/template_renderer.rb:38:in `render_template'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/template_renderer.rb:12:in `render'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/abstract_renderer.rb:22:in `wrap_formats'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/template_renderer.rb:9:in `render'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/renderer.rb:36:in `render_template'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/renderer/renderer.rb:17:in `render'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_view/helpers/rendering_helper.rb:24:in `render'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/show_exceptions.rb:89:in `rescue_action_locally'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/show_exceptions.rb:69:in `render_exception'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/show_exceptions.rb:59:in `call'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/railties-3.1.0/lib/rails/rack/logger.rb:13:in `call'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/rack-1.3.4/lib/rack/methodoverride.rb:24:in `call'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/rack-1.3.4/lib/rack/runtime.rb:17:in `call'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/activesupport-3.1.0/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/rack-1.3.4/lib/rack/lock.rb:15:in `call'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/static.rb:53:in `call'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/railties-3.1.0/lib/rails/engine.rb:455:in `call'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/railties-3.1.0/lib/rails/rack/content_length.rb:16:in `call'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/railties-3.1.0/lib/rails/rack/log_tailer.rb:14:in `call'
C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/rack-1.3.4/lib/rack/handler/webrick.rb:59:in `service'
C:/devSpace/jruby164/lib/ruby/1.9/webrick/httpserver.rb:111:in `service'
C:/devSpace/jruby164/lib/ruby/1.9/webrick/httpserver.rb:70:in `run'
C:/devSpace/jruby164/lib/ruby/1.9/webrick/server.rb:183:in `start_thread'

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Get a 500 Error on accessing: http://localhost:3000/cms-admin/sites/1/layouts. Here is the log:

Started GET "/cms-admin/sites/1/layouts" for 127.0.0.1 at 2011-10-10 17:32:41 -0600
Processing by CmsAdmin::LayoutsController#index as HTML
Parameters: {"site_id"=>"1"}
(0.0ms) SELECT name
FROM sqlite_master
WHERE type = 'table' AND NOT name = 'sqlite_sequence'

Cms::Site Load (0.0ms) SELECT "cms_sites".* FROM "cms_sites" WHERE "cms_sites"."id" = 1 LIMIT 1
Completed 500 Internal Server Error in 265ms

Java::JavaLang::NullPointerException ():

Appreciate your help on this. Thanks.

Piyush

Rendered C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (16.0ms)
Rendered C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.0ms)
Rendered C:/devSpace/jruby164/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (31.0ms)