Sensible Open Source

Blog Status

  • 4 yrs 48 wks 5 days old
  • Updated: 11 Mar 2010
  • 455 entries
  • 174 comments
Total: 1,214,317
since: 5 Apr 2005

LinkBlogS

Creating Vidcasts

18 June 2007, Monday 7:05 P GMT-06
Tags:      

Man, Can't Microsoft Catch A Break?

16 March 2007, Friday 12:26 P GMT-06

Viacom, Google andYou Tube, Oh My!

16 March 2007, Friday 12:25 P GMT-06

Switch to digital TV to start in October

16 March 2007, Friday 7:46 A GMT-06

Is the Ice Ready? No, Its Still To Hot To Use...

16 March 2007, Friday 7:43 A GMT-06

MIT Entire Curriculum At disposal of e-learners

6 March 2007, Tuesday 11:52 A GMT-06

A cure for e-mail attention disorder?

2 March 2007, Friday 12:51 A GMT-06
Tags:  

Windows-on-Mac software gets virtualization update

1 March 2007, Thursday 5:08 A GMT-06

EnterpriseDB is/n't Open Source

1 March 2007, Thursday 3:37 A GMT-06

BitTorrent download portal debuts

27 February 2007, Tuesday 9:05 A GMT-06

$45b TXU buyout

27 February 2007, Tuesday 9:02 A GMT-06

iPhone Competitors Got The Touch

26 February 2007, Monday 3:43 A GMT-06
Tags:        

HTC - Smart Mobility

25 February 2007, Sunday 4:22 A GMT-06

Hard to find 1-800 numbers

23 February 2007, Friday 8:35 A GMT-06

Cuba Embraces Open-Source Software

21 February 2007, Wednesday 3:10 A GMT-06

Vista at the tipping point, Err Dipping Point?

11 February 2007, Sunday 11:11 A GMT-06
Tags:  

PostgreSQL Open Source And Persistence

3 February 2007, Saturday 10:32 P GMT-06

Blackboard Pledges No Patent Blocks

3 February 2007, Saturday 10:28 P GMT-06

UVU

5 January 2007, Friday 11:58 P GMT-06

Open-source IP PBX software appliance"

4 January 2007, Thursday 3:44 A GMT-06

Asterisk an under-appreciated Open Source Success Story

4 January 2007, Thursday 3:43 A GMT-06

Open Source AJAX Tooling

4 January 2007, Thursday 3:41 A GMT-06

Google MAIL API Secuirty Alert

1 January 2007, Monday 7:37 P GMT-06
Tags:    

United States Patent Application: 0060288329

26 December 2006, Tuesday 4:00 A GMT-06

LinkBlog Popular Tags

                                       







««Mar 2010»»
SMTWTFS
  12
3
456
789
10
111213
14151617181920
21222324252627
28293031

 

August 16, 2012

Time Left

2 years 5 months 4 days

                   

RSS Add-Me








Google Related Links

Ruby - OS X - And PostGresql

posted 13 August 2006, Sunday
We are in the midst of a full fledge project and the  immediacy in which we implement is the onlye sense of urgency consuming my life as of late.

However,  It makes sense, it's what is needed and what is desired.  After all, we're in this field, to well, a monetize. 

Afterall, we have to put the chicken in the pot, gas in the tank and keep the electric on in order to compute and do it all over again, well tomorrow.  Seems like a cyclic tube-life, no?

So let's start with the quick procedure to install RUBY ON RAILS in OSX.  I use POSTGRESQL and since MYSQL is the RUBY ON RAILS default of choice I will show the POSTGRESQL install.  If your interested in MYSQL You can follow the instructions below and ignore the POSTGRESQL and the MYSQL install should behave correctly.

Part One:
  1. If you have OSx 10.4 Ruby is installed.
  2. If your going to install and compile Ruby than it has issues that are addressed in this document
  3. Realize that things like this happen



Part Two:
  1. Let's start with the version to install:  I am using MAC OS 10.4.7
  2. Apple's "Developer Tools", Xcode needs to be update to ersion 2.0 or newer.  The default installation is will not suffice.
  3. If you use curl or fink you can skip this step.  If not you must install readline in order install readline through fink try these instructions.  Then issue the following command:
    1. sudo /sw/bin/fink install readline
  4. Curls method follows
    1. sudo curl -O ftp://ftp.gnu.org/gnu/readline/readline-5.1.tar.gz
      tar xzvf readline-5.1.tar.gz
      cd readline-5.1
      ./configure --prefix=/usr/local
      make
      sudo make install
      cd ..
  5. Ruby is installed on MAC OS X but it may not be the NEWEST version.  Let's check it at the terminal.
  • ruby -v
    ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]
As you can see the version is 1.8.2 so let's upgrade the ruby installation.
  • sudo curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.4.tar.gz
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 4211k  100 4211k    0     0   236k      0  0:00:17  0:00:17 --:--:--  293k
  • tar xzvf ruby-1.8.4.tar.gz 
  • Ruby Config/Installation 
    • cd ruby-1.8.4
    • ./configure --prefix=/usr/local --enable-pthread --with-readline-dir=/usr/local
    • make
    • sudo make install
    • sudo make install-doc
    • cd ..



Let's check what version ruby is at after the final installation:

First : Insure your path is set so /usr/local/bin comes first in your path.

export PATH="/usr/local/bin:/usr/local/sbin:$PATH" 
Then issue

$ ruby -v
ruby 1.8.4 (2005-12-24) [powerpc-darwin8.7.0]



Now we are ready for the gems installation

$ curl -O http://rubyforge.iasi.roedu.net/files/rubygems/rubygems-0.9.0.tgz
$ tar xzvf rubygems-0.9.0.tgz
$ cd rubygems-0.9.0
$ sudo /usr/local/bin/ruby setup.rb

$ cd ..
"Measure twice cut once"

Let's check the gem installation :

$ gem -v
0.9.0

Next we'll install rails:

$ sudo gem install rails --include-dependencies
There you have it... Quick, Clean and to the point.

Now, the tutorials out there are plentiful and many are written about the Ruby WebBrick server.  We are in the middle of using the Ruby-FCGI for FAST CGI. 

Once we have a solid production hardened version ill publish the steps to install this is just a quick attempt of documenting the initial installation.


This is the broken part!  Let's fix it!

Apple shipped Tiger with a couple of problems, in short the solution is below: [GOOD NEWS IS LEOPARD WILL SHIP WITH RAILS & This problem will vanish]

sudo gem install fixrbconfig; sudo fixrbconfig



The Postgresql is quite simple for MAC OS X the procedure follows:

  1. Install Postgresql the MAC OS X is extremly easy and is described here
  2. With the gem utility installaed above iseeu the following command
  • gem install postgres-pr
       This postgres-pr is the defacto-standard for the RUBY driver.  There is another but for now this is the quickest to market for our purposes.

       Ruby On Rails configuration in the tutorials will describe the configuration of the database via database.yaml (YAML = Yet Another Markup Langauge).

     REMEMBER THIS WHEN SETTING UP POSTGRES IN THE DATABASE YAML FILE "database.yaml".  The adapter to reference the postgresql NOT postgres-pr!!!

The proper reference is an excerpt for the development data base configuration:

  development:
  adapter: postgresql
  database: mydatabase
  username: postgres
  password:  44$44
  host: localhost

That's about it..  This should get you up and running in no time!!

tags:                

links: digg this    del.icio.us    technorati    reddit