tye / rubyception

Rubyception - Realtime Rails log in your browser
MIT License
156 stars 10 forks source link

500 Internal Server Error #4

Closed computeus closed 12 years ago

computeus commented 12 years ago

Started GET "/rubyception" for 127.0.0.1 at 2012-07-26 16:32:50 +0300 Processing by Rubyception::ApplicationController#index as HTML Rendered /usr/local/lib/ruby/gems/1.9.1/gems/rubyception-0.0.2/app/views/rubyception/application/index.haml within layouts/rubyception/application (1.1ms) Completed 500 Internal Server Error in 520ms

tye commented 12 years ago

Thanks for the bug report, I am very interested in fixing the problem so you can use the gem. But I will need more info about how the problem occurs.

What version of rails are you using it with? What other gems are you using? Are you able to post an example app that causes the error?

computeus commented 12 years ago

bundle exec rails -v Rails 3.2.6

bundle exec ruby -v ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]

computeus commented 12 years ago

cat Gemfile source 'https://rubygems.org'

gem 'rails', '3.2.6'

gem 'mysql2'

group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1'

gem 'therubyracer', platforms: :ruby

gem 'uglifier', '>= 1.0.3'

gem 'twitter-bootstrap-rails' end

gem 'jquery-rails'

gem 'unicorn'

group :development do gem 'rails-footnotes', '>= 3.7.5.rc4' end

group :development, :test do gem 'rspec-rails' gem 'shoulda-matchers' gem 'capybara' gem 'factory_girl_rails' gem 'guard-rspec' gem 'spork', '> 0.9.0.rc' gem 'guard-spork' gem 'rails_best_practices', require: false gem 'database_cleaner' gem 'simplecov' gem 'bullet' gem 'brakeman', require: false gem 'annotate', '~> 2.4.1.beta', require: false end

gem 'devise' gem 'cancan' gem 'rails_admin' gem 'sort_alphabetical' gem 'will_paginate' gem 'whenever', require: false gem 'rails-i18n' gem 'devise-i18n' gem 'rails_admin-i18n' gem 'carrierwave' gem 'mini_magick' gem 'sanitize' gem 'acts-as-taggable-on' gem 'exception_notification' gem 'sitemap_generator' gem 'rack-mini-profiler' gem 'newrelic_rpm' gem 'thinking-sphinx', '2.0.12' gem 'rubyception'

computeus commented 12 years ago

Also surfing the projects other pages is too slow.

By the way, removing rack-mini-profiler and rails-footnotes makes no difference.

tye commented 12 years ago

Thanks, I will look into this.

Is the project you are trying to use rubyception on open source by any chance? Would I be able to download it from somewhere to test them gem in it.

computeus commented 12 years ago

With rubyception

=> Booting WEBrick
=> Rails 3.2.6 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Cannot find or read /home/computeus/projects/rails/oyverin/config/newrelic.yml
Resolved collector.newrelic.com to 204.93.223.153
[2012-07-26 17:32:49] INFO  WEBrick 1.3.1
[2012-07-26 17:32:49] INFO  ruby 1.9.3 (2012-02-16) [x86_64-linux]
[2012-07-26 17:32:49] INFO  WEBrick::HTTPServer#start: pid=21051 port=3000

