# Download problem!

**URL:** <https://www.ruby-forum.com/t/download-problem/154206>\
**Category:** Rails\
**Created:** [November 26, 2008, 12:50pm UTC](https://www.ruby-forum.com/t/download-problem/154206 "2008-11-26T12:50:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![smartee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e5b9ba/32.png) [@smartee](https://www.ruby-forum.com/u/smartee)\
**Post date:** [November 26, 2008, 12:50pm UTC](https://www.ruby-forum.com/t/download-problem/154206/1 "2008-11-26T12:50:52Z")

</div>

friends,

am using send\_file function

controller

def download  
@event = Event.find(:first, :conditions =\> [‘id = ?’,params[:id]])  
#@path=@event.file  
@path=params[:file\_path]  
send\_file("#{@path}",:type =\> ‘all’)  
end

view file

\<% temp\_path=@event.file %\>  
Download

I got this error…

Cannot read file event11991.gif

Thanks.

---

<div class="post-metadata">

**Author:** ![smartee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e5b9ba/32.png) [@smartee](https://www.ruby-forum.com/u/smartee)\
**Post date:** [November 26, 2008, 12:58pm UTC](https://www.ruby-forum.com/t/download-problem/154206/2 "2008-11-26T12:58:00Z")

</div>

works fine

---

<div class="post-metadata">

**Author:** ![smartee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e5b9ba/32.png) [@smartee](https://www.ruby-forum.com/u/smartee)\
**Post date:** [November 26, 2008, 1:23pm UTC](https://www.ruby-forum.com/t/download-problem/154206/3 "2008-11-26T13:23:08Z")

</div>

## You do not have read permissions on that file, or the file does not exist.

Ryan B.  
Freelancer

> **[frozenplague.net](http://frozenplague.net)**
>
> This domain may be for sale!
