# RE: Oracle and Rails seems really slow.... In development

**URL:** <https://www.ruby-forum.com/t/re-oracle-and-rails-seems-really-slow-in-development/95172>\
**Category:** Rails\
**Created:** [January 13, 2006, 10:51pm UTC](https://www.ruby-forum.com/t/re-oracle-and-rails-seems-really-slow-in-development/95172 "2006-01-13T22:51:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HoganS\_Brian\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de0a6/32.png) [@HoganS\_Brian\_P](https://www.ruby-forum.com/u/HoganS_Brian_P)\
**Post date:** [January 13, 2006, 10:51pm UTC](https://www.ruby-forum.com/t/re-oracle-and-rails-seems-really-slow-in-development/95172/1 "2006-01-13T22:51:58Z")

</div>

No patch yet because I just don’t have the time to make patches (never  
learned how to do the diff stuff) but I did contact the current  
maintainer and did hear back from him a couple of days ago so we’ll see  
what happens next. Right now I just made a plugin to patch it for my  
apps.

I’ll gladly post the plugin as a zip on my server if anyone cares.

---

<div class="post-metadata">

**Author:** ![HoganS\_Brian\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de0a6/32.png) [@HoganS\_Brian\_P](https://www.ruby-forum.com/u/HoganS_Brian_P)\
**Post date:** [January 14, 2006, 1:23am UTC](https://www.ruby-forum.com/t/re-oracle-and-rails-seems-really-slow-in-development/95172/2 "2006-01-14T01:23:14Z")

</div>

On Jan 13, 2006, at 2:49 PM, Hogan, Brian P. wrote:

> No patch yet because I just don’t have the time to make patches  
> (never learned how to do the diff stuff) but I did contact the  
> current maintainer and did hear back from him a couple of days ago  
> so we’ll see what happens next. Right now I just made a plugin to  
> patch it for my apps.
> 
> I’ll gladly post the plugin as a zip on my server if anyone cares.

We care! We care!

---

<div class="post-metadata">

**Author:** ![HoganS\_Brian\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de0a6/32.png) [@HoganS\_Brian\_P](https://www.ruby-forum.com/u/HoganS_Brian_P)\
**Post date:** [January 14, 2006, 2:41am UTC](https://www.ruby-forum.com/t/re-oracle-and-rails-seems-really-slow-in-development/95172/3 "2006-01-14T02:41:37Z")

</div>

Hi,

I’m uploading a raw image into a blob column and noticed that unless  
I overwrote the model attribute writer that Rails would try to load a  
ruby object for the image instead of just the raw data. So in the  
model I did this:

```
 def picture=(picture_field)
     write_attribute(:picture, picture_field.read)
 end

```

and things work fine (though I don’t really know what I’m doing) …  
except if the user fails to select an image to upload, in which cases  
I get an error:

```
undefined method "read" for string ""

```

Any ideas for avoiding this error message in these cases? It seems  
like some kind of conditional wrapped around the write\_attribute  
command should work, probably some IO method that will test for the  
ability to read a stream (am I working with a stream here?) … or  
maybe there’s a better way to upload a raw image.

Thanks,  
russ

---

<div class="post-metadata">

**Author:** ![HoganS\_Brian\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de0a6/32.png) [@HoganS\_Brian\_P](https://www.ruby-forum.com/u/HoganS_Brian_P)\
**Post date:** [January 23, 2006, 7:08am UTC](https://www.ruby-forum.com/t/re-oracle-and-rails-seems-really-slow-in-development/95172/4 "2006-01-23T07:08:20Z")

</div>

Hogan, Brian P. wrote:

> No patch yet because I just don’t have the time to make patches (never  
> learned how to do the diff stuff) but I did contact the current  
> maintainer and did hear back from him a couple of days ago so we’ll see  
> what happens next. Right now I just made a plugin to patch it for my apps.

It’s on my list, should be able to get a patch submitted for this by the  
end of the week. Note that I’m still concerned about the revised query.  
But I’ve been sent a few different options, and one of them will work  
out.
