# Template error when deploying to host with frozen gems

**URL:** <https://www.ruby-forum.com/t/template-error-when-deploying-to-host-with-frozen-gems/117205>\
**Category:** Rails\
**Created:** [October 14, 2007, 7:35pm UTC](https://www.ruby-forum.com/t/template-error-when-deploying-to-host-with-frozen-gems/117205 "2007-10-14T19:35:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbibby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/74df32/32.png) [@rbibby](https://www.ruby-forum.com/u/rbibby)\
**Post date:** [October 14, 2007, 7:35pm UTC](https://www.ruby-forum.com/t/template-error-when-deploying-to-host-with-frozen-gems/117205/1 "2007-10-14T19:35:03Z")

</div>

Hi,

I’m having some issues with deploying my app to my host server  
(Dimension Servers). I froze the gems (Instant Rails 1.2.3) on my  
local server and have the app running flawlessly boh on my machine and  
on a few other development machines. After deploying to the host, I  
get the following error on one of my views. Note: I’m using  
attachment\_fu, which I don’t imagine could have anything to do with  
this…

Any help would be much appreciated!

ActionView::TemplateError (Expected /home/yourhome/public\_html/beta/  
current/config/…/app/models/product\_image.rb to define ProductImage)  
on line #2 of app/views/products/show.rhtml:

products/show.rhtml:  
1:

## \<%= @product.name %\>
  
2: 
\<%= product\_image\_url(@product) %\>

Helper:  
def product\_image\_url§  
# Generate URL for product images  
return p.product\_image.nil? ? image\_tag("/noimage.jpg") :  
image\_tag(p.product\_image.public\_filename)  
end

product\_image.rb model:  
class ProductImage \< ActiveRecord::Base  
has\_one :product  
has\_attachment :content\_type =\> :image,  
:storage =\> :file\_system,  
:resize\_to =\> ‘320x200\>’

validates\_as\_attachment  
end
