Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webrick crashes llegal instruction: 4 #1633

Closed
GideonJa opened this issue Sep 2, 2012 · 23 comments
Closed

Webrick crashes llegal instruction: 4 #1633

GideonJa opened this issue Sep 2, 2012 · 23 comments

Comments

@GideonJa
Copy link

GideonJa commented Sep 2, 2012

When clicking on one of my models Webrick crashes
The last recorded query is for states - when i removed the State assoc the the last command was Country query
server log:

=> 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
[2012-09-01 21:30:56] INFO  WEBrick 1.3.1
[2012-09-01 21:30:56] INFO  ruby 1.9.2 (2011-07-09) [x86_64-darwin11.0.0]
[2012-09-01 21:30:56] INFO  WEBrick::HTTPServer#start: pid=15156 port=3000


Started GET "/admin/" for 127.0.0.1 at 2012-09-01 21:31:44 -0400
Processing by Admin::DashboardController#index as HTML
  AdminUser Load (0.5ms)  SELECT "admin_users".* FROM "admin_users" WHERE "admin_users"."id" = 1 LIMIT 1
Compiled active_admin.css  (2495ms)  (pid 15156)
  Rendered /Users/GidApple/.rvm/gems/ruby-1.9.2-p290@R31/gems/activeadmin-0.5.0/app/views/active_admin/page/index.html.arb (2964.2ms)
Completed 200 OK in 3162ms (Views: 3141.5ms | ActiveRecord: 5.1ms)


Started GET "/assets/active_admin.css?body=1" for 127.0.0.1 at 2012-09-01 21:31:48 -0400
Served asset /active_admin.css - 304 Not Modified (17ms)


Started GET "/assets/active_admin/print.css?body=1" for 127.0.0.1 at 2012-09-01 21:31:48 -0400
Served asset /active_admin/print.css - 304 Not Modified (3ms)


