# Problems with ruby 1.8.6 on uClinux

**URL:** <https://www.ruby-forum.com/t/problems-with-ruby-1-8-6-on-uclinux/162015>\
**Category:** Ruby\
**Created:** [March 4, 2009, 10:43pm UTC](https://www.ruby-forum.com/t/problems-with-ruby-1-8-6-on-uclinux/162015 "2009-03-04T22:43:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuri\_Klubakov](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/85f322/32.png) [@Yuri\_Klubakov](https://www.ruby-forum.com/u/Yuri_Klubakov)\
**Post date:** [March 4, 2009, 10:43pm UTC](https://www.ruby-forum.com/t/problems-with-ruby-1-8-6-on-uclinux/162015/1 "2009-03-04T22:43:02Z")

</div>

After watching David G.'s RubyConf2008 presentation “Ruby for  
Embedded Applications” (OpenEmbedded, ruby 1.8.5, Sinatra), I’ve  
decided to try to use Ruby for my application. Our board has Blackfin  
processor and we are using uClinux distribution. I was able to  
successfully build and install ruby-1.8.6-p287. I’ve applied Brian  
Candler’s patch ([http://redmine.ruby-lang.org/issues/show/720](http://redmine.ruby-lang.org/issues/show/720)). It’s  
almost working. I had to free a lot of RAM (30MB) as I was getting  
errors when ruby was trying to allocate memory. I was even able to  
serve a simple web application with WEBrick and Ramaze, but it would  
occasionally crash the Kernel. Now I have to make a decision if it’s  
worth to pursue it any further. I would appreciate if someone, who has  
experience with running Ruby on embedded systems (preferably with  
Blackfin processor), will share his experience to help me make a  
decision.

Thanks.

---

<div class="post-metadata">

**Author:** ![Yuri\_Klubakov](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/85f322/32.png) [@Yuri\_Klubakov](https://www.ruby-forum.com/u/Yuri_Klubakov)\
**Post date:** [March 5, 2009, 12:27pm UTC](https://www.ruby-forum.com/t/problems-with-ruby-1-8-6-on-uclinux/162015/2 "2009-03-05T12:27:20Z")

</div>

Yuri Klubakov wrote:

> I was even able to  
> serve a simple web application with WEBrick and Ramaze, but it would  
> occasionally crash the Kernel.

No userland application should be able to crash the kernel - not even  
one running as root. So if this is happening, then you have an  
underlying O/S problem which you need to resolve. You are lucky that  
Ruby provides you with a way to replicate it 🙂

Once that’s done, you can take a view on how well Ruby works on your  
platform.

FWIW, I have used ruby-1.8.6p36 very successfully on MIPS (Asus) and x86  
(Soekris) embedded hardware, both under OpenWrt. The Asus box had 32MB  
RAM, the Soekris 64MB. No crashes.

I see OpenWrt has moved its ruby package forward to 1.8.6p287, but I’ve  
not tried that. I am still suspicious of later changes made in the 1.8.6  
branch, and would suggest p114 as a safer choice.

---

<div class="post-metadata">

**Author:** ![Yuri\_Klubakov](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/85f322/32.png) [@Yuri\_Klubakov](https://www.ruby-forum.com/u/Yuri_Klubakov)\
**Post date:** [March 5, 2009, 9:05pm UTC](https://www.ruby-forum.com/t/problems-with-ruby-1-8-6-on-uclinux/162015/3 "2009-03-05T21:05:32Z")

</div>

On Thu, Mar 5, 2009 at 6:25 AM, Brian C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Yuri Klubakov wrote:
> 
> > I was even able to  
> > serve a simple web application with WEBrick and Ramaze, but it would  
> > occasionally crash the Kernel.
> 
> No userland application should be able to crash the kernel - not even  
> one running as root. So if this is happening, then you have an  
> underlying O/S problem which you need to resolve. You are lucky that  
> Ruby provides you with a way to replicate it 🙂

I know that it’s not supposed to happen. Blackfin processor does not  
have MMU (memory management unit). I’m not a linux expert, but may be  
without MMU kernel is not as protected as with it. In my tests I was  
running an application as root. I’ll try to run it under different  
account.

> Once that’s done, you can take a view on how well Ruby works on your  
> platform.
> 
> FWIW, I have used ruby-1.8.6p36 very successfully on MIPS (Asus) and x86  
> (Soekris) embedded hardware, both under OpenWrt. The Asus box had 32MB  
> RAM, the Soekris 64MB. No crashes.

Thanks for the encouraging information.

> I see OpenWrt has moved its ruby package forward to 1.8.6p287, but I’ve  
> not tried that. I am still suspicious of later changes made in the 1.8.6  
> branch, and would suggest p114 as a safer choice.

I had problems configuring ruby-1.8.6p287 for Blackfin processor. In  
the end, I’ve replaced config.sub with the one that comes with  
ruby-1.9.1, and everything went smoothly. It should not be the cause  
of my problems. Right? I’ll also try p114 as you’ve suggested.

---

<div class="post-metadata">

**Author:** ![Yuri\_Klubakov](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/85f322/32.png) [@Yuri\_Klubakov](https://www.ruby-forum.com/u/Yuri_Klubakov)\
**Post date:** [March 5, 2009, 10:13pm UTC](https://www.ruby-forum.com/t/problems-with-ruby-1-8-6-on-uclinux/162015/4 "2009-03-05T22:13:12Z")

</div>

Brian C. wrote:

> I see OpenWrt has moved its ruby package forward to 1.8.6p287, but I’ve  
> not tried that. I am still suspicious of later changes made in the 1.8.6  
> branch, and would suggest p114 as a safer choice.

We’ve been using ruby 1.8.6p114 on OpenWRT for about a year (not the  
package from OpenWRT, but a custom built one), and it works well for  
various networking tasks. Very stable, AFAICT. Didn’t try p287.

Building native extensions is difficult, though, at least it is in our  
cross-compile setup. I never did get native sqlite3-ruby to build, and  
ended up just opening a pipe to the sqlite executable.
