Ruby on the Raspberry Pi

Any and all knowledge for Ruby on the Raspberry Pi here.

I’ve built an image you can use with Ruby 2.2.2 on Raspbian. Ruby on the Raspberry Pi (free distro image) (blog post). Feel free to ask me any questions on installation. I did not use RVM or rbenv. I replaced the existing Ruby 1.9.3 on the system.

Again: Any and all knowledge for Ruby on the Raspberry Pi here.

3 Likes

Quick Ruby install summary. You will need atleast 400MB free. 600MB recommended. And it will take a day to compile on a first generation Raspberry Pi.

Download Ruby 2.2.2

gunzip ruby-2.2.2.tar.gz
tar -xf ruby-2.2.2.tar
cd ruby-2.2.0
sudo apt-get update
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev openssl libreadline6 zlib1g libxslt-dev libc6-dev ncurses-dev automake libtool
./configure --disable-install-rdoc
sudo make && sudo make install

This should get gdbm to compile into Ruby (which my release currently doesn’t have). Does anyone even use gdbm?

After this I merely removed the Ruby 1.9 directories and changed all symbolic links and files to point to the current Ruby 2.2.2

Change the directory ownership for the following directories for gem installations:

sudo chown pi.pi /usr/local/bin
sudo chown -R pi.pi /usr/local/lib/ruby/gems

Update ruby gems:

gem update --system
2 Likes

Nice one Dan :+1:

I haven’t looked to much into the Pi - sortof got put off in how they seem to push python so much. I felt Ruby would have been a much better fit, particularly as they marketed it as getting more people into tech/programming - Ruby is just so much more accessible imo.

1 Like

sorry Daniel, I can’t really contribute. The Pi is still at the bottom of my to-learn list :frowning:

You can find them at various prices.

Raspberry Pi:

A ) $18
B ) $25
A+) $20
B+) $30
2 ) $35 ~ $40

These aren’t guaranteed pricing. Just wanted you to know the latest model isn’t the only affordable option.

1 Like

The Raspberry Pi image I did this for is Raspbian. It’s a flavor of Debian/Ubuntu. So you can likely install ruby with the same instructions above.

1 Like

You might like this @danielpclark - set up your own VPN on a Pi!

Full details and step by step here:

1 Like

That reminds me. I need to try out the new version of ngrok and make sure I can access my home PC remotely before I head out to NY for a week.

1 Like

Working on a GATT web gateway for BLE devices that can run on a PI. Pretty cool stuff. Though we’re writing it in javascript and node, because BLE libraries for Ruby are hard to find, and we have some tight dates.

2 Likes

I’ve written a new blog post today on Playing HD Youtube from the Raspberry Pi Command Line. I’ve also written an I’m-Feeling-Lucky Youtube video playing script in Ruby which I’ve posted in the blog post. Turns out my gem YtUtil, (install with gem install yt_util), is a must have! Didn’t realize it until I saw Youtube’s v2 API is no more.

2 Likes

Price Cut! Raspberry Pi

B+) $25

https://www.raspberrypi.org/blog/price-cut-raspberry-pi-model-b-now-only-25/

Official Raspberry Pi 7 inch Touchscreen Display is here

$60

2 Likes

WANT!!!

Maybe 2 or 3 :slight_smile:

1 Like

New Respberry Pi Zero is a computer available for only $5!!! Raspberry Pi Blog - News, Announcements, and Ideas

2 Likes

Made in Wales too :003: