Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## lib/foreign_profiles_profiler.rb
- # from cat
- 1
- 2 user = User.find_by_email("tester@example.com")
- 3 post session_path, :email => "tester@example.com", :password => "secret"
- 4 puts "user: #{user.inspect}."
- 5 puts "user id: #{user.id.inspect}."
- 6
- 7 get user_people_path(user)
- 8
- ## console:
- [dfr@beta trunk]$ ./script/performance/request -n 1 lib/foreign_profiles_profiler.rb
- Warming up once
- 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">.
- lib/foreign_profiles_profiler.rb:19:in `run': undefined method `id' for #<User:0xb76d1368> (NoMethodError)
- from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request_profiler.rb:116:in `warmup'
- from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime'
- from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request_profiler.rb:116:in `warmup'
- from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request_profiler.rb:91:in `run'
- from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request_profiler.rb:83:in `run'
- from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/commands/performance/request.rb:6
- from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
- from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
- from ./script/performance/request:3
Add Comment
Please, Sign In to add comment