Read posts about ruby

January 26

Installing Ruby on Rails on Mac OS 10.5 or patching Dan Benjamin’s guide (Put together quickly (Haligan)) by michaelb

Update: Dan has posted his updated guide for installing Ruby on Rails on Leopard.

I don’t think there are too many people who hasn’t come across either of Dan Benjamin’s guides when looking to install Ruby on Rails on a Mac. They are simple, to the point and you could basically copy and paste to get Ruby, Rails, MySQL and depending on which guide either Mongrel or LightTPD installed, but since the release of Leopard the instructions if unaltered would fail when installing Readline, Ruby and Subversion. Dan has mentioned that he will be providing an update to the guide for Leopard users, but with a new baby and job it might (and justifiably so) be a bit before he has the chance to finish them. What I’m going to cover are the additional steps I added to Dan’s guide to get everything up and running for me. First thing to do is read his guide making sure to note the following sections: What’s needed (except we are using OS 10.5 and Xcode 3.0), bash, Quick Warning, sudo and paths. To get the parts of Dan’s guide that would fail to work we will be applying some patches to Readline, Ruby and Subversion. If you are uncomfortable with this then I would suggest that you wait for his updated guide. And if you haven’t already tried installing the unaltered version on Leopard, consider running through each step to see the error before and after the patches. And remember just as he points out himself these instructions are completely use at your own risk and I do not take responsibility for anything resulting from following them.

Before you begin

Make sure to follow the steps from his guide to install Xcode, update your path and create the directory at /usr/local/src if you have not already done so.

Ruby

If you have tried his guide while using Leopard you probably got stuck at the first step when trying to compile readline. You will need to apply a patch from the developers, because the unpatched version of readline checks for the version of the operating system but does not include darwin9 (Leopard) in it’s list. We will be applying a patch to the file support/shobj-conf located in the readline-5.2 directory in /usr/local/src/ and then we can compile it without getting an error. You should also notice that we are installing the latest stable version.

curl -O ftp://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz
tar xzvf readline-5.2.tar.gz
cd readline-5.2
curl -O http://ftp.gnu.org/gnu/readline/readline-5.2-patches/readline52-012
patch -p0 < readline52-012
./configure --prefix=/usr/local
make
sudo make install
cd ..

And now on to installing Ruby. While looking into why Ruby would segfault during the install I came across Laurent Sansonetti’s explanation and the set of patches that are applied to Ruby by Apple for the version that Mac OS ships with.

curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p111.tar.gz
tar xzvf ruby-1.8.6-p111.tar.gz
cd ruby-1.8.6-p111
curl http://chopine.be/lrz/ruby-osx-patches/dot-darwin.diff | patch -p0
curl http://chopine.be/lrz/ruby-osx-patches/etc-irbrc.diff | patch -p0
curl http://chopine.be/lrz/ruby-osx-patches/ignore-gsetcontext.diff | patch -p0
curl http://chopine.be/lrz/ruby-osx-patches/md5_sha1_commoncrypto.diff | patch -p0
curl http://chopine.be/lrz/ruby-osx-patches/use-dyld.diff | patch -p0
curl http://chopine.be/lrz/ruby-osx-patches/use-setreugid.diff | patch -p0
curl http://chopine.be/lrz/ruby-osx-patches/words-bigendian-from-arch.diff | patch -p0
./configure --prefix=/usr/local --enable-pthread --with-readline-dir=/usr/local --enable-shared
make
sudo make install
sudo make install-doc
cd ..


RubyGems

Only change here is using the current version.

curl -O http://files.rubyforge.mmmultiworks.com/rubygems/rubygems-1.0.1.tgz
tar xzvf rubygems-1.0.1.tgz
cd rubygems-1.0.1
sudo /usr/local/bin/ruby setup.rb
cd ..

Ruby on Rails

sudo gem install rails --include-dependencies

Remember one change in Rails 2.0.2 is that SQLite3 is now the default database. When you followed Dan’s instructions and changed the path you lost the SQLite3 bindings for Rails that Leopard ships with so we need to add them back.

gem install sqlite3-ruby

Mongrel

Just like RubyGems no changes here except it will be grabbing the latest version.

sudo gem install mongrel --include-dependencies

Subversion

This would be the next step that you should see an error while following the unaltered guide. I came across a patch from Brian D. Wells that allowed for me to complete the install.