Started GET "/posts/3-siirimi-oylayin-lutfen" for 127.0.0.1 at 2012-07-26 17:32:52 +0300
Could not log "sql.active_record" event. NoMethodError: undefined method `<<' for nil:NilClass
Could not log "sql.active_record" event. NoMethodError: undefined method `<<' for nil:NilClass
Could not log "sql.active_record" event. NoMethodError: undefined method `<<' for nil:NilClass
Processing by PostsController#show as HTML
  Parameters: {"id"=>"3-siirimi-oylayin-lutfen"}
  User Load (140.5ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
  Post Load (51.7ms)  SELECT `posts`.* FROM `posts` WHERE `posts`.`id` = 3 LIMIT 1
  Role Load (101.6ms)  SELECT `roles`.* FROM `roles` INNER JOIN `role_assignments` ON `roles`.`id` = `role_assignments`.`role_id` WHERE `role_assignments`.`user_id` = 1 AND `roles`.`code` = 'super_admin' LIMIT 1
  CACHE (0.0ms)  SELECT `posts`.* FROM `posts` WHERE `posts`.`id` = 3 LIMIT 1
  ActsAsTaggableOn::Tag Load (105.7ms)  SELECT `tags`.* FROM `tags` INNER JOIN `taggings` ON `tags`.`id` = `taggings`.`tag_id` WHERE `taggings`.`taggable_id` = 3 AND `taggings`.`taggable_type` = 'Post' AND (taggings.context = 'tags' AND taggings.tagger_id IS NULL)
  EXPLAIN (102.7ms)  EXPLAIN SELECT `tags`.* FROM `tags` INNER JOIN `taggings` ON `tags`.`id` = `taggings`.`tag_id` WHERE `taggings`.`taggable_id` = 3 AND `taggings`.`taggable_type` = 'Post' AND (taggings.context = 'tags' AND taggings.tagger_id IS NULL)
EXPLAIN for: SELECT `tags`.* FROM `tags` INNER JOIN `taggings` ON `tags`.`id` = `taggings`.`tag_id` WHERE `taggings`.`taggable_id` = 3 AND `taggings`.`taggable_type` = 'Post' AND (taggings.context = 'tags' AND taggings.tagger_id IS NULL)
+----+-------------+----------+--------+--------------------------------------------------------------------------------------+-------------------------------------------------------------+---------+-------------------------------------+------+-------------+
| id | select_type | table    | type   | possible_keys                                                                        | key                                                         | key_len | ref                                 | rows | Extra       |
+----+-------------+----------+--------+--------------------------------------------------------------------------------------+-------------------------------------------------------------+---------+-------------------------------------+------+-------------+
|  1 | SIMPLE      | taggings | ref    | index_taggings_on_tag_id,index_taggings_on_taggable_id_and_taggable_type_and_context | index_taggings_on_taggable_id_and_taggable_type_and_context | 1160    | const,const,const                   |    6 | Using where |
|  1 | SIMPLE      | tags     | eq_ref | PRIMARY                                                                              | PRIMARY                                                     | 4       | oyverin_development.taggings.tag_id |    1 |             |
+----+-------------+----------+--------+--------------------------------------------------------------------------------------+-------------------------------------------------------------+---------+-------------------------------------+------+-------------+
2 rows in set (0.10 sec)

  Rendered posts/_comments_form.html.erb (2.7ms)
  Rendered posts/_comments_form.html.erb (1.8ms)
  Rendered posts/_show.html.erb (3080.1ms)
  Rendered posts/show.html.erb within layouts/application (3119.0ms)
  Category Load (106.1ms)  SELECT `categories`.* FROM `categories` WHERE (`categories`.`id` >= 0) ORDER BY `categories`.`id` ASC LIMIT 1000
  Rendered layouts/_header.html.erb (596.2ms)
  Post Load (102.1ms)  SELECT `posts`.* FROM `posts` WHERE (`posts`.`created_at` BETWEEN '2012-07-25 21:00:00' AND '2012-07-26 20:59:59') ORDER BY created_at DESC
  CACHE (0.0ms)  SELECT `categories`.* FROM `categories` WHERE (`categories`.`id` >= 0) ORDER BY `categories`.`id` ASC LIMIT 1000
  Rendered layouts/_left_sidebar.html.erb (161.0ms)
  Rendered layouts/_right_sidebar.html.erb (0.6ms)
  Rendered layouts/_footer.html.erb (0.4ms)
Completed 200 OK in 9890ms (Views: 6625.9ms | ActiveRecord: 2827.4ms | Sphinx: 0.0ms)

without rubyception

=> Booting WEBrick
=> Rails 3.2.6 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Cannot find or read /home/computeus/projects/rails/oyverin/config/newrelic.yml
Resolved collector.newrelic.com to 204.93.223.153
[2012-07-26 17:32:49] INFO  WEBrick 1.3.1
[2012-07-26 17:32:49] INFO  ruby 1.9.3 (2012-02-16) [x86_64-linux]
[2012-07-26 17:32:49] INFO  WEBrick::HTTPServer#start: pid=21051 port=3000

Started GET "/posts/3-siirimi-oylayin-lutfen" for 127.0.0.1 at 2012-07-26 17:41:21 +0300
Processing by PostsController#show as HTML
  Parameters: {"id"=>"3-siirimi-oylayin-lutfen"}
  User Load (2.4ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
  Post Load (0.9ms)  SELECT `posts`.* FROM `posts` WHERE `posts`.`id` = 3 LIMIT 1
  Role Load (1.1ms)  SELECT `roles`.* FROM `roles` INNER JOIN `role_assignments` ON `roles`.`id` = `role_assignments`.`role_id` WHERE `role_assignments`.`user_id` = 1 AND `roles`.`code` = 'super_admin' LIMIT 1
  CACHE (0.0ms)  SELECT `posts`.* FROM `posts` WHERE `posts`.`id` = 3 LIMIT 1
  ActsAsTaggableOn::Tag Load (1.2ms)  SELECT `tags`.* FROM `tags` INNER JOIN `taggings` ON `tags`.`id` = `taggings`.`tag_id` WHERE `taggings`.`taggable_id` = 3 AND `taggings`.`taggable_type` = 'Post' AND (taggings.context = 'tags' AND taggings.tagger_id IS NULL)
  Rendered posts/_comments_form.html.erb (2.6ms)
  Rendered posts/_comments_form.html.erb (1.8ms)
  Rendered posts/_show.html.erb (376.0ms)
  Rendered posts/show.html.erb within layouts/application (380.0ms)
  Category Load (3.7ms)  SELECT `categories`.* FROM `categories` WHERE (`categories`.`id` >= 0) ORDER BY `categories`.`id` ASC LIMIT 1000
  Rendered layouts/_header.html.erb (39.3ms)
  Post Load (1.4ms)  SELECT `posts`.* FROM `posts` WHERE (`posts`.`created_at` BETWEEN '2012-07-25 21:00:00' AND '2012-07-26 20:59:59') ORDER BY created_at DESC
  CACHE (0.0ms)  SELECT `categories`.* FROM `categories` WHERE (`categories`.`id` >= 0) ORDER BY `categories`.`id` ASC LIMIT 1000
  Rendered layouts/_left_sidebar.html.erb (58.7ms)
  Rendered layouts/_right_sidebar.html.erb (0.4ms)
  Rendered layouts/_footer.html.erb (0.3ms)
Completed 200 OK in 964ms (Views: 548.9ms | ActiveRecord: 41.3ms | Sphinx: 0.0ms)
computeus commented 12 years ago

It is not an open source project. But I will try to send you a zipped version.

amalagaura commented 12 years ago

I have the same problem using Unicorn, when I use thin the app does not load at all, it exits immediately. I have same Rails version. Unfortunately I can't send a copy of the app, here is the Gemfile though:


source 'http://rubygems.org'

gem 'rails'
gem 'koala'

# Bundle edge Rails instead:
# gem 'rails',     :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails'
  gem 'coffee-rails'
  gem 'uglifier'
end

gem 'slim'
gem 'mongo'
gem 'bson_ext'
gem 'jquery-rails'
gem 'quiet_assets'
# Use unicorn as the web server
gem 'unicorn'
gem 'delayed_job_active_record'
gem 'ledermann-rails-settings', :require => 'rails-settings'
gem 'simple_form'
gem 'inherited_resources'
gem 'bootstrap-sass'
#gem 'bootswatch-rails'
gem 'execjs'
gem 'write_xlsx'
gem 'therubyracer'
gem 'daemons'
gem 'twitter'

#gem 'tableficate'
#gem 'best_in_place'
# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
group :development do
  gem 'rubyception'
end

group :test do
  # Pretty printed test output
  gem 'turn', :require => false
end
computeus commented 12 years ago

@tye I sent the project to your email.

richardsondx commented 12 years ago

I'm experiencing the same issue.

Started GET "/rubyception" for 127.0.0.1 at 2012-07-26 15:06:04 -0400 Processing by Rubyception::ApplicationController#index as HTML Rendered /Users/Username/.rvm/gems/ruby-1.9.3-p194/gems/rubyception-0.0.2/app/views/rubyception/application/index.haml within layouts/rubyception/application (0.8ms) Completed 500 Internal Server Error in 237ms

Also I went through the source code and index.haml is empty.

xhh commented 12 years ago

Same here. I also use Rails 3.2.6, maybe related to that?

omenking commented 12 years ago

The error is with compass in the sass files. It's having a issue loading them even though they are in the load path.

tye commented 12 years ago

Just pushed a bug fix version, let me know if there's still any problems

computeus commented 12 years ago

It works for me now. Thank you.

xhh commented 12 years ago

The error is also gone here, but I get another error in my development.log

Could not log "sql.active_record" event. NoMethodError: undefined method `<<' for nil:NilClass (2012-08-02 17:50:21 ERROR)
omenking commented 12 years ago

I'm closing this issue since the original 500 error was related to the compass dependency which was removed in 0.0.3.

@xhh I wasn't able to replicate the sql.active_record error, if this issue reoccurs open it as a new ticket with the "sql.active_record" in the name of the issue since it will be a separate issue from this current issue.