# User Profiles Not Working in Production

**URL:** <https://www.ruby-forum.com/t/user-profiles-not-working-in-production/158031>\
**Category:** Rails\
**Created:** [January 18, 2009, 6:01am UTC](https://www.ruby-forum.com/t/user-profiles-not-working-in-production/158031 "2009-01-18T06:01:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leximo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/839c29/32.png) [@Leximo](https://www.ruby-forum.com/u/Leximo)\
**Post date:** [January 18, 2009, 6:01am UTC](https://www.ruby-forum.com/t/user-profiles-not-working-in-production/158031/1 "2009-01-18T06:01:11Z")

</div>

I have an app that lets users have profiles. Everything works fine in  
development, but its not working in production.

When you navigate to a user profile, an error occurs. For example  
“[http://leximo.org/users/Druwerd](http://leximo.org/users/Druwerd)”

just brings up an error.

Here are the log files for development and production.

Development:

Processing UsersController#show (for 127.0.0.1 at 2009-01-17 23:51:35)  
[GET]  
Parameters: {“action”=\>“show”, “id”=\>“baller”,  
“controller”=\>“users”}  
SQL (0.3ms) SET SQL\_AUTO\_IS\_NULL=0  
User Columns (2.3ms) SHOW FIELDS FROM `users`  
User Load (0.4ms) SELECT \* FROM `users` WHERE (`users`.`id` = 1)  
User Load (0.4ms) SELECT \* FROM `users` WHERE (`users`.`login` =  
‘baller’) LIMIT 1  
Word Load (0.3ms) SELECT \* FROM `words` WHERE (`words`.user\_id =  
3) ORDER BY words.id DESC LIMIT 0, 10  
Rendering template within layouts/application  
Rendering users/show  
[paperclip] Paperclip attachment photo on User initialized.  
Rendered layouts/\_profile (1.3ms)  
Word Columns (2.2ms) SHOW FIELDS FROM `words`  
Tag Load (0.3ms) SELECT `tags`.\* FROM `tags` INNER JOIN taggings  
ON tags.id = taggings.tag\_id WHERE ((`taggings`.taggable\_type =  
‘Word’) AND (`taggings`.taggable\_id = 9223))  
Rendered tags/\_tag (1.0ms)  
[paperclip] Paperclip attachment photo on Word initialized.  
Rendered users/\_word (66.8ms)  
Tag Load (0.3ms) SELECT `tags`.\* FROM `tags` INNER JOIN taggings  
ON tags.id = taggings.tag\_id WHERE ((`taggings`.taggable\_type =  
‘Word’) AND (`taggings`.taggable\_id = 9220))  
Rendered tags/\_tag (0.9ms)  
[paperclip] Paperclip attachment photo on Word initialized.  
Rendered users/\_word (7.7ms)  
Role Columns (1.4ms) SHOW FIELDS FROM `roles`  
Role Load (0.2ms) SELECT `roles`.\* FROM `roles` INNER JOIN  
`roles_users` ON `roles`.id = `roles_users`.role\_id WHERE  
(`roles`.`name` = ‘administrator’) AND (`roles_users`.user\_id = 1 )  
LIMIT 1  
Completed in 195ms (View: 170, DB: 4) | 200 OK [[http://localhost/users/](http://localhost/users/)  
baller]

Production Logs:  
Processing UsersController#show (for 68.55.245.214 at 2009-01-17  
23:48:53) [GET]  
Parameters: {“action”=\>“show”, “id”=\>“DarienJay100”,  
“controller”=\>“users”}  
Rendering template within layouts/application  
Rendering users/show

ActionView::TemplateError (undefined method `name?’ for #\<User:  
0xb6dc6430\>) on line #9 of app/views/layouts/\_profile.html.erb:  
6: /_]]\>_/  
7:   
8:  
9: \<% if @user.name? %\>

 \<%= @user.name %\> \</  
div\>   
 \<% end %\>  
10:  
11: ![]()  
12: 

```
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/

```

attribute\_methods.rb:255:in `method\_missing’

For some reason it gives me an ActionView:TemplateError in production  
but not in development.

I could use some help.
