Sonar Version: 4.5.5
Clicking on new critical leads to the following error message:
In the sonar log the following error is reported:
2015.10.05 14:45:32 ERROR web[o.s.s.ui.JRubyFacade] Fail to render: http://sonar.intern/drilldown/measures/39596?metric=new_critical_violations&period=1
private method `gsub' called for 1:Fixnum
On line #127 of app/views/drilldown/measures.html.erb
124: metric: ''null,
125: rule: null,
126: severity: null,
127: period: null
128: };
129:
130:
gems/gems/actionpack-2.3.15/lib/action_view/helpers/javascript_helper.rb:143:in `escape_javascript'
app/views/drilldown/measures.html.erb:127
org/jruby/RubyKernel.java:2227:in `send'
gems/gems/actionpack-2.3.15/lib/action_view/renderable.rb:34:in `render'
gems/gems/actionpack-2.3.15/lib/action_view/base.rb:306:in `with_template'
gems/gems/actionpack-2.3.15/lib/action_view/renderable.rb:30:in `render'
gems/gems/actionpack-2.3.15/lib/action_view/template.rb:205:in `render_template'
gems/gems/actionpack-2.3.15/lib/action_view/base.rb:265:in `render'
gems/gems/actionpack-2.3.15/lib/action_view/base.rb:348:in `_render_with_layout'
gems/gems/actionpack-2.3.15/lib/action_view/base.rb:346:in `_render_with_layout'
gems/gems/actionpack-2.3.15/lib/action_view/base.rb:262:in `render'
gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:1252:in `render_for_file'
gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:936:in `render'
gems/gems/actionpack-2.3.15/lib/action_controller/benchmarking.rb:51:in `render_with_benchmark'
gems/gems/actionpack-2.3.15/lib/action_controller/benchmarking.rb:51:in `render_with_benchmark'
gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:1328:in `default_render'
gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:1334:in `perform_action'
gems/gems/actionpack-2.3.15/lib/action_controller/filters.rb:617:in `call_filters'
gems/gems/actionpack-2.3.15/lib/action_controller/filters.rb:610:in `perform_action_with_filters'
gems/gems/actionpack-2.3.15/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
gems/gems/actionpack-2.3.15/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
gems/gems/actionpack-2.3.15/lib/action_controller/rescue.rb:160:in `perform_action_with_rescue'
gems/gems/actionpack-2.3.15/lib/action_controller/flash.rb:151:in `perform_action_with_flash'
org/jruby/RubyKernel.java:2223:in `send'
gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:532:in `process'
gems/gems/actionpack-2.3.15/lib/action_controller/filters.rb:606:in `process_with_filters'
gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:391:in `process'
gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:386:in `call'
gems/gems/actionpack-2.3.15/lib/action_controller/routing/route_set.rb:450:in `call'
gems/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:87:in `dispatch'
gems/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:85:in `dispatch'
gems/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:121:in `_call'
gems/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
org/jruby/RubyProc.java:290:in `call'
org/jruby/RubyProc.java:224:in `call'
gems/gems/activerecord-2.3.15/lib/active_record/query_cache.rb:29:in `call'
gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
gems/gems/activerecord-2.3.15/lib/active_record/query_cache.rb:9:in `cache'
gems/gems/activerecord-2.3.15/lib/active_record/query_cache.rb:28:in `call'
gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
gems/gems/actionpack-2.3.15/lib/action_controller/string_coercion.rb:25:in `call'
gems/gems/actionpack-2.3.15/lib/action_controller/params_parser.rb:15:in `call'
file:/opt/sonarqube-4.5.5/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/session_store.rb:70:in `context'
gems/gems/actionpack-2.3.15/lib/action_controller/failsafe.rb:26:in `call'
gems/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:106:in `call'
file:/opt/sonarqube-4.5.5/lib/server/jruby-rack-1.1.13.2.jar!/rack/adapter/rails.rb:34:in `serve_rails'
file:/opt/sonarqube-4.5.5/lib/server/jruby-rack-1.1.13.2.jar!/rack/adapter/rails.rb:39:in `call'
file:/opt/sonarqube-4.5.5/lib/server/jruby-rack-1.1.13.2.jar!/rack/handler/servlet.rb:22:in `call'
How can this be fixed? Is this a bug? i tried to post in the sonar google group but didn't succeed.
according to Simon BRANDHOF from sonar source. This is a regression and will be fixed in 4.5.6 (see https://jira.sonarsource.com/browse/SONAR-6814)
Related
Occasionally on my local computer, when importing database dump from my production database, I get this when trying to log in:
ActiveRecord::StatementInvalid - PG::SyntaxError: ERROR: zero-length delimited identifier at or near """"
LINE 5: ..." = '2015-12-21 02:17:25.574627' WHERE "sessions"."" = 40276...
^
: UPDATE "sessions" SET "data" = 'some data I removed=
', "updated_at" = '2015-12-21 02:17:25.574627' WHERE "sessions"."" = 402761:
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/abstract_adapter.rb:291:in `translate_exception'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/postgresql_adapter.rb:1155:in `translate_exception'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/abstract_adapter.rb:284:in `rescue in log'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/postgresql_adapter.rb:670:in `exec_delete'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/abstract/database_statements.rb:96:in `update'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `update'
(gem) activerecord-3.2.22/lib/active_record/persistence.rb:359:in `update'
(gem) activerecord-3.2.22/lib/active_record/locking/optimistic.rb:68:in `update'
(gem) activerecord-3.2.22/lib/active_record/attribute_methods/dirty.rb:74:in `update'
(gem) activerecord-3.2.22/lib/active_record/timestamp.rb:71:in `update'
(gem) activerecord-3.2.22/lib/active_record/callbacks.rb:272:in `block in update'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:403:in `_run__115690163__update__488215436__callbacks'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:405:in `__run_callback'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:385:in `_run_update_callbacks'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:81:in `run_callbacks'
(gem) activerecord-3.2.22/lib/active_record/callbacks.rb:272:in `update'
(gem) activerecord-3.2.22/lib/active_record/persistence.rb:348:in `create_or_update'
(gem) activerecord-3.2.22/lib/active_record/callbacks.rb:264:in `block in create_or_update'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:425:in `_run__115690163__save__488215436__callbacks'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:405:in `__run_callback'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:81:in `run_callbacks'
(gem) activerecord-3.2.22/lib/active_record/callbacks.rb:264:in `create_or_update'
(gem) activerecord-3.2.22/lib/active_record/persistence.rb:84:in `save'
(gem) activerecord-3.2.22/lib/active_record/validations.rb:50:in `save'
(gem) activerecord-3.2.22/lib/active_record/attribute_methods/dirty.rb:22:in `save'
(gem) activerecord-3.2.22/lib/active_record/transactions.rb:259:in `block (2 levels) in save'
(gem) activerecord-3.2.22/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
(gem) activerecord-3.2.22/lib/active_record/transactions.rb:208:in `transaction'
(gem) activerecord-3.2.22/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
(gem) activerecord-3.2.22/lib/active_record/transactions.rb:259:in `block in save'
(gem) activerecord-3.2.22/lib/active_record/transactions.rb:270:in `rollback_active_record_state!'
(gem) activerecord-3.2.22/lib/active_record/transactions.rb:258:in `save'
(gem) activerecord-3.2.22/lib/active_record/session_store.rb:323:in `block in set_session'
(gem) activesupport-3.2.22/lib/active_support/benchmarkable.rb:50:in `silence'
(gem) activerecord-3.2.22/lib/active_record/session_store.rb:320:in `set_session'
(gem) rack-1.4.7/lib/rack/session/abstract/id.rb:327:in `commit_session'
(gem) rack-1.4.7/lib/rack/session/abstract/id.rb:211:in `context'
(gem) rack-1.4.7/lib/rack/session/abstract/id.rb:205:in `call'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/cookies.rb:341:in `call'
(gem) activerecord-3.2.22/lib/active_record/query_cache.rb:64:in `call'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:405:in `_run__649130748__call__488215436__callbacks'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:405:in `__run_callback'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:81:in `run_callbacks'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/reloader.rb:65:in `call'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
(gem) better_errors-0.8.0/lib/better_errors/middleware.rb:84:in `protected_app_call'
(gem) better_errors-0.8.0/lib/better_errors/middleware.rb:79:in `better_errors_call'
(gem) better_errors-0.8.0/lib/better_errors/middleware.rb:56:in `call'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
(gem) railties-3.2.22/lib/rails/rack/logger.rb:32:in `call_app'
(gem) railties-3.2.22/lib/rails/rack/logger.rb:16:in `block in call'
(gem) activesupport-3.2.22/lib/active_support/tagged_logging.rb:22:in `tagged'
(gem) railties-3.2.22/lib/rails/rack/logger.rb:16:in `call'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/request_id.rb:22:in `call'
(gem) rack-1.4.7/lib/rack/methodoverride.rb:21:in `call'
(gem) rack-1.4.7/lib/rack/runtime.rb:17:in `call'
(gem) activesupport-3.2.22/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
(gem) rack-1.4.7/lib/rack/lock.rb:15:in `call'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/static.rb:83:in `call'
(gem) railties-3.2.22/lib/rails/engine.rb:484:in `call'
(gem) railties-3.2.22/lib/rails/application.rb:231:in `call'
(gem) rack-1.4.7/lib/rack/content_length.rb:14:in `call'
(gem) railties-3.2.22/lib/rails/rack/log_tailer.rb:17:in `call'
(gem) thin-1.6.4/lib/thin/connection.rb:86:in `block in pre_process'
(gem) thin-1.6.4/lib/thin/connection.rb:84:in `pre_process'
(gem) thin-1.6.4/lib/thin/connection.rb:53:in `process'
(gem) thin-1.6.4/lib/thin/connection.rb:39:in `receive_data'
(gem) eventmachine-1.0.8/lib/eventmachine.rb:193:in `run'
(gem) thin-1.6.4/lib/thin/backends/base.rb:73:in `start'
(gem) thin-1.6.4/lib/thin/server.rb:162:in `start'
(gem) rack-1.4.7/lib/rack/handler/thin.rb:13:in `run'
(gem) rack-1.4.7/lib/rack/server.rb:268:in `start'
(gem) railties-3.2.22/lib/rails/commands/server.rb:70:in `start'
(gem) railties-3.2.22/lib/rails/commands.rb:55:in `block in <top (required)>'
(gem) railties-3.2.22/lib/rails/commands.rb:50:in `<top (required)>'
script/rails:6:in `<main>'
So I clear the database of sessions (rails dbconsole and delete from sessions;)
But then the error becomes
ActiveRecord::StatementInvalid - PG::NotNullViolation: ERROR: null value in column "id" violates not-null constraint
DETAIL: Failing row contains (null, 4cb13a797731260dad7f93297f64b0a6, BAh7AA==
, 2015-12-21 02:53:30.976481, 2015-12-21 02:53:30.976481).
: INSERT INTO "sessions" ("created_at", "data", "id", "session_id", "updated_at") VALUES ($1, $2, $3, $4, $5):
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/abstract_adapter.rb:291:in `translate_exception'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/postgresql_adapter.rb:1155:in `translate_exception'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/abstract_adapter.rb:284:in `rescue in log'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/postgresql_adapter.rb:659:in `exec_query'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/abstract/database_statements.rb:63:in `exec_insert'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/abstract/database_statements.rb:90:in `insert'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `insert'
(gem) activerecord-3.2.22/lib/active_record/relation.rb:66:in `insert'
(gem) activerecord-3.2.22/lib/active_record/persistence.rb:367:in `create'
(gem) activerecord-3.2.22/lib/active_record/timestamp.rb:58:in `create'
(gem) activerecord-3.2.22/lib/active_record/callbacks.rb:268:in `block in create'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:403:in `_run__58360460__create__915097608__callbacks'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:405:in `__run_callback'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:385:in `_run_create_callbacks'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:81:in `run_callbacks'
(gem) activerecord-3.2.22/lib/active_record/callbacks.rb:268:in `create'
(gem) activerecord-3.2.22/lib/active_record/persistence.rb:348:in `create_or_update'
(gem) activerecord-3.2.22/lib/active_record/callbacks.rb:264:in `block in create_or_update'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:425:in `_run__58360460__save__915097608__callbacks'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:405:in `__run_callback'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:81:in `run_callbacks'
(gem) activerecord-3.2.22/lib/active_record/callbacks.rb:264:in `create_or_update'
(gem) activerecord-3.2.22/lib/active_record/persistence.rb:84:in `save'
(gem) activerecord-3.2.22/lib/active_record/validations.rb:50:in `save'
(gem) activerecord-3.2.22/lib/active_record/attribute_methods/dirty.rb:22:in `save'
(gem) activerecord-3.2.22/lib/active_record/transactions.rb:259:in `block (2 levels) in save'
(gem) activerecord-3.2.22/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
(gem) activerecord-3.2.22/lib/active_record/transactions.rb:208:in `transaction'
(gem) activerecord-3.2.22/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
(gem) activerecord-3.2.22/lib/active_record/transactions.rb:259:in `block in save'
(gem) activerecord-3.2.22/lib/active_record/transactions.rb:270:in `rollback_active_record_state!'
(gem) activerecord-3.2.22/lib/active_record/transactions.rb:258:in `save'
(gem) activerecord-3.2.22/lib/active_record/session_store.rb:323:in `block in set_session'
(gem) activesupport-3.2.22/lib/active_support/benchmarkable.rb:50:in `silence'
(gem) activerecord-3.2.22/lib/active_record/session_store.rb:320:in `set_session'
(gem) rack-1.4.7/lib/rack/session/abstract/id.rb:327:in `commit_session'
(gem) rack-1.4.7/lib/rack/session/abstract/id.rb:211:in `context'
(gem) rack-1.4.7/lib/rack/session/abstract/id.rb:205:in `call'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/cookies.rb:341:in `call'
(gem) activerecord-3.2.22/lib/active_record/query_cache.rb:64:in `call'
(gem) activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:405:in `_run__42731031__call__915097608__callbacks'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:405:in `__run_callback'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
(gem) activesupport-3.2.22/lib/active_support/callbacks.rb:81:in `run_callbacks'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/reloader.rb:65:in `call'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
(gem) better_errors-0.8.0/lib/better_errors/middleware.rb:84:in `protected_app_call'
(gem) better_errors-0.8.0/lib/better_errors/middleware.rb:79:in `better_errors_call'
(gem) better_errors-0.8.0/lib/better_errors/middleware.rb:56:in `call'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
(gem) railties-3.2.22/lib/rails/rack/logger.rb:32:in `call_app'
(gem) railties-3.2.22/lib/rails/rack/logger.rb:16:in `block in call'
(gem) activesupport-3.2.22/lib/active_support/tagged_logging.rb:22:in `tagged'
(gem) railties-3.2.22/lib/rails/rack/logger.rb:16:in `call'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/request_id.rb:22:in `call'
(gem) rack-1.4.7/lib/rack/methodoverride.rb:21:in `call'
(gem) rack-1.4.7/lib/rack/runtime.rb:17:in `call'
(gem) activesupport-3.2.22/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
(gem) rack-1.4.7/lib/rack/lock.rb:15:in `call'
(gem) actionpack-3.2.22/lib/action_dispatch/middleware/static.rb:83:in `call'
(gem) railties-3.2.22/lib/rails/engine.rb:484:in `call'
(gem) railties-3.2.22/lib/rails/application.rb:231:in `call'
(gem) rack-1.4.7/lib/rack/content_length.rb:14:in `call'
(gem) railties-3.2.22/lib/rails/rack/log_tailer.rb:17:in `call'
(gem) thin-1.6.4/lib/thin/connection.rb:86:in `block in pre_process'
(gem) thin-1.6.4/lib/thin/connection.rb:84:in `pre_process'
(gem) thin-1.6.4/lib/thin/connection.rb:53:in `process'
(gem) thin-1.6.4/lib/thin/connection.rb:39:in `receive_data'
(gem) eventmachine-1.0.8/lib/eventmachine.rb:193:in `run'
(gem) thin-1.6.4/lib/thin/backends/base.rb:73:in `start'
(gem) thin-1.6.4/lib/thin/server.rb:162:in `start'
(gem) rack-1.4.7/lib/rack/handler/thin.rb:13:in `run'
(gem) rack-1.4.7/lib/rack/server.rb:268:in `start'
(gem) railties-3.2.22/lib/rails/commands/server.rb:70:in `start'
(gem) railties-3.2.22/lib/rails/commands.rb:55:in `block in <top (required)>'
(gem) railties-3.2.22/lib/rails/commands.rb:50:in `<top (required)>'
script/rails:6:in `<main>'
Not sure what causes it and usually I'm good for another dump import and usually the problem vanish.
My session_store.rb looks like this:
MyApp::Application.config.session_store :active_record_store, key: 'my_session_name', :domain => :all
The migration file to create the cookies session:
class AddSessionsTable < ActiveRecord::Migration
def change
create_table :sessions do |t|
t.string :session_id, :null => false
t.text :data
t.timestamps
end
add_index :sessions, :session_id
add_index :sessions, :updated_at
end
end
Because I can't explain why things don't work AND can't fix it unless I do another import, I'm wary of deleting old sessions in production.
I have installed a sonar's test serveur (same version, plugins, os, ... than the production) to test some Sonar upgrades.
I use the backup / restore function.
Everything work fine except for the quality profiles which do errors on the test serveur.
The logs when I restore backuped files :
o.s.s.c.MetricsBackup Disable user-defined metrics
o.s.s.c.MetricsBackup Restore metrics
o.s.s.c.PropertiesBackup Restore properties
o.s.s.c.RulesBackup Disable rules created by user
o.s.s.c.RulesBackup Restore rules
o.s.s.c.ProfilesBackup Delete profiles
o.s.s.c.ProfilesBackup Restore profile SIHM - Général
o.s.s.c.ProfilesBackup Restore profile SIHM - Général
o.s.s.c.ProfilesBackup Restore profile SIHM - Général
o.s.s.c.ProfilesBackup Restore profile SIHM - Général
o.s.s.c.ProfilesBackup Restore profile SIHM - Projets Intranet
o.s.s.c.ProfilesBackup Restore profile SIHM - Projets Intranet
o.s.s.c.ProfilesBackup Restore profile Sonar way with Findbugs
o.s.s.c.ProfilesBackup Restore profile Sonar way
o.s.s.c.ProfilesBackup Restore profile Sun checks
o.s.s.c.ProfilesBackup Restore profile Sonar way
o.s.s.c.ProfilesBackup Restore profile Sonar way
o.s.s.c.ProfilesBackup Restore profile Sonar way
o.s.s.c.ProfilesBackup Restore profile SIHM - Projets EAR
o.s.s.c.Backup Backup restored
The errors when I try to access to the enterprise quality profils (SIHM - xxxxx) :
ERROR o.s.s.ui.JRubyFacade Fail to render: http://xxxxx:9000/rules_configuration/index/10020
undefined method `strip' for nil:NilClass
On line #11 of app/views/rules_configuration/_rule_note.html.erb
8: %>
9: <div id="<%= note_detail_div_id -%>">
10: <div>
11: <% if rule.description.strip.start_with?('<p>') %>
12: <%= Internal.text.interpretMacros(rule.description) %>
13: <% else %>
14: <p><%= Internal.text.interpretMacros(rule.description) %></p>
app/views/rules_configuration/_rule_note.html.erb:11
org/jruby/RubyKernel.java:2109:in `send'
gems/gems/actionpack-2.3.15/lib/action_view/renderable.rb:34:in `render'
gems/gems/actionpack-2.3.15/lib/action_view/base.rb:306:in `with_template'
gems/gems/actionpack-2.3.15/lib/action_view/renderable.rb:30:in `render'
gems/gems/actionpack-2.3.15/lib/action_view/renderable_partial.rb:20:in `render'
gems/gems/actionpack-2.3.15/lib/action_controller/benchmarking.rb:30:in `benchmark'
gems/gems/actionpack-2.3.15/lib/action_view/renderable_partial.rb:19:in `render'
gems/gems/actionpack-2.3.15/lib/action_view/template.rb:205:in `render_template'
gems/gems/actionpack-2.3.15/lib/action_view/renderable_partial.rb:44:in `render_partial'
gems/gems/actionpack-2.3.15/lib/action_view/partials.rb:184:in `render_partial'
gems/gems/actionpack-2.3.15/lib/action_view/base.rb:267:in `render'
app/views/rules_configuration/_rule.html.erb:46
org/jruby/RubyKernel.java:2109:in `send'
gems/gems/actionpack-2.3.15/lib/action_view/renderable.rb:34:in `render'
gems/gems/actionpack-2.3.15/lib/action_view/base.rb:306:in `with_template'
gems/gems/actionpack-2.3.15/lib/action_view/renderable.rb:30:in `render'
gems/gems/actionpack-2.3.15/lib/action_view/renderable_partial.rb:20:in `render'
gems/gems/actionpack-2.3.15/lib/action_controller/benchmarking.rb:30:in `benchmark'
gems/gems/actionpack-2.3.15/lib/action_view/renderable_partial.rb:19:in `render'
gems/gems/actionpack-2.3.15/lib/action_view/template.rb:205:in `render_template'
gems/gems/actionpack-2.3.15/lib/action_view/renderable_partial.rb:44:in `render_partial'
gems/gems/actionpack-2.3.15/lib/action_view/partials.rb:184:in `render_partial'
gems/gems/actionpack-2.3.15/lib/action_view/base.rb:267:in `render'
app/views/rules_configuration/index.html.erb:158
org/jruby/RubyArray.java:1620:in `each'
app/views/rules_configuration/index.html.erb:154
org/jruby/RubyKernel.java:2109:in `send'
gems/gems/actionpack-2.3.15/lib/action_view/renderable.rb:34:in `render'
gems/gems/actionpack-2.3.15/lib/action_view/base.rb:306:in `with_template'
gems/gems/actionpack-2.3.15/lib/action_view/renderable.rb:30:in `render'
gems/gems/actionpack-2.3.15/lib/action_view/template.rb:205:in `render_template'
gems/gems/actionpack-2.3.15/lib/action_view/base.rb:265:in `render'
gems/gems/actionpack-2.3.15/lib/action_view/base.rb:348:in `_render_with_layout'
gems/gems/actionpack-2.3.15/lib/action_view/base.rb:262:in `render'
gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:1252:in `render_for_file'
gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:936:in `render'
gems/gems/actionpack-2.3.15/lib/action_controller/benchmarking.rb:51:in `render_with_benchmark'
gems/gems/actionpack-2.3.15/lib/action_controller/benchmarking.rb:51:in `render_with_benchmark'
gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:1328:in `default_render'
gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:1334:in `perform_action'
gems/gems/actionpack-2.3.15/lib/action_controller/filters.rb:617:in `call_filters'
gems/gems/actionpack-2.3.15/lib/action_controller/filters.rb:610:in `perform_action_with_filters'
gems/gems/actionpack-2.3.15/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
gems/gems/actionpack-2.3.15/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
gems/gems/actionpack-2.3.15/lib/action_controller/rescue.rb:160:in `perform_action_with_rescue'
gems/gems/actionpack-2.3.15/lib/action_controller/flash.rb:151:in `perform_action_with_flash'
org/jruby/RubyKernel.java:2105:in `send'
gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:532:in `process'
gems/gems/actionpack-2.3.15/lib/action_controller/filters.rb:606:in `process_with_filters'
gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:391:in `process'
gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:386:in `call'
gems/gems/actionpack-2.3.15/lib/action_controller/routing/route_set.rb:438:in `call'
gems/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:87:in `dispatch'
gems/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:121:in `_call'
gems/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
org/jruby/RubyProc.java:270:in `call'
org/jruby/RubyProc.java:220:in `call'
gems/gems/activerecord-2.3.15/lib/active_record/query_cache.rb:29:in `call'
gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
gems/gems/activerecord-2.3.15/lib/active_record/query_cache.rb:9:in `cache'
gems/gems/activerecord-2.3.15/lib/active_record/query_cache.rb:28:in `call'
gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
gems/gems/actionpack-2.3.15/lib/action_controller/string_coercion.rb:25:in `call'
gems/gems/actionpack-2.3.15/lib/action_controller/params_parser.rb:15:in `call'
file:lib/jruby-rack-1.1.10.jar!/jruby/rack/session_store.rb:70:in `context'
gems/gems/actionpack-2.3.15/lib/action_controller/failsafe.rb:26:in `call'
gems/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:106:in `call'
file:lib/jruby-rack-1.1.10.jar!/rack/adapter/rails.rb:34:in `serve_rails'
file:lib/jruby-rack-1.1.10.jar!/rack/adapter/rails.rb:39:in `call'
file:lib/jruby-rack-1.1.10.jar!/rack/handler/servlet.rb:22:in `call'
Anyone have an idea ?
Regards,
Stephane
This feature is buggy. That's why it was removed: http://jira.codehaus.org/browse/SONAR-4887
I getting the error "undefined method `update_attributes' for nil:NilClass" when using Sinatra with MongoMapper.
Model:
class Publication
include MongoMapper::Document
key :page, String
key :title, String
key :body, String
end
and code where i getting error:
post '/edit' do
#article = Publication.update({:page => 'main'}, {$set => {:title => params[:title], :body => params[:body]}})
end
i'm tried to make update in mongo console and it was successfully updated:
> db.publications.update({page: 'main'},{$set: {body: '333', title: '111'}})
> db.publications.find({page: 'main'})
{ "_id" : ObjectId("4fa45046530a6978e3000003"), "body" : "333", "page" : "main", "title" : "111" }
Full stack trace:
[2012-05-06 03:04:22] INFO WEBrick 1.3.1
[2012-05-06 03:04:22] INFO ruby 1.8.7 (2010-01-10) [universal-darwin11.0]
== Sinatra/1.3.2 has taken the stage on 4567 for development with backup from WEBrick
[2012-05-06 03:04:23] INFO WEBrick::HTTPServer#start: pid=32266 port=4567
localhost - - [06/May/2012:03:04:27 MSK] "GET /edit HTTP/1.1" 200 193
- -> /edit
localhost - - [06/May/2012:03:04:27 MSK] "GET /favicon.ico HTTP/1.1" 404 447
- -> /favicon.ico
NoMethodError - undefined method `update_attributes' for nil:NilClass:
/Library/Ruby/Gems/1.8/gems/mongo_mapper- 0.11.1/lib/mongo_mapper/plugins/querying.rb:118:in `update_single'
/Library/Ruby/Gems/1.8/gems/mongo_mapper-0.11.1/lib/mongo_mapper/plugins/querying.rb:117:in `tap'
/Library/Ruby/Gems/1.8/gems/mongo_mapper-0.11.1/lib/mongo_mapper/plugins/querying.rb:117:in `update_single'
/Library/Ruby/Gems/1.8/gems/mongo_mapper-0.11.1/lib/mongo_mapper/plugins/querying.rb:45:in `update'
main.rb:48:in `POST /edit'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:1211:in `call'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:1211:in `compile!'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `[]'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `route!'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:801:in `route_eval'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `route!'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:822:in `process_route'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in `catch'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in `process_route'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:784:in `route!'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in `each'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in `route!'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:886:in `dispatch!'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `call!'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `invoke'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `catch'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `invoke'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `call!'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:705:in `call'
/Library/Ruby/Gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
/Library/Ruby/Gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in `call'
/Library/Ruby/Gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in `call'
/Library/Ruby/Gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in `call'
/Library/Ruby/Gems/1.8/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.4.1/lib/rack/logger.rb:15:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.4.1/lib/rack/head.rb:9:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/showexceptions.rb:21:in `call'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `call'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:1416:in `synchronize'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.4.1/lib/rack/handler/webrick.rb:59:in `service'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/Library/Ruby/Gems/1.8/gems/rack-1.4.1/lib/rack/handler/webrick.rb:13:in `run'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:1295:in `run!'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/main.rb:25
main.rb:53
anyone can say for what reason I do not get properly updated in the ruby code?
You probably meant to have :$set instead of $set as your key:
#article = Publication.update({:page => 'main'}, {:$set => {:title => params[:title], :body => params[:body]}})
What you have is using the global variable $set for the key, which is nil (since all global variables default to nil). For example:
{ $set => "something" } #=> {nil=>"something"}
{ :$set => "something" } #=> {:$set=>"something"}
im working with active admin i have collection_select or dropdown box that populates the packages and crews im just wondering i why this
undefined method `[]' for nil:NilClass`
i dont know what happened but it run few days ago and tested it once but now it raises this error are there possible way to solve this?
def create
#package = Package.find(params[:package_crew][:package_id])
crew = Crew.find(params[:package_crew][:crew_id] )
#package_crew = #package.add_crew(crew.id)
if #package_crew.save
redirect_to {admin_package_crew_url}
end
end
thanks in advance more power to us all
i tried this and
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
tried create
def create
#pid = params[:package_crew][:crew_id] if params[:package_crew]
pid,cid = 2 #tried nil,0..10
if params[:package_crew]
pid = params[:package_crew][:package_id]
cid = params[:package_crew][:crew_id]
end
#package = Package.find_by_id(pid)
crew = Crew.find_by_id(cid)
##package = Package.find(params[:package_crew][:package_id])
#crew = Crew.find(params[:package_crew][:crew_id] )
#package_crew = #package.add_crew(crew.id)
if #package_crew.save
redirect_to {admin_package_crew_url}
end
end
add_crew method
def add_crew(crew_id)
current_package = package_crews.find_by_crew_id(crew_id)
if current_package
current_package.quantity = current_package.quantity.to_i + 1
else
current_package = package_crews.build(:crew_id => crew_id)
current_package.price = current_package.crew.price
end
current_package
end
moving parameters
{"utf8"=>"✓",
"authenticity_token"=>"n4WZpQpES6mnSO12oGKV/MeoxAVvV9OmJQKfhcpnvQM=",
"crew_for_package"=>{"package_id"=>"1",
"crew_id"=>"1",
"quantity"=>"1"},
"commit"=>"Create Package crew"}
stack error
app/admin/package_crews.rb:35:in `create'
actionpack (3.2.1) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.2.1) lib/abstract_controller/base.rb:167:in `process_action'
actionpack (3.2.1) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (3.2.1) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (3.2.1) lib/active_support/callbacks.rb:447:in `_run__304549499__process_action__775442107__callbacks'
activesupport (3.2.1) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.1) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
activesupport (3.2.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.1) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (3.2.1) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (3.2.1) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
activesupport (3.2.1) lib/active_support/notifications.rb:123:in `block in instrument'
activesupport (3.2.1) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (3.2.1) lib/active_support/notifications.rb:123:in `instrument'
actionpack (3.2.1) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
actionpack (3.2.1) lib/action_controller/metal/params_wrapper.rb:205:in `process_action'
activerecord (3.2.1) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (3.2.1) lib/abstract_controller/base.rb:121:in `process'
actionpack (3.2.1) lib/abstract_controller/rendering.rb:45:in `process'
actionpack (3.2.1) lib/action_controller/metal.rb:203:in `dispatch'
actionpack (3.2.1) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.2.1) lib/action_controller/metal.rb:246:in `block in action'
actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:66:in `call'
actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:66:in `dispatch'
actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:30:in `call'
journey (1.0.3) lib/journey/router.rb:68:in `block in call'
journey (1.0.3) lib/journey/router.rb:56:in `each'
journey (1.0.3) lib/journey/router.rb:56:in `call'
actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:589:in `call'
sass (3.1.15) lib/sass/plugin/rack.rb:54:in `call'
warden (1.1.1) lib/warden/manager.rb:35:in `block in call'
warden (1.1.1) lib/warden/manager.rb:34:in `catch'
warden (1.1.1) lib/warden/manager.rb:34:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.4.1) lib/rack/etag.rb:23:in `call'
rack (1.4.1) lib/rack/conditionalget.rb:35:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/flash.rb:242:in `call'
rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/cookies.rb:338:in `call'
activerecord (3.2.1) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.1) lib/active_support/callbacks.rb:405:in `_run__1039351831__call__833288071__callbacks'
activesupport (3.2.1) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.1) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.1) lib/rails/rack/logger.rb:26:in `call_app'
railties (3.2.1) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.1) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/static.rb:53:in `call'
railties (3.2.1) lib/rails/engine.rb:479:in `call'
railties (3.2.1) lib/rails/application.rb:220:in `call'
railties (3.2.1) lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/rack/application_spawner.rb:206:in `start_request_handler'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/rack/application_spawner.rb:171:in `block in handle_spawn_application'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/utils.rb:479:in `safe_fork'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/rack/application_spawner.rb:166:in `handle_spawn_application'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_server.rb:180:in `start'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/rack/application_spawner.rb:129:in `start'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/spawn_manager.rb:253:in `block (2 levels) in spawn_rack_application'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/spawn_manager.rb:246:in `block in spawn_rack_application'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
<internal:prelude>:10:in `synchronize'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/home/led/.passenger/standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.6.3-1002/support/helper-scripts/passenger-spawn-server:99:in `<main>'
What you send :
{
"crew_for_package" => {
"package_id"=>"1",
"crew_id"=>"1",
"quantity"=>"1"
}
}
What you call :
params[:package_crew][:package_id]
params[:package_crew][:crew_id]
You see something wrong? This might not fix your problem, but it should at least send you in the right direction! :-)
I think I am pushing my master branch to heroku, but when I visit the page none of the file structure is there. For example if I visit http://heroku-site/pages/home I get a "We're sorry but something wen't wrong error" The app works fine locally. How do I know the files are up there. Here are my steps. Not sure why it's not working.
1) git status
2) git add .
3) git commit -m "Some Message"
4) git push heroku master
Heroku logs
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/static.rb:53:in `call'
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:132:in `forward'
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:181:in `lookup'
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:65:in `call!'
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:220:in `call'
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-02-03T02:44:22+00:00 app[web.1]: /home/heroku_rack/lib/static_assets.rb:9:in `call'
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:50:in `call'
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:479:in `call'
2012-02-03T02:44:22+00:00 app[web.1]: /home/heroku_rack/lib/last_access.rb:15:in `call'
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
2012-02-03T02:44:22+00:00 heroku[router]: GET quiet-flower-7747.heroku.com/pages/home dyno=web.1 queue=0 wait=0ms service=8ms status=500 bytes=643
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
2012-02-03T02:44:22+00:00 app[web.1]: /home/heroku_rack/lib/date_header.rb:14:in `call'
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:76:in `block in pre_process'
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:74:in `catch'
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:57:in `process'
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:42:in `receive_data'
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:74:in `pre_process'
2012-02-03T02:44:22+00:00 app[web.1]: eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/backends/base.rb:57:in `start'
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/server.rb:156:in `start'
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/controllers/controller.rb:80:in `start'
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/runner.rb:177:in `run_command'
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/runner.rb:143:in `run!'
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) bin/thin:6:in `<top (required)>'
2012-02-03T02:44:22+00:00 app[web.1]: /usr/ruby1.9.2/bin/thin:19:in `load'
2012-02-03T02:44:22+00:00 app[web.1]: /usr/ruby1.9.2/bin/thin:19:in `<main>'
2012-02-03T02:44:22+00:00 app[web.1]:
2012-02-03T02:44:22+00:00 app[web.1]: eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
2012-02-03T02:44:22+00:00 app[web.1]:
2012-02-03T02:44:22+00:00 app[web.1]: cache: [GET /pages/home] miss
2012-02-03T02:44:22+00:00 heroku[nginx]: 24.87.81.230 - - [03/Feb/2012:02:44:22 +0000] "GET /pages/home HTTP/1.1" 500 643 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7" quiet-flower-7747.heroku.com
2012-02-03T02:46:45+00:00 app[web.1]:
2012-02-03T02:46:45+00:00 app[web.1]:
2012-02-03T02:46:45+00:00 app[web.1]: Started GET "/pages/home" for 24.87.81.230 at 2012-02-02 18:46:45 -0800
2012-02-03T02:46:45+00:00 app[web.1]:
2012-02-03T02:46:45+00:00 app[web.1]: ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished):
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:374:in `retrieve_connection'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:168:in `retrieve_connection'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:142:in `connection'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/query_cache.rb:67:in `rescue in call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/query_cache.rb:61:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/callbacks.rb:405:in `_run__2584572968946772396__call__962583124295019556__callbacks'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/callbacks.rb:405:in `__run_callback'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/railties-3.2.1/lib/rails/rack/logger.rb:26:in `call_app'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/railties-3.2.1/lib/rails/rack/logger.rb:16:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:132:in `forward'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:50:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/static.rb:53:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:181:in `lookup'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:479:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:220:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:241:in `fetch'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:65:in `call!'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-02-03T02:46:45+00:00 app[web.1]: /home/heroku_rack/lib/static_assets.rb:9:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: /home/heroku_rack/lib/last_access.rb:15:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: /home/heroku_rack/lib/date_header.rb:14:in `call'
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
2012-02-03T02:46:45+00:00 heroku[router]: GET quiet-flower-7747.heroku.com/pages/home dyno=web.1 queue=0 wait=0ms service=11ms status=500 bytes=643
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:74:in `catch'
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:74:in `pre_process'
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:57:in `process'
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:42:in `receive_data'
2012-02-03T02:46:45+00:00 app[web.1]: eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
2012-02-03T02:46:45+00:00 app[web.1]: eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/backends/base.rb:57:in `start'
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/server.rb:156:in `start'
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/controllers/controller.rb:80:in `start'
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:76:in `block in pre_process'
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) bin/thin:6:in `<top (required)>'
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/runner.rb:143:in `run!'
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/runner.rb:177:in `run_command'
2012-02-03T02:46:45+00:00 app[web.1]:
2012-02-03T02:46:45+00:00 app[web.1]: /usr/ruby1.9.2/bin/thin:19:in `load'
2012-02-03T02:46:45+00:00 app[web.1]: /usr/ruby1.9.2/bin/thin:19:in `<main>'
2012-02-03T02:46:45+00:00 app[web.1]:
2012-02-03T02:46:45+00:00 app[web.1]: cache: [GET /pages/home] miss
2012-02-03T02:46:46+00:00 heroku[nginx]: 24.87.81.230 - - [03/Feb/2012:02:46:46 +0000] "GET /pages/home HTTP/1.1" 500 643 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7" quiet-flower-7747.heroku.com
Your answer lies here:
ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished):
I notice you're using EventMachine, which then leads me to ask how you're connecting to the database. Ensure that you're using ENV["DATABASE_URL"] as your DB connection.
You can tell if your repository files are up there by cloning from your Heroku git repo to some other directory on your machine and making sure they're all there.
When you say "when I visit the page none of the file structure is there", what do you mean exactly?
If /pages/home is supposed to display the file listing from your file system, then this might not work in Heroku. I know that your Dyno sees a read-only file system and they might be doing some other funny stuff there as well.