Guest User

Untitled

a guest
May 26th, 2018
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. ## lib/foreign_profiles_profiler.rb
  2. # from cat
  3. 1
  4. 2 user = User.find_by_email("tester@example.com")
  5. 3 post session_path, :email => "tester@example.com", :password => "secret"
  6. 4 puts "user: #{user.inspect}."
  7. 5 puts "user id: #{user.id.inspect}."
  8. 6
  9. 7 get user_people_path(user)
  10. 8
  11.  
  12.  
  13. ## console:
  14.  
  15. [dfr@beta trunk]$ ./script/performance/request -n 1 lib/foreign_profiles_profiler.rb
  16. Warming up once
  17. user: #<User id: 1, name: "", salt: "86cb8af1fa40d6d4062c11c55add8e0f79afd132", created_at: "2008-11-01 18:18:09", updated_at: "2008-11-06 11:58:14", email: "tester@example.com", remember_token: nil, remember_token_expires_at: nil, crypted_password: "168a1f24b8d7cb14f14fabf7cbb7a1f3d48ee07c">.
  18. lib/foreign_profiles_profiler.rb:19:in `run': undefined method `id' for #<User:0xb76d1368> (NoMethodError)
  19. from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request_profiler.rb:116:in `warmup'
  20. from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime'
  21. from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request_profiler.rb:116:in `warmup'
  22. from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request_profiler.rb:91:in `run'
  23. from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request_profiler.rb:83:in `run'
  24. from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/commands/performance/request.rb:6
  25. from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
  26. from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
  27. from ./script/performance/request:3
Add Comment
Please, Sign In to add comment