Started GET "/admin/events" for 127.0.0.1 at 2012-09-01 21:31:52 -0400
Processing by Admin::EventsController#index as HTML
  �[1m�[36mAdminUser Load (0.5ms)�[0m  �[1mSELECT "admin_users".* FROM "admin_users" WHERE "admin_users"."id" = 1 LIMIT 1�[0m
  �[1m�[35m (0.8ms)�[0m  SELECT COUNT(count_column) FROM (SELECT 1 AS count_column FROM "events" LIMIT 30 OFFSET 0) subquery_for_count 
  �[1m�[36m (0.3ms)�[0m  �[1mSELECT COUNT(*) FROM "events" �[0m
  �[1m�[35mCACHE (0.0ms)�[0m  SELECT COUNT(count_column) FROM (SELECT 1 AS count_column FROM "events" LIMIT 30 OFFSET 0) subquery_for_count 
  �[1m�[36mEvent Load (1.1ms)�[0m  �[1mSELECT "events".* FROM "events" ORDER BY "events"."id" desc LIMIT 30 OFFSET 0�[0m
  �[1m�[35mUser Load (0.7ms)�[0m  SELECT "users".* FROM "users" 
  �[1m�[36mCountry Load (1.3ms)�[0m  �[1mSELECT "countries".* FROM "countries" �[0m
  �[1m�[35mState Load (84.2ms)�[0m  SELECT "states".* FROM "states" 

Illegal instruction: 4

****** This is what I get from Heroku: ********

/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2012-09-02T04:05:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/postgresql_adapter.rb:607:in `result_as_array'
2012-09-02T04:05:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/postgresql_adapter.rb:667:in `block in exec_query'
2012-09-02T04:05:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
2012-09-02T04:05:52+00:00 app[web.1]: 
2012-09-02T04:05:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/postgresql_adapter.rb:607:in `values'
2012-09-02T04:05:52+00:00 app[web.1]: /usr/local/bin/ruby(rb_vm_bugreport+0x9e) [0x523b6e]
2012-09-02T04:05:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/pg-0.14.0/lib/pg_ext.so(+0x62e4) [0x7f92c9b0f2e4]
2012-09-02T04:05:52+00:00 app[web.1]: /lib/libpthread.so.0(+0xf8f0) [0x7f92ce6a08f0]
2012-09-02T04:05:52+00:00 app[web.1]: /usr/local/bin/ruby() [0x4b2ca8]
2012-09-02T04:05:52+00:00 app[web.1]: /usr/local/bin/ruby() [0x565508]
2012-09-02T04:05:52+00:00 app[web.1]: /usr/local/bin/ruby() [0x515546]
2012-09-02T04:05:52+00:00 app[web.1]: /usr/local/bin/ruby() [0x522d40]
...
@jpmckinney
Copy link
Contributor

Can you run a different webserver, like Thin? WEBrick gives useless error messages (like Illegal instruction: 4) in some versions of Ruby, wheareas Thin will give a proper error (e.g. stack level too deep). Either upgrade to the latest Ruby 1.9.3 or use a different webserver.

@GideonJa
Copy link
Author

GideonJa commented Sep 5, 2012

Yea, I pasted the dump from Heroku's log which I believe runs on thin.
You can see from that log that there's something about the postgresql adapter...

@jpmckinney
Copy link
Contributor

Heroku only runs on Thin by default on the Bamboo stack. On Cedar it can run anything. I'd need to see the full log to confirm what webserver is running. Locally, you can just add gem 'thin' to your Gemfile, and Rails should use Thin when you run rails server.

@GideonJa
Copy link
Author

GideonJa commented Sep 5, 2012

I reinstalled active admin (uncommented the gem and renamed back all the files)
ran it on thin: It doesn't crash on thin BUT it takes several minutes to sho the troublesome model (called "event" in my case)
It is still not working on Herkoku see #483

here is the thin log:

Started GET "/admin/admin_users" for 127.0.0.1 at 2012-09-05 12:26:15 -0400
Processing by Admin::AdminUsersController#index as HTML
  �[1m�[35mAdminUser Load (1.2ms)�[0m  SELECT "admin_users".* FROM "admin_users" WHERE "admin_users"."id" = 1 LIMIT 1
  �[1m�[36m (2.0ms)�[0m  �[1mSELECT COUNT(count_column) FROM (SELECT 1 AS count_column FROM "admin_users" LIMIT 30 OFFSET 0) subquery_for_count �[0m
  �[1m�[35m (627.8ms)�[0m  SELECT COUNT(*) FROM "admin_users" 
  �[1m�[36mCACHE (0.0ms)�[0m  �[1mSELECT COUNT(count_column) FROM (SELECT 1 AS count_column FROM "admin_users" LIMIT 30 OFFSET 0) subquery_for_count �[0m
  �[1m�[35mAdminUser Load (2.1ms)�[0m  SELECT "admin_users".* FROM "admin_users" ORDER BY "admin_users"."id" desc LIMIT 30 OFFSET 0
  Rendered /Users/GidApple/.rvm/gems/ruby-1.9.2-p290@R31/gems/activeadmin-0.5.0/app/views/active_admin/resource/index.html.arb (724.0ms)
Completed 200 OK in 762ms (Views: 122.8ms | ActiveRecord: 633.2ms)


Started GET "/assets/active_admin/print.css?body=1" for 127.0.0.1 at 2012-09-05 12:26:16 -0400
Served asset /active_admin/print.css - 304 Not Modified (0ms)


Started GET "/admin/events" for 127.0.0.1 at 2012-09-05 12:26:47 -0400
Processing by Admin::EventsController#index as HTML
  �[1m�[36mAdminUser Load (1.2ms)�[0m  �[1mSELECT "admin_users".* FROM "admin_users" WHERE "admin_users"."id" = 1 LIMIT 1�[0m
  �[1m�[35m (1.6ms)�[0m  SELECT COUNT(count_column) FROM (SELECT 1 AS count_column FROM "events" LIMIT 30 OFFSET 0) subquery_for_count 
  �[1m�[36m (1.8ms)�[0m  �[1mSELECT COUNT(*) FROM "events" �[0m
  �[1m�[35mCACHE (0.0ms)�[0m  SELECT COUNT(count_column) FROM (SELECT 1 AS count_column FROM "events" LIMIT 30 OFFSET 0) subquery_for_count 
  �[1m�[36mEvent Load (2.1ms)�[0m  �[1mSELECT "events".* FROM "events" ORDER BY "events"."id" desc LIMIT 30 OFFSET 0�[0m
  �[1m�[35mUser Load (2.0ms)�[0m  SELECT "users".* FROM "users" 
  �[1m�[36mCountry Load (2.6ms)�[0m  �[1mSELECT "countries".* FROM "countries" �[0m
  �[1m�[35mState Load (7.1ms)�[0m  SELECT "states".* FROM "states" 
  �[1m�[36mOrganization Load (532.7ms)�[0m  �[1mSELECT "organizations".* FROM "organizations" �[0m
  �[1m�[35mEXPLAIN (2.0ms)�[0m  EXPLAIN SELECT "organizations".* FROM "organizations" 
EXPLAIN for: SELECT "organizations".* FROM "organizations" 
                              QUERY PLAN
-----------------------------------------------------------------------
 Seq Scan on organizations  (cost=0.00..3045.74 rows=137474 width=581)
(1 row)

  �[1m�[36mTopcategory Load (1.9ms)�[0m  �[1mSELECT "topcategories".* FROM "topcategories" �[0m
  �[1m�[35mCategory Load (2.0ms)�[0m  SELECT "categories".* FROM "categories" 
  �[1m�[36mSubcategory Load (1.7ms)�[0m  �[1mSELECT "subcategories".* FROM "subcategories" �[0m
  Rendered /Users/GidApple/.rvm/gems/ruby-1.9.2-p290@R31/gems/activeadmin-0.5.0/app/views/active_admin/resource/index.html.arb (35760.8ms)
Completed 200 OK in 35767ms (Views: 35206.2ms | ActiveRecord: 558.9ms)


Started GET "/assets/active_admin/print.css?body=1" for 127.0.0.1 at 2012-09-05 12:27:23 -0400
Served asset /active_admin/print.css - 200 OK (0ms)

@jpmckinney
Copy link
Contributor

Please put ``` on a blank line before and after your paste to make it readable. I did it for you this time.

@jpmckinney
Copy link
Contributor

The log says that your views are taking 35206.2ms to load. What you're view doing? If a view takes too long to render, Heroku will fail. Also, why is there an "EXPLAIN" query??

@GideonJa
Copy link
Author

GideonJa commented Sep 5, 2012

There are two sperate issues:

  1. Issue Webrick crashes llegal instruction: 4 #1633 (this issue) Clicking on some resources like Event and Organization causes WBrick to fail and thin to loop for few minutes
  2. Issue css not getting precompiled #483 Can not even access to log in screen in production due to some incompatibility with the way Heroku is compiling of the asses

Regarding #1633

belongs_to      :organization

There are currently only 16 events in the db.
There are 138k organizations - looks like rails_admin is fetching all of them (not the ones relevant to the current 16 events)

I added an index to get rid of the EXPLAIN
Regarding #483
I am at the end of my witz..

@jpmckinney
Copy link
Contributor

do

ActiveAdmin.register Event do
  remove_filter :organization
end

See #1026 for discussion and #1596 for the open issue. Closing this issue as it is duplicate of #483 and #1596.

@jpmckinney
Copy link
Contributor

Actually, to fix #483, the current thread is #834.

@GideonJa
Copy link
Author

GideonJa commented Sep 5, 2012

lock in <top (required)>': undefined method `remove_filter' for #ActiveAdmin::ResourceDSL:0x007f98cbc573d8 (NoMethodError

also, #834 NOT ABLE to deploy to Heroku

@jpmckinney
Copy link
Contributor

you need the latest AA.

gem 'activeadmin', git: 'git://github.com/gregbell/active_admin.git'

@jpmckinney
Copy link
Contributor

If you go to #834 you'll see a string of issues that are related. Please post in those issues. Also, please include whatever error you are getting from Heroku, because the only information we have so far is that "it doesn't work", which is not enough info for anyone to help you.

@GideonJa
Copy link
Author

GideonJa commented Sep 5, 2012

  1. If you look css not getting precompiled #483 I placed a very comprehensive commet with all my setup. I'll paste the latest Heroku log here- PLEASE let me know which issue it belongs to. Or if there is a solution, because i dont see an issue with the same error message
    Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError: active_admin/print.css isn't precompiled
  2. The solution of remove_filter :organization is throwing the baby with the bath water. Is there a way that I can tell AA to show filter only for Event.where("organization_id is not null")

Here is the HEROKU log:

2012-09-05T18:47:18+00:00 app[web.1]: 
2012-09-05T18:47:18+00:00 app[web.1]: 
2012-09-05T18:47:18+00:00 app[web.1]: Started GET "/admin/login" for 70.104.138.111 at 2012-09-05 18:47:18 +0000
2012-09-05T18:47:18+00:00 app[web.1]: ** [Airbrake] Success: Net::HTTPOK
2012-09-05T18:47:18+00:00 app[web.1]: ** [Airbrake] Environment Info: [Ruby: 1.9.2] [Rails: 3.2.6] [Env: production]
2012-09-05T18:47:18+00:00 app[web.1]: ** [Airbrake] Response from Airbrake: 
2012-09-05T18:47:18+00:00 app[web.1]: <notice>
2012-09-05T18:47:18+00:00 app[web.1]: <id>f69c9045-a715-1605-c37d-7d98e5ac6a65</id>
2012-09-05T18:47:18+00:00 app[web.1]: <url>http://airbrake.io/locate/f69c9045-a715-1605-c37d-7d98e5ac6a65</url>
2012-09-05T18:47:18+00:00 app[web.1]: </notice>
2012-09-05T18:47:18+00:00 app[web.1]: 
2012-09-05T18:47:18+00:00 app[web.1]: ActionView::Template::Error (active_admin/print.css isn't precompiled):
2012-09-05T18:47:18+00:00 app[web.1]:     6:   <title><%= [@page_title, render_or_call_method_or_proc_on(self, ActiveAdmin.application.site_title)].compact.join(" | ") %></title>
2012-09-05T18:47:18+00:00 app[web.1]:     7: 
2012-09-05T18:47:18+00:00 app[web.1]:     8:   <% ActiveAdmin.application.stylesheets.each do |style| %>
2012-09-05T18:47:18+00:00 app[web.1]:     9:     <%= stylesheet_link_tag style.path, style.options %>
2012-09-05T18:47:18+00:00 app[web.1]:     10:   <% end %>
2012-09-05T18:47:18+00:00 app[web.1]:     11:   <% ActiveAdmin.application.javascripts.each do |path| %>
2012-09-05T18:47:18+00:00 app[web.1]:     12:     <%= javascript_include_tag path %>
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/sprockets/helpers/rails_helper.rb:142:in `digest_for'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/sprockets/helpers/rails_helper.rb:150:in `rewrite_asset_path'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_view/asset_paths.rb:27:in `compute_public_path'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/sprockets/helpers/rails_helper.rb:56:in `asset_path'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/sprockets/helpers/rails_helper.rb:49:in `block in stylesheet_link_tag'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/sprockets/helpers/rails_helper.rb:43:in `collect'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/sprockets/helpers/rails_helper.rb:43:in `stylesheet_link_tag'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/bundler/gems/active_admin-6148a3b47e8c/app/views/layouts/active_admin_logged_out.html.erb:9:in `block in _vendor_bundle_ruby_______bundler_gems_active_admin_____a_b__e_c_app_views_layouts_active_admin_logged_out_html_erb___1763401890537919663_47149260'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/bundler/gems/active_admin-6148a3b47e8c/app/views/layouts/active_admin_logged_out.html.erb:8:in `each'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/bundler/gems/active_admin-6148a3b47e8c/app/views/layouts/active_admin_logged_out.html.erb:8:in `_vendor_bundle_ruby_______bundler_gems_active_admin_____a_b__e_c_app_views_layouts_active_admin_logged_out_html_erb___1763401890537919663_47149260'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_view/template.rb:145:in `block in render'
2012-09-05T18:47:18+00:00 heroku[router]: GET sky3.herokuapp.com/admin/login dyno=web.1 queue=0 wait=0ms service=98ms status=500 bytes=728
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/notifications.rb:125:in `instrument'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_view/template.rb:143:in `render'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_view/renderer/template_renderer.rb:59:in `render_with_layout'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_view/renderer/template_renderer.rb:18:in `render'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_view/renderer/renderer.rb:36:in `render_template'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_view/renderer/renderer.rb:17:in `render'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/abstract_controller/rendering.rb:110:in `_render_template'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/streaming.rb:225:in `_render_template'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/abstract_controller/rendering.rb:103:in `render_to_body'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/abstract_controller/rendering.rb:88:in `render'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/rendering.rb:16:in `render'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
2012-09-05T18:47:18+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/benchmark.rb:310:in `realtime'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/core_ext/benchmark.rb:5:in `ms'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/instrumentation.rb:39:in `render'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/remotipart-1.0.2/lib/remotipart/render_overrides.rb:8:in `render'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/responder.rb:232:in `default_render'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/responder.rb:160:in `to_html'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/responder.rb:153:in `respond'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/responder.rb:146:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/mime_responds.rb:239:in `respond_with'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/devise-2.1.2/app/controllers/devise/sessions_controller.rb:10:in `new'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/abstract_controller/base.rb:167:in `process_action'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/rendering.rb:10:in `process_action'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/callbacks.rb:480:in `_run__1239135901147715200__process_action__3027866656147298853__callbacks'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/callbacks.rb:405:in `__run_callback'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/callbacks.rb:81:in `run_callbacks'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/abstract_controller/callbacks.rb:17:in `process_action'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/rescue.rb:29:in `process_action'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/notifications.rb:123:in `block in instrument'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/notifications.rb:123:in `instrument'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/params_wrapper.rb:206:in `process_action'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/abstract_controller/base.rb:121:in `process'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/abstract_controller/rendering.rb:45:in `process'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal.rb:203:in `dispatch'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal.rb:246:in `block in action'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/routing/route_set.rb:73:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/routing/route_set.rb:36:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/routing/mapper.rb:42:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/routing/route_set.rb:600:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-pjax-0.5.9/lib/rack/pjax.rb:12:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.0/lib/omniauth/strategy.rb:177:in `call!'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.0/lib/omniauth/strategy.rb:157:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.0/lib/omniauth/strategy.rb:177:in `call!'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.0/lib/omniauth/strategy.rb:157:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.0/lib/omniauth/builder.rb:48:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb:35:in `block in call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb:34:in `catch'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb:34:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/head.rb:14:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/remotipart-1.0.2/lib/remotipart/middleware.rb:30:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/flash.rb:242:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/cookies.rb:338:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/query_cache.rb:64:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/callbacks.rb:405:in `_run__303368154035726670__call__1496309008201192048__callbacks'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/callbacks.rb:405:in `__run_callback'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/callbacks.rb:81:in `run_callbacks'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/rack/logger.rb:26:in `call_app'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/rack/logger.rb:16:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/static.rb:62:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/airbrake-3.1.2/lib/airbrake/rack.rb:42:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/airbrake-3.1.2/lib/airbrake/user_informer.rb:12:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:479:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/application.rb:220:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/content_length.rb:14:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/rack/log_tailer.rb:17:in `call'
2012-09-05T18:47:18+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/handler/webrick.rb:59:in `service'
2012-09-05T18:47:18+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
2012-09-05T18:47:18+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
2012-09-05T18:47:18+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
2012-09-05T18:47:18+00:00 app[web.1]: 
2012-09-05T18:47:18+00:00 app[web.1]: 
2012-09-05T18:47:18+00:00 app[web.1]: Processing by ActiveAdmin::Devise::SessionsController#new as HTML
2012-09-05T18:47:18+00:00 app[web.1]:   Rendered vendor/bundle/ruby/1.9.1/bundler/gems/active_admin-6148a3b47e8c/app/views/active_admin/devise/shared/_links.erb (0.5ms)
2012-09-05T18:47:18+00:00 app[web.1]:   Rendered vendor/bundle/ruby/1.9.1/bundler/gems/active_admin-6148a3b47e8c/app/views/active_admin/devise/sessions/new.html.erb within layouts/active_admin_logged_out (9.5ms)
2012-09-05T18:47:18+00:00 app[web.1]: Completed 500 Internal Server Error in 12ms

@jpmckinney
Copy link
Contributor

Look at the error message:

Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError: active_admin/print.css isn't precompiled

It's telling you that active_admin/print.css isn't precompiled, which means that you need to add it to your precompile list.

config.assets.precompile += %w( active_admin.css active_admin.js active_admin/print.css )

Do the same thing for any other error like that one. And don't forget to run RAILS_ENV=production bundle exec rake assets:precompile

@jpmckinney
Copy link
Contributor

For your second question, it's a bug with no current fix. The open issue is #1596.

@GideonJa
Copy link
Author

GideonJa commented Sep 5, 2012

  1. I have config.assets.precompile += %w( active_admin.css active_admin.js active_admin/print.css ) in aplication.rb
    is it not where it should be?
  2. can i run RAILS_ENV=production bundle exec rake assets:precompile only for active admin? it's filling my public folder with ALL my assets
  3. just redeployed after running RAILS_ENV=pro... still same error message

@jpmckinney
Copy link
Contributor

If you are deploying to Heroku, you either precompile everything, or nothing. You can't do only half your assets. You can try putting config.assets.precompile in production.rb. You absolutely must run RAILS_ENV=production bundle exec rake assets:precompile and make sure public/assets/active_admin/print.css is generated. If it's generated, you will not see

Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError: active_admin/print.css isn't precompiled

@jpmckinney
Copy link
Contributor

You might see the same exception, but it may be mentioning a different file, not active_admin/print.css, in which case you add that file to config.assets.precompile and follow the same steps as above.

@GideonJa
Copy link
Author

GideonJa commented Sep 5, 2012

in production.rb or application.rb???

@GideonJa
Copy link
Author

GideonJa commented Sep 5, 2012

They said somewhere that Heroku doesn't look at production.rb

@jpmckinney
Copy link
Contributor

That's only if you're letting Heroku do the precompile. The safe way is to do the precompile yourself, in which case it's fine to put it in production.rb. Heroku has docs about this https://devcenter.heroku.com/articles/rails3x-asset-pipeline-cedar

@GideonJa
Copy link
Author

GideonJa commented Sep 5, 2012

  1. so do i need to compile before every push??
  2. it doesn't end - i now aa to show in prod but it crashes when i click on organization

2012-09-05T21:01:35+00:00 app[web.1]: Started GET "/admin/organizations" for 70.104.138.111 at 2012-09-05 21:01:35 +0000
2012-09-05T21:01:46+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/postgresql_adapter.rb:607: [BUG] Segmentation fault
2012-09-05T21:01:46+00:00 app[web.1]: ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
2012-09-05T21:01:46+00:00 app[web.1]: 

@jpmckinney
Copy link
Contributor

You only need to compile if you change your assets. Also, as documented by Rails and Heroku, you need to increment config.assets.version in application.rb, otherwise Heroku will serve your old assets due to the way it performs caching. People are working on a better fix. This is how you need to do it for now.

The segmentation fault is probably a Ruby 1.9.2p290 issue. Use Ruby 1.9.3.

On 2012-09-05, at 5:05 PM, Gideon Jadlovker wrote:

so do i need to compile before every push??
it doesn't end - i now aa to show in prod but it crashes when i click on organization

2012-09-05T21:01:35+00:00 app[web.1]: Started GET "/admin/organizations" for 70.104.138.111 at 2012-09-05 21:01:35 +0000
2012-09-05T21:01:46+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/postgresql_adapter.rb:607: [BUG] Segmentation fault
2012-09-05T21:01:46+00:00 app[web.1]: ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
2012-09-05T21:01:46+00:00 app[web.1]:


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants