When i do my first SELECT requests to my RoR app i get
"PG::Error: SSL SYSCALL error: EOF detected".
What should i do to turn off SSL in my Postgresql?
Error info:
ActiveRecord::StatementInvalid: PG::Error: SSL SYSCALL error: EOF detected : SELECT "vacancies".* FROM "vacancies" WHERE (moderated_at IS NOT null) ORDER BY id DESC LIMIT 10
Sample stack trace (show Rails)
…ases/20120808235942/app/controllers/home_controller.rb: 6:in `index'
…le/ruby/1.9.1/gems/journey-1.0.3/lib/journey/router.rb: 68:in `block in call'
…le/ruby/1.9.1/gems/journey-1.0.3/lib/journey/router.rb: 56:in `each'
…le/ruby/1.9.1/gems/journey-1.0.3/lib/journey/router.rb: 56:in `call'
…dle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/manager.rb: 35:in `block in call'
…dle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/manager.rb: 34:in `catch'
…dle/ruby/1.9.1/gems/warden-1.1.1/lib/warden/manager.rb: 34:in `call'
…red/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/etag.rb: 23:in `call'
…/ruby/1.9.1/gems/rack-1.4.1/lib/rack/conditionalget.rb: 25:in `call'
…/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb: 205:in `context'
…/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb: 200:in `call'
…/ruby/1.9.1/gems/rack-1.4.1/lib/rack/methodoverride.rb: 21:in `call'
…/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/runtime.rb: 17:in `call'
…red/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/lock.rb: 15:in `call'
…by/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb: 136:in `forward'
…by/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb: 245:in `fetch'
…by/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb: 185:in `lookup'
…by/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb: 66:in `call!'
…by/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb: 51:in `call'
…by/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb: 531:in `process_client'
…by/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb: 606:in `worker_loop'
…by/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb: 487:in `spawn_missing_workers'
…by/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb: 137:in `start'
I found how to fix this problem. If you use Capistrano to deploy you app add to unicorn.rb
before_fork do |server, worker|
defined?(ActiveRecord::Base) and
ActiveRecord::Base.connection.disconnect!
end
after_fork do |server, worker|
defined?(ActiveRecord::Base) and
ActiveRecord::Base.establish_connection
end
Related
I created a rails API using postgre database in which i have a model (table) name as counseling_event
NOTE: Not using scaffold and using rails-5
My scheman(migration) for counseling_event is as follow:
class CreateCounselingEvent < ActiveRecord::Migration[5.0]
def change
create_table :counseling_event do |t|
t.text :name
t.datetime :start_time
t.datetime :end_time
t.text :location
t.integer :user_id
t.integer :role_id
t.timestamps
end
end
end
I added a column to the above table, which is of type enum. column name is event_type
Now, In my Controller i.e CounselingEventController, in my action index i'm retrieving the data from the counseling_event table. the code is as follows.
def index
#counseling_event = CounselingEvent.where(start_time: "2016-10-30".."2016-12-11")
render body: #counseling_event
end
when i call this api controller action from frontend through following route
get 'counseling_event/index'
I'm getting this error in my console:
CounselingEvent Load (1.5ms) SELECT "counseling_event".* FROM "counseling_event"
NoMethodError (undefined method `empty?' for #<CounselingEvent:0x47d1d58>):
activemodel (5.0.0.1) lib/active_model/attribute_methods.rb:433:in `method_missing'
rack (2.0.1) lib/rack/etag.rb:68:in `block in digest_body'
activerecord (5.0.0.1) lib/active_record/relation/delegation.rb:38:in `each'
activerecord (5.0.0.1) lib/active_record/relation/delegation.rb:38:in `each'
actionpack (5.0.0.1) lib/action_dispatch/http/response.rb:145:in `each_chunk'
actionpack (5.0.0.1) lib/action_dispatch/http/response.rb:126:in `each'
actionpack (5.0.0.1) lib/action_dispatch/http/response.rb:74:in `each'
actionpack (5.0.0.1) lib/action_dispatch/http/response.rb:464:in `each'
rack (2.0.1) lib/rack/etag.rb:66:in `digest_body'
rack (2.0.1) lib/rack/etag.rb:29:in `call'
rack (2.0.1) lib/rack/conditional_get.rb:38:in `call'
rack (2.0.1) lib/rack/head.rb:12:in `call'
activerecord (5.0.0.1) lib/active_record/migration.rb:552:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:97:in `__run_callbacks__'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:90:in `run_callbacks'
actionpack (5.0.0.1) lib/action_dispatch/middleware/callbacks.rb:36:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.0.0.1) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `block in tagged'
activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `tagged'
railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/request_id.rb:24:in `call'
rack (2.0.1) lib/rack/runtime.rb:22:in `call'
activesupport (5.0.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/static.rb:136:in `call'
rack (2.0.1) lib/rack/sendfile.rb:111:in `call'
rack-cors (0.4.0) lib/rack/cors.rb:80:in `call'
railties (5.0.0.1) lib/rails/engine.rb:522:in `call'
puma (3.6.0) lib/puma/configuration.rb:225:in `call'
puma (3.6.0) lib/puma/server.rb:578:in `handle_request'
puma (3.6.0) lib/puma/server.rb:415:in `process_client'
puma (3.6.0) lib/puma/server.rb:275:in `block in run'
puma (3.6.0) lib/puma/thread_pool.rb:116:in `call'
puma (3.6.0) lib/puma/thread_pool.rb:116:in `block in spawn_thread'
I don't know the reason for the error but, trying hard to resolve it. can any one help me out to solve this error. it seems like some activemodel error. Thanks in advance.
Rails is based on Rack. Rack can only handle strings. You're rendering an object, not a string.
You probably want something like:
render plain: #counceling_event.to_s
It basically happens because Rack attempts to call #empty? on the body of the response to determine how it should respond to the client.
But since your #counceling_event isn't a string and doesn't respond to empty? it fails.
I'm unsure what you're trying to do by render body: <SOMETHING>. If you're on a Rails app you probably want to render a view instead of content directly from the controller.
If you really want to render from the controller you should consider using render plain: <SOMETHING>.
Hope this helps.
I'm upgrading my rails app using Paperclip and uploading my attachments via ftp (using paperclipftp gem). I'm currently in my development environment which includes Rails 3.1.1, Ruby ruby 1.9.2p290, paperclip 3.0.4, aws-sdk 1.8.1.2
I've made changes to my app to utilize the aws-sdk gem to utilize amazon s3 for my attachment storage. Here's what I have in my Gemfile:
gem 'mysql2'
gem 'execjs'
gem 'web-app-theme', '~> 0.8.0'
gem 'therubyracer', :platforms => :ruby
gem 'paperclip', '~> 3.0.0'
gem 'tinymce-rails'
gem 'cocaine', '~> 0.3.2'
gem 'aws-sdk'
In my model I define the attachment with:
#paperclip
has_attached_file :upload,
:styles => Proc.new { |attach| attach.instance.attachment_styles },
:storage => :s3,
:s3_credentials => Rails.root.join('config', 's3.yml'),
:path => "/:attachment/:id/:style/:basename.:extension",
:url => "http://" + FTP_CONFIG['file_host'] + "/:attachment/:id/:style/:basename.:extension"
My s3.yml file looks like:
development:
bucket: a36-dev
access_key_id: #########
secret_access_key: ##########
test:
bucket: a36-test
access_key_id: #########
secret_access_key: #########
production:
bucket: a36-prod
access_key_id: #########
secret_access_key: #########
The error I continue to get is:
Errno::ECONNABORTED in MediaController#create_for_content
An established connection was aborted by the software in your host machine
Here's the stack trace:
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/openssl/buffering.rb:235:in `syswrite'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/openssl/buffering.rb:235:in `do_write'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/openssl/buffering.rb:249:in `write'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/net/protocol.rb:191:in `write0'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/net/protocol.rb:167:in `block in write'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/net/protocol.rb:182:in `writing'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/net/protocol.rb:166:in `write'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/net/http.rb:1756:in `send_request_with_body_stream'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/net/http.rb:1726:in `exec'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/net/http.rb:1189:in `transport_request'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/net/http.rb:1177:in `request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/net/http/connection_pool/session.rb:64:in `request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/net/http/connection_pool.rb:173:in `block in request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/net/http/connection_pool.rb:194:in `session_for'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/net/http/connection_pool.rb:171:in `request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/net/http/connection_pool/connection.rb:173:in `request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/http/net_http_handler.rb:66:in `handle'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/client.rb:230:in `block in make_sync_request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/client.rb:266:in `retry_server_errors'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/client.rb:226:in `make_sync_request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/client.rb:451:in `block (2 levels) in client_request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/client.rb:334:in `log_client_request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/client.rb:420:in `block in client_request'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/client.rb:316:in `return_or_raise'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/core/client.rb:419:in `client_request'
(eval):3:in `put_object'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/s3/s3_object.rb:1649:in `write_with_put_object'
vendor/bundle/ruby/1.9.1/gems/aws-sdk-1.8.1.2/lib/aws/s3/s3_object.rb:600:in `write'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/storage/s3.rb:313:in `block in flush_writes'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/storage/s3.rb:299:in `each'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/storage/s3.rb:299:in `flush_writes'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/attachment.rb:200:in `save'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/instance_methods.rb:17:in `block in save_attached_files'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/instance_methods.rb:10:in `block in each_attachment'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/instance_methods.rb:9:in `each'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/instance_methods.rb:9:in `each_attachment'
vendor/bundle/ruby/1.9.1/gems/paperclip-3.0.4/lib/paperclip/instance_methods.rb:16:in `save_attached_files'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:401:in `_run_save_callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/callbacks.rb:264:in `create_or_update'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/persistence.rb:37:in `save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/validations.rb:50:in `save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/attribute_methods/dirty.rb:22:in `save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/transactions.rb:241:in `block (2 levels) in save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/transactions.rb:208:in `transaction'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/transactions.rb:241:in `block in save'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/transactions.rb:252:in `rollback_active_record_state!'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/transactions.rb:240:in `save'
app/controllers/media_controller.rb:207:in `create_for_content'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/abstract_controller/base.rb:167:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/rendering.rb:10:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:425:in `_run__690981913__process_action__778841897__callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:386:in `_run_process_action_callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/abstract_controller/callbacks.rb:17:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/rescue.rb:17:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/notifications.rb:53:in `block in instrument'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/notifications.rb:53:in `instrument'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/params_wrapper.rb:201:in `process_action'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/abstract_controller/base.rb:121:in `process'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/abstract_controller/rendering.rb:45:in `process'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal.rb:193:in `dispatch'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal.rb:236:in `block in action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/routing/route_set.rb:65:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/routing/route_set.rb:65:in `dispatch'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/routing/route_set.rb:29:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-mount-0.8.3/lib/rack/mount/route_set.rb:152:in `block in call'
vendor/bundle/ruby/1.9.1/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:96:in `block in recognize'
vendor/bundle/ruby/1.9.1/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:75:in `optimized_each'
vendor/bundle/ruby/1.9.1/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:95:in `recognize'
vendor/bundle/ruby/1.9.1/gems/rack-mount-0.8.3/lib/rack/mount/route_set.rb:141:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/routing/route_set.rb:532:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/etag.rb:23:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/conditionalget.rb:35:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/head.rb:14:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/flash.rb:243:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/session/abstract/id.rb:195:in `context'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/session/abstract/id.rb:190:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/cookies.rb:331:in `call'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/query_cache.rb:62:in `call'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:477:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:392:in `_run_call_callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/callbacks.rb:28:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/reloader.rb:68:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/sendfile.rb:101:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/rack/logger.rb:13:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/methodoverride.rb:24:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/runtime.rb:17:in `call'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/lock.rb:15:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/static.rb:53:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:456:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/rack/content_length.rb:16:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/rack/log_tailer.rb:14:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.3.9/lib/rack/handler/webrick.rb:59:in `service'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
I can't figure out why I keep getting this error. Any help would be greatly appreciated.
I was having the same problem and remembered I had recently update my aws-sdk, paperclip, cocaine gems. What I ended up doing was locking paperclip to version "3.0.4", aws-sdk to the latest version "~> 1.8.3.1", and locking cocaine at "0.3.2". This solves problems with imagemagick and amazon. I know that does not really fix the problem but it is working for me.
I'm trying to do this:
config.filter_parameters << lambda do |k,v|
if k == "content"
v.slice!(250..-1)
v.insert(-1, "...[TRUNCATED]")
end
end
So as to keep the logs manageable with large 'content' fields. But when I generate an exception, I get the following stack trace. Exception notification 3.0, Rails 3.2.8
Ideas?
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:40:in `dup'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:40:in `block (2 levels) in compiled_filter'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:32:in `each'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:32:in `block in compiled_filter'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:11:in `call'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:11:in `filter'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:36:in `block (2 levels) in compiled_filter'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:32:in `each'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:32:in `block in compiled_filter'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:11:in `call'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:11:in `filter'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/filter_parameters.rb:38:in `filtered_env'
ruby/1.9.1/gems/exception_notification-3.0.0/lib/exception_notifier/views/exception_notifier/_environment.text.erb:1:in `__home_myappuser_myapp_shared_bundle_ruby_______gems_exception_notification_______lib_exception_notifier_views_exception_notifier__environment_text_erb__953280712_90713590'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/template.rb:145:in `block in render'
ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/notifications.rb:125:in `instrument'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/template.rb:143:in `render'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:265:in `render_partial'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:238:in `block in render'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:237:in `render'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:41:in `render_partial'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/helpers/rendering_helper.rb:27:in `render'
ruby/1.9.1/gems/exception_notification-3.0.0/lib/exception_notifier/views/exception_notifier/exception_notification.text.erb:9:in `block in __home_myappuser_myapp_shared_bundle_ruby_______gems_exception_notification_______lib_exception_notifier_views_exception_notifier_exception_notification_text_erb___442452799_85036510'
I am trying ActiveAdmin for the first time and have it working from the browser. I am not able to use Capybara to log in for integration testing, however. I have tried the fill-in-the-form method as well as stubbing the signin.
For example
it "allows user via capybara login" do
user = AdminUser.create(email: 'test#example.com', password: 'opensesame')
visit '/admin/login'
fill_in 'admin_user_email', with: user.email
fill_in 'admin_user_password', with: user.password
click_button 'Login'
end
gives the error message (full trace at end of post)
ActionView::Template::Error: wrong number of arguments (0 for 1)
/home/mike/ptbase/spec/support/request_helpers.rb:11:in `login'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/view_helpers/display_helper.rb:14:in `display_name'
I tried the stubbing method given by Joe's Notes
# spec/support/request_helpers.rb
require 'spec_helper'
include Warden::Test::Helpers
module RequestHelpers
def create_logged_in_user
user = FactoryGirl.create(:admin_user, password: 'opensesame')
login(user)
user
end
def login(user)
login_as user, scope: :user
end
end
# spec/features/patient_features_spec.rb
require 'spec_helper'
include RequestHelpers
feature "Patients" do
let(:authed_user) { create_logged_in_user }
it "should allow access" do
visit admin_dashboard_path(authed_user)
save_and_open_page
# should be good!
end
end
but that opens a page that says "You need to sign in or sign up before continuing."
I am using Rails 3.1.9, ActiveAdmin 0.5.0, and Capybara 2.0.1. I'm sure there must be an easy way to solve this ... obviously logging in is fundamental to integration testing ... but I can't seem to find it!
Full backtrace of above error:
ActionView::Template::Error: wrong number of arguments (0 for 1)
/home/mike/ptbase/spec/support/request_helpers.rb:11:in `login'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/view_helpers/display_helper.rb:14:in `display_name'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element.rb:175:in `method_missing'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/utility_nav.rb:21:in `build_current_user'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/utility_nav.rb:13:in `build'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:30:in `block in build_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/context.rb:92:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:26:in `build_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:39:in `insert_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/header.rb:26:in `build_utility_navigation'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/header.rb:13:in `build'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:30:in `block in build_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/context.rb:92:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:26:in `build_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:39:in `insert_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/pages/base.rb:49:in `build_header'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/pages/base.rb:40:in `block (2 levels) in build_page'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:31:in `block in build_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/context.rb:92:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:26:in `build_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:39:in `insert_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:18:in `div'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/pages/base.rb:39:in `block in build_page'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/context.rb:92:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/pages/base.rb:38:in `build_page'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/views/pages/base.rb:10:in `build'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:30:in `block in build_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/context.rb:92:in `with_current_arbre_element'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:26:in `build_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/element/builder_methods.rb:39:in `insert_tag'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/app/views/active_admin/page/index.html.arb:1:in `block in __home_mike__rvm_gems_ruby_______p____perf_gems_activeadmin_______app_views_active_admin_page_index_html_arb___526514329_111865000'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/context.rb:45:in `instance_eval'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/arbre-1.0.1/lib/arbre/context.rb:45:in `initialize'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/app/views/active_admin/page/index.html.arb:1:in `new'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/app/views/active_admin/page/index.html.arb:1:in `__home_mike__rvm_gems_ruby_______p____perf_gems_activeadmin_______app_views_active_admin_page_index_html_arb___526514329_111865000'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/template.rb:145:in `block in render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/notifications.rb:125:in `instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/template.rb:143:in `render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/notifications.rb:123:in `block in instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/notifications.rb:123:in `instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/template_renderer.rb:46:in `block in render_template'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/template_renderer.rb:18:in `render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/renderer.rb:36:in `render_template'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_view/renderer/renderer.rb:17:in `render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/abstract_controller/rendering.rb:110:in `_render_template'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/abstract_controller/rendering.rb:88:in `render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/rendering.rb:16:in `render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/home/mike/.rvm/rubies/ruby-1.9.3-p194-perf/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activerecord-3.2.9/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activeadmin-0.5.0/lib/active_admin/page_controller.rb:12:in `index'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/abstract_controller/base.rb:167:in `process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/rendering.rb:10:in `process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:447:in `_run__1002248294__process_action__401562286__callbacks'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/notifications.rb:123:in `block in instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/notifications.rb:123:in `instrument'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activerecord-3.2.9/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/abstract_controller/base.rb:121:in `process'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/abstract_controller/rendering.rb:45:in `process'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal.rb:203:in `dispatch'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_controller/metal.rb:246:in `block in action'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/routing/route_set.rb:73:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/routing/route_set.rb:36:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/routing/route_set.rb:601:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/warden-1.2.1/lib/warden/manager.rb:35:in `block in call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/warden-1.2.1/lib/warden/manager.rb:34:in `catch'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/warden-1.2.1/lib/warden/manager.rb:34:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/head.rb:14:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/flash.rb:242:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/cookies.rb:341:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activerecord-3.2.9/lib/active_record/query_cache.rb:64:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activerecord-3.2.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:405:in `_run__955233195__call__489842762__callbacks'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/railties-3.2.9/lib/rails/rack/logger.rb:32:in `call_app'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/railties-3.2.9/lib/rails/rack/logger.rb:16:in `block in call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/tagged_logging.rb:22:in `tagged'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/railties-3.2.9/lib/rails/rack/logger.rb:16:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/activesupport-3.2.9/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/actionpack-3.2.9/lib/action_dispatch/middleware/static.rb:62:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/railties-3.2.9/lib/rails/engine.rb:479:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/railties-3.2.9/lib/rails/application.rb:223:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-test-0.6.2/lib/rack/mock_session.rb:30:in `request'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-test-0.6.2/lib/rack/test.rb:230:in `process_request'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rack-test-0.6.2/lib/rack/test.rb:57:in `get'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/rack_test/browser.rb:59:in `process'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/rack_test/browser.rb:38:in `block in process_and_follow_redirects'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/rack_test/browser.rb:37:in `times'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/rack_test/browser.rb:37:in `process_and_follow_redirects'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/rack_test/browser.rb:26:in `submit'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/rack_test/form.rb:64:in `submit'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/rack_test/node.rb:72:in `click'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/node/element.rb:103:in `block in click'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/node/base.rb:77:in `synchronize'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/node/element.rb:103:in `click'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/node/actions.rb:35:in `click_button'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/session.rb:338:in `block (2 levels) in <class:Session>'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/capybara-2.0.1/lib/capybara/dsl.rb:51:in `block (2 levels) in <module:DSL>'
/home/mike/ptbase/spec/features/patients_features_spec.rb:19:in `block (2 levels) in <top (required)>'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/example.rb:114:in `instance_eval'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/example.rb:114:in `block in run'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/example.rb:254:in `with_around_each_hooks'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/example.rb:111:in `run'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/example_group.rb:388:in `block in run_examples'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/example_group.rb:384:in `map'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/example_group.rb:384:in `run_examples'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/example_group.rb:369:in `run'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/command_line.rb:28:in `map'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/command_line.rb:28:in `block in run'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/reporter.rb:34:in `report'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/command_line.rb:25:in `run'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/runner.rb:66:in `rescue in run'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/runner.rb:62:in `run'
/home/mike/.rvm/gems/ruby-1.9.3-p194-perf/gems/rspec-core-2.12.0/lib/rspec/core/runner.rb:8:in `block in autorun'
i ran into this issue few days ago, solved it by changing the setting in my spec_helper file as follow plus may you need to update the selinium and capybara versions too
Capybara.default_driver = :rack_test
Capybara.javascript_driver = :selenium
# You can also change the driver temporarily (typically in the Before/setup and After/teardown blocks):
# Use: Capybara.current_driver = :webkit # temporarily select different driver
# or use :js => true for specific test and it should use selenium by default.
# Or:
# Also see https://github.com/jnicklas/capybara#drivers
Capybara.default_wait_time = 5
Capybara.run_server = true #Whether start server when testing
Capybara.default_selector = :css #default selector , you can change to :css
OmniAuth.config.test_mode = true
I was working on some project using webrat and cucumber (rails 3), so I created a feature with this command
rails g cucumber:feature Requeriment client:string realization:date hour:string shipping_company:string booking:string destiny:string rtype:string
Then my feature is like this
Scenario: Delete requeriment
Given the following requeriments:
|client|realization|hour|shipping_company|booking|destiny|rtype|
|client 1|20/01/2011|08:30|shipping_company 1|booking 1|destiny 1|rtype 1|
|client 2|20/01/2011|08:30|shipping_company 2|booking 2|destiny 2|rtype 2|
|client 3|20/01/2011|08:30|shipping_company 3|booking 3|destiny 3|rtype 3|
|client 4|20/01/2011|08:30|shipping_company 4|booking 4|destiny 4|rtype 4|
When I delete the 3rd requeriment
Then I should see "La orden de servicio fue eliminada exitosamente"
And I should see the following requeriments:
|Client|Realization|Hour|Shipping company|Booking|Destiny|Rtype|
|client 1|20/01/2011|08:30|shipping_company 1|booking 1|destiny 1|rtype 1|
|client 2|20/01/2011|08:30|shipping_company 2|booking 2|destiny 2|rtype 2|
|client 4|20/01/2011|08:30|shipping_company 4|booking 4|destiny 4|rtype 4|
When I run it, I get this error message
Using the default profile...
....................F--
(::) failed steps (::)
undefined method `type' for #<Requeriment:0x00000102796938> (ActionView::Template::Error)
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activemodel-3.0.3/lib/active_model/attribute_methods.rb:364:in `method_missing'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/attribute_methods.rb:46:in `method_missing'
./app/views/requeriments/show.html.erb:10:in `_app_views_requeriments_show_html_erb__801476454977741902_2168053700_3071000245049315254'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_view/template.rb:135:in `block in render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `block in instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_view/template.rb:127:in `render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_view/render/rendering.rb:59:in `block in _render_template'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `block in instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_view/render/rendering.rb:56:in `_render_template'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_view/render/rendering.rb:26:in `render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/rendering.rb:114:in `_render_template'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/rendering.rb:108:in `render_to_body'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/renderers.rb:47:in `render_to_body'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/compatibility.rb:55:in `render_to_body'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/rendering.rb:101:in `render_to_string'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/rendering.rb:92:in `render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/rendering.rb:17:in `render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/Users/forellana/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/benchmark.rb:309:in `realtime'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/instrumentation.rb:78:in `cleanup_view_runtime'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/railties/controller_runtime.rb:15:in `cleanup_view_runtime'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/instrumentation.rb:39:in `render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/implicit_render.rb:5:in `send_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/base.rb:151:in `process_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/rendering.rb:11:in `process_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:435:in `_run__575588255767707561__process_action__2014970349567018671__callbacks'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:409:in `_run_process_action_callbacks'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:93:in `run_callbacks'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/callbacks.rb:17:in `process_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `block in instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `instrument'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/rescue.rb:17:in `process_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/cucumber-rails-0.3.2/lib/cucumber/rails/action_controller.rb:13:in `process_action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/base.rb:120:in `process'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/abstract_controller/rendering.rb:40:in `process'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal.rb:138:in `dispatch'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_controller/metal.rb:178:in `block in action'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/routing/route_set.rb:62:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/routing/route_set.rb:62:in `dispatch'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/routing/route_set.rb:27:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-mount-0.6.13/lib/rack/mount/route_set.rb:148:in `block in call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:93:in `block in recognize'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:103:in `optimized_each'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:92:in `recognize'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-mount-0.6.13/lib/rack/mount/route_set.rb:139:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/routing/route_set.rb:492:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/head.rb:14:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/methodoverride.rb:24:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/flash.rb:182:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/cookies.rb:295:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/query_cache.rb:32:in `block in call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/query_cache.rb:12:in `cache'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/query_cache.rb:31:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:353:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/callbacks.rb:46:in `block in call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/callbacks.rb:415:in `_run_call_callbacks'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/callbacks.rb:44:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/sendfile.rb:107:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/rack/logger.rb:13:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/runtime.rb:17:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/lock.rb:11:in `block in call'
<internal:prelude>:10:in `synchronize'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/lock.rb:11:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_dispatch/middleware/static.rb:30:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/application.rb:168:in `call'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-test-0.5.7/lib/rack/mock_session.rb:30:in `request'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-test-0.5.7/lib/rack/test.rb:209:in `process_request'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/rack-test-0.5.7/lib/rack/test.rb:57:in `get'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/webrat-0.7.3/lib/webrat/core/session.rb:280:in `process_request'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/webrat-0.7.3/lib/webrat/core/session.rb:119:in `request_page'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/webrat-0.7.3/lib/webrat/core/elements/link.rb:20:in `click'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/webrat-0.7.3/lib/webrat/core/scope.rb:276:in `click_link'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/webrat-0.7.3/lib/webrat/core/methods.rb:7:in `click_link'
./features/step_definitions/requeriment_steps.rb:8:in `block (2 levels) in <top (required)>'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/webrat-0.7.3/lib/webrat/core/session.rb:206:in `within'
/Users/forellana/.rvm/gems/ruby-1.9.2-p0/gems/webrat-0.7.3/lib/webrat/core/methods.rb:7:in `within'
./features/step_definitions/requeriment_steps.rb:7:in `/^I delete the (\d+)(?:st|nd|rd|th) requeriment$/'
features/manage_requeriments.feature:34:in `When I delete the 3rd requeriment'
Failing Scenarios:
cucumber features/manage_requeriments.feature:27 # Scenario: Delete requeriment
2 scenarios (1 failed, 1 passed)
23 steps (1 failed, 2 skipped, 20 passed)
0m1.263s
But I don't have defined any type method, I don't know why webrat is triying to call it
my step definition is here
When /^I delete the (\d+)(?:st|nd|rd|th) requeriment$/ do |pos|
visit requeriments_path
within("table tr:nth-child(#{pos.to_i+1})") do
click_link "Destroy"
end
end
Can anyone help me?
./app/views/requeriments/show.html.erb line 10 is where the error is. Do you have single-table inheritance? That's what this smells like.