ruby

Using RVM on Ubuntu 10.10

I wanted to use RVM for some testing with Ubuntu 10.10 last night.  Not one set of instructions I found around the web would work.  At the end of the day it was actually something rather simple; a path issue.

As the documentation clearly points out, you need to make a couple of modifications to your .bashrc script for things to work properly.

Here is what all the instructions say to past at the end:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session.

 

Here is what you really have to paste at the end:

[[ -s "$HOME/.rvm/src/rvm/scripts/rvm" ]] && . "$HOME/.rvm/src/rvm/scripts/rvm"

                             ^^^^^                                                     ^^^^^

Notice the path differences.  I have no idea why this is the case but it is.  I had the same issue on previous Ubuntu version as well though.  Well, this cost me a little bit of time but once I made that change along with the other documented changes everything has been just peachy.

 

root@mavrvm:~# rvm --default 1.8.7
root@mavrvm:~# ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
root@mavrvm:~# rvm --default 1.9.2
root@mavrvm:~# ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
root@mavrvm:~# 

root@mavrvm:~# rvm --default 1.8.7root@mavrvm:~# ruby -vruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]root@mavrvm:~# rvm --default 1.9.2root@mavrvm:~# ruby -vruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]root@mavrvm:~# 

 

ZeroMQ Musings and Server Build

zeromq

I just read an excellent writeup about ZeroMQ (ØMQ/ZMQ) yesterday on igvita.com.  This software appears to have been around a while but I hadn't seen it before.  It's really quite impressive.  So, I found myself quite curious to play around with it a bit this weekend.  So, I built a little rig that would let me do that based on Ubuntu 10.04 LTE.

I wanted to use the ruby bindings for my playing around and ruby 1.9.2p0.  I quickly found that most of the easy to find examples out there are in C or Python.  But, there is still some good stuff.  I'll add some of things I found as links at the bottom of this post. 

The server build instructions  here in case anyone else was interested.  The following steps will yield you a basic build with which you may test ZMQ w/ by writing ruby code.

If anyone has thoughts, ideas or improvements on this setup by all means please do let me know!  Comments have been off for a while on my blog but I'll be turning them back on after this post.

Server Build - Ruby 1.9.2p0 + ZMQ + Ruby Bindings

While playing around a bit this weekend with zeroMQ and wanting to mess w/ the ruby bindings I found I needed to build a server.  It wasn’t difficult but these are the steps which might help you get going quickly on the rackspace cloud.

Provision Your Server

I grabbed mine from the Rackspace cloud.  Your milage may vary but I know that a RS 10.04 is a well build no frills ubuntu server.  I really like using their templates as the basis for my builds.  Once you have your server up and you are logged in:

You are now all set with a ruby 1.9.2p0 and zeroMQ enabled server on Ubuntu 10.04 in the Rackspace cloud.  If this was helpful then let me know what you do with it as this is a very exciting combination.

Note:  This will work well with any Ubunutu 10.04 server. It doesn’t  have to only be a Rackspace Cloud Server.

For next steps take a look at the basic zeroMQ example published by Will’s Web Miscellany.
Of other notable interest is the Mongrel2 project which incorporates ZMQ.  The mongrel2 manual is very good reading as well.
Other helpful Links I found have been tagged on my Delicious acct here.  I'll be adding more as well as I find them.