curl -O http://subversion.tigris.org/downloads/subversion-1.4.6.tar.gz
curl -O http://subversion.tigris.org/downloads/subversion-deps-1.4.6.tar.gz
tar xzvf subversion-1.4.6.tar.gz
tar xzvf subversion-deps-1.4.6.tar.gz
cd subversion-1.4.6
curl -O http://homepage.mac.com/brianwells/.Public/apr_darwin_smb_patch
patch -d apr -p0 <apr_darwin_smb_patch
./configure --prefix=/usr/local --with-openssl --with-ssl --with-zlib
Edit the file /usr/local/src/subversion-1.4.6/apr/include/apr.h
Changing the line #define APR_HAS_SENDFILE 1 to #define APR_HAS_SENDFILE 0
make
sudo make install
cd ..

Capistrano

sudo gem install capistrano --include-dependencies
sudo gem install termios --include-dependencies

MySQL

And finally we’re ready to follow Dan’s instructions to install MySQL.

Alternatives

A big thanks to Dan for creating each of these guides and keeping them updated over the years. I hope you find these additions useful and remember usually there are a few different alternatives to doing something.

Posted in: apple , ruby
January 18

RubyForge: Starling: Project Info [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

RubyForge: Starling: Project Info

Starling is a light-weight persistent queue server that speaks the MemCache protocol. It was built to drive Twitter's backend, and is in production across Twitter's cluster.

Saved By: Michael Biven | View Details | Give Thanks

Tags: , , ,

Posted in: memcache , queue , ruby , twitter
August 7
March 23

Agile RSS Aggregator in Ruby - igvita.com [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

Agile RSS Aggregator in Ruby - igvita.com

A liberal RSS aggregator in 26 lines of Ruby - may be hard to believe, but it’s true. On top of that, it is also capable of serving static files, has a templating engine, and accepts an arbitrary number and types of RSS feeds - talk about squeezing functionality out of every line!

Tags: ,

Posted in: rss , ruby

Agile RSS Aggregator in Ruby - igvita.com [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

Agile RSS Aggregator in Ruby - igvita.com

A liberal RSS aggregator in 26 lines of Ruby - may be hard to believe, but it’s true. On top of that, it is also capable of serving static files, has a templating engine, and accepts an arbitrary number and types of RSS feeds - talk about squeezing functionality out of every line!

Tags: ,

Posted in: rss , ruby
March 7

memcache-client version 1.3.0 has been released! [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

memcache-client version 1.3.0 has been released!

memcache-client version 1.3.0 has been released. * Apply patch #6507, add stats command. Submitted by Tyler Kovacs. * Apply patch #6509, parallel implementation of #get_multi. Submitted by Tyler Kovacs. * Validate keys. Disallow spaces in keys or keys that are too long. * Perform more validation of server responses. MemCache now reports errors if the socket was not in an expected state. (Please file bugs if you find some.) * Add #incr and #decr. * Add raw argument to #set and #get to retrieve #incr and #decr values. * Also put on MemCacheError when using Cache::get with block. * memcache.rb no longer sets $TESTING to a true value if it was previously defined. Bug #8213 by Matijs van Zuijlen.

Tags: , , ,

Posted in: gem , memcache-client , memcached , ruby
February 27

MacDevCenter.com -- Replacing AppleScript with Ruby [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

MacDevCenter.com -- Replacing AppleScript with Ruby

Matt Neuberg describes how to use rb-appscript to manage Apple events without Applescript. Learn the basics of rb-appscript usage, with example scripts, including a rewrite of the Ruby-AppleScript example from Matt's book, AppleScript: The Definitive...

Tags: , , ,

Posted in: applescript , mac , os x , ruby
February 19

Ruby/LDAP [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

Ruby/LDAP

Ruby/LDAP is an extension module for Ruby. It provides the interface to some common LDAP libraries (for example, OpenLDAP, UMich LDAP, Netscape SDK and Active Directory).

Tags: , , ,

Posted in: active directory , ldap , library , ruby
February 3

Use your Apple Remote from Ruby | RubyCocoa Resources [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

Use your Apple Remote from Ruby | RubyCocoa Resources

Use RubyCocoa to talk to your new Apple Remote.

Tags: , , ,

Posted in: apple remote , cocoa , objective-c , ruby
February 1

Delayed: KY Ruby Group’s February meeting (Put together quickly (Haligan)) by michaelb

Delayed one week.

Kentucky Ruby User’s Group Meeting
When: Thursday, February 8th, 7pm-9pm

Location: Completely Kentucky,
237 West Broadway, Frankfort, KY 40601
502-223-5240

And we have our first Ruby quiz picked out and a free copy of the new Rails Cookbook to give away.

Posted in: ruby , user group

Delayed: KY Ruby Group’s February meeting (Put together quickly (Haligan)) by michaelb

Delayed one week.

Kentucky Ruby User’s Group Meeting
When: Thursday, February 8th, 7pm-9pm

Location: Completely Kentucky,
237 West Broadway, Frankfort, KY 40601
502-223-5240

And we have our first Ruby quiz picked out and a free copy of the new Rails Cookbook to give away.

Posted in: ruby , user group

Delayed: KY Ruby Group’s February meeting (Put together quickly (Haligan)) by michaelb

Delayed one week.

Kentucky Ruby User’s Group Meeting
When: Thursday, February 8th, 7pm-9pm

Location: Completely Kentucky,
237 West Broadway, Frankfort, KY 40601
502-223-5240

And we have our first Ruby quiz picked out and a free copy of the new Rails Cookbook to give away.

Posted in: ruby , user group
January 30

Alex Payne | Growl + Twitter Improved [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

Alex Payne | Growl + Twitter Improved

Twitter + Growl. Looks like I wasn't the first... or second person with this idea. Uses John Nunemaker's twitter gem.

Tags: , ,

Posted in: growl , ruby , twitter

Alrond | The performance test of 6 leading frameworks [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

Alrond | The performance test of 6 leading frameworks

Performance testing 6 web frameworks. Django kicks some @$$.

Tags: , , , , ,

Posted in: django , framework , performance testing , rails , ruby , web
January 29

KY Ruby Group: February meeting (Put together quickly (Haligan)) by michaelb

Kentucky Ruby User’s Group Meeting

Time: Thursday, February 1st, 7pm-9pm

Location: Completely Kentucky,
237 West Broadway, Frankfort, KY 40601
502-223-5240

Agenda:
- Darren Day is going to give a short presentation on JRuby and hopes to have a full demo where he builds a tiny Swing app without writing a single line
of Java code. Hooray!

- Leslie is going to have a Ruby quiz/task (ala rubyquiz)
for us to kick off what will hopefully become a regular thing for the
KyRUG.

- We have a copy of the new Rails Cookbook (including Rails 1.2) to give away!

- Anything else? Maybe we’ll finish the screencast we started last
time? We have plenty of time for short demos of what you’re doing in
Ruby.

Posted in: ruby , user group

KY Ruby Group: February meeting (Put together quickly (Haligan)) by michaelb

Kentucky Ruby User’s Group Meeting

Time: Thursday, February 1st, 7pm-9pm

Location: Completely Kentucky,
237 West Broadway, Frankfort, KY 40601
502-223-5240

Agenda:
- Darren Day is going to give a short presentation on JRuby and hopes to have a full demo where he builds a tiny Swing app without writing a single line
of Java code. Hooray!

- Leslie is going to have a Ruby quiz/task (ala rubyquiz)
for us to kick off what will hopefully become a regular thing for the
KyRUG.

- We have a copy of the new Rails Cookbook (including Rails 1.2) to give away!

- Anything else? Maybe we’ll finish the screencast we started last
time? We have plenty of time for short demos of what you’re doing in
Ruby.

Posted in: ruby , user group

KY Ruby Group: February meeting (Put together quickly (Haligan)) by michaelb

Kentucky Ruby User’s Group Meeting

Time: Thursday, February 1st, 7pm-9pm

Location: Completely Kentucky,
237 West Broadway, Frankfort, KY 40601
502-223-5240

Agenda:
- Darren Day is going to give a short presentation on JRuby and hopes to have a full demo where he builds a tiny Swing app without writing a single line
of Java code. Hooray!

- Leslie is going to have a Ruby quiz/task (ala rubyquiz)
for us to kick off what will hopefully become a regular thing for the
KyRUG.

- We have a copy of the new Rails Cookbook (including Rails 1.2) to give away!

- Anything else? Maybe we’ll finish the screencast we started last
time? We have plenty of time for short demos of what you’re doing in
Ruby.

Posted in: ruby , user group
January 27

Tinder: Listening is just as important as speaking | opensoul.org [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

Tinder: Listening is just as important as speaking | opensoul.org

Tags: , , ,

Posted in: api , campfire , ruby , tinder

Tinder: Campfire API | opensoul.org [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

Tinder: Campfire API | opensoul.org

Tags: , , ,

Posted in: api , campfire , ruby , tinder

Updates to Marshmallow, the Campfire bot [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

Updates to Marshmallow, the Campfire bot

Tags: , , ,

Posted in: api , campfire , marshmallow , ruby
January 9

How has Ruby and Rails made me a better programmer: Apress/On Ruby Blogging Contest (Put together quickly (Haligan)) by michaelb

Instead of making me a better programmer, it has let me start to become one. Working as a system and network admin for some time I had always wanted to move over to the development side of things, but the time was never there for me. Several years ago I got my first look at Ruby and Rails after I used Instiki and later on Tracks to keep my notes organized on some items I was working on.

Keeping my interest for some time when I saw that there was going to be a Rails workshop not too far away I jumped at the chance. Jeff Casimir had created the “Workshop for Good” with Amy Hoy, Ezra Zygmuntowicz and himself teaching and all proceeds going to the school were he worked at as a fundraiser. This gave me the perfect chance to have time to work with Rails and have some great people to ask questions for when I got myself stuck or confused.

After that I was getting excited about programming, creating things and starting looking at ways I could turn my current position into the job I actually wanted. Employed at an engineering firm that does allot of GIS work I started looking at how using Rails with the available map APIs from both Google and Yahoo can create work more quickly than what our GIS techs would make using ArcGIS.

All of this has lead me down a path were I’m more comfortable taking greater risks with my career to do the things I want to do. Allowing me to leave my office bound position as an IT manager to work from home fulltime, have time to finish my degree, attend a few more classes / workshops and seek out the local Ruby group. This has lead me down a path were I work with some great people doings some really useful things with Ruby and Rails. I’m still mostly doing sys admin type work and I wouldn’t call myself a programmer yet, but I’m getting more chances and time to program.

If you think Ruby and Rails has made you a better programmer and want the chance to win check out Pat’s post.

Posted in: rails , ruby

How has Ruby and Rails made me a better programmer: Apress/On Ruby Blogging Contest (Put together quickly (Haligan)) by michaelb

Instead of making me a better programmer, it has let me start to become one. Working as a system and network admin for some time I had always wanted to move over to the development side of things, but the time was never there for me. Several years ago I got my first look at Ruby and Rails after I used Instiki and later on Tracks to keep my notes organized on some items I was working on.

Keeping my interest for some time when I saw that there was going to be a Rails workshop not too far away I jumped at the chance. Jeff Casimir had created the “Workshop for Good” with Amy Hoy, Ezra Zygmuntowicz and himself teaching and all proceeds going to the school were he worked at as a fundraiser. This gave me the perfect chance to have time to work with Rails and have some great people to ask questions for when I got myself stuck or confused.

After that I was getting excited about programming, creating things and starting looking at ways I could turn my current position into the job I actually wanted. Employed at an engineering firm that does allot of GIS work I started looking at how using Rails with the available map APIs from both Google and Yahoo can create work more quickly than what our GIS techs would make using ArcGIS.

All of this has lead me down a path were I’m more comfortable taking greater risks with my career to do the things I want to do. Allowing me to leave my office bound position as an IT manager to work from home fulltime, have time to finish my degree, attend a few more classes / workshops and seek out the local Ruby group. This has lead me down a path were I work with some great people doings some really useful things with Ruby and Rails. I’m still mostly doing sys admin type work and I wouldn’t call myself a programmer yet, but I’m getting more chances and time to program.

If you think Ruby and Rails has made you a better programmer and want the chance to win check out Pat’s post.

Posted in: rails , ruby
December 6

KY Ruby Group meeting this Thursday (Put together quickly (Haligan)) by MichaelB

This Thursday is the next KY Ruby user group meeting. A few quick presentations on Camping, hpricot, ZipCodeSearch, a run down on how to use IRC for those who might not be as familiar with it and an O’Reilly book giveaway will be given. Dec 7th, 8PM Farmers Bank Main Office 125 West Main Frankfort, KY 502-227-1600 Posted in: kyrug , rails , ruby

KY Ruby Group meeting this Thursday (Put together quickly (Haligan)) by michaelb

This Thursday is the next KY Ruby user group meeting. A few quick presentations on Camping, hpricot, ZipCodeSearch, a run down on how to use IRC for those who might not be as familiar with it and an O’Reilly book giveaway will be given.

Dec 7th, 8PM
Farmers Bank
Main Office
125 West Main
Frankfort, KY
502-227-1600

Posted in: kyrug , rails , ruby
December 1
November 29

KyRUG [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

Tags: , ,

Posted in: rails , ruby , user groups
November 15

The Rails Way: Tracks: Part 1 [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

Tags: , , ,

Posted in: rails , ruby , the rails way , tracks
November 14

Flexible Rails [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

Tags: , ,

Posted in: flex , rails , ruby

flexonrails.net [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

Tags: , ,

Posted in: flex , rails , ruby
November 13

RailsTips.org Building A Multi-Site Application [ma.gnolia] (Put together quickly (Haligan)) by MichaelBiven

Tags: , ,

Posted in: multi-site , rails , ruby