Showing posts with label Install. Show all posts
Showing posts with label Install. Show all posts

Friday, February 29, 2008

ExtJS & Rails - ExtJS scaffold generator installation script

What?
An automatic installation script for the ExtJS scaffold generator plugin (demo keynotes)to get you up and running.

Why?
Rails' scaffolding gets you up an running lightning fast. ExtJS is a wonderful javascript desktop library. Let's marry them

How?
Run the following script - it will

  • Create the rails application
  • Install the ExtJS scaffolding plugin
  • Download and install ExtJS for your application
  • Generate two sample models - posts and purchases
  • Setup the database
  • Create links to the sample models on the application landing page
  • Run the server
Then all you have to do is point your browser to http://localhost:3000, assuming the server is running on your computer.

Have fun!

# Create the app
rails ext_scaffold_setup
cd ext_scaffold_setup

# Install the plugin and extjs
script/plugin install http://rug-b.rubyforge.org/svn/ext_scaffold
curl -O http://extjs.com/deploy/ext-2.0.2.zip
unzip -q ext-2.0.2.zip
rm ./ext-2.0.2.zip
mv ./ext-2.0.2 ./public/ext

# Generate some scaffolds - posts and purchases
./script/generate ext_scaffold post title:string body:text
./script/generate ext_scaffold purchase order_id:integer amount:decimal description:text

# Create the database for the models
rake db:migrate

# Create links to the models on the landing page
echo '<title>ExtJS Scaffold generator sample</title>echo '<style type="text/css" media="screen">a {text-decoration:none; color:#abc}</style><a href="http://www.blogger.com/posts">Posts</a> <a href="http://www.blogger.com/purchases">Purchases</a>' > ./public/index.html

# All set, run the server!
./script/server

Point your browser to http://localhost:3000, and you're good to go.

Monday, February 25, 2008

Git on OS X 10.5

What?

Git on OS X 10.5 Leopard.

Why?

Git is YARC (yet another revision control system) with some outstanding differences. You can find out for yourself just what those are, but as a hint git is written by Linus Torvalds who hates CVS and SVN - "a bad idea and its bad fix walking hand in hand."

So what does git have going for it?

  • Distributed repositories - you don't need to rely on a central host
  • Branching made easy - in the same spirit, code branches is a breeze
  • Speed - it's just that much faster
How?

So you want it - now how do you get it?

Thanks Wincent.com for the seamless installation script. Just copy the text, paste it into the terminal, and stick around to watch it all happen (and type your password at sudo time.

More configuration scripts are also available, as well as an introductory tutorial.

# build expat dependency
curl -O http://surfnet.dl.sourceforge.net/sourceforge/expat/expat-2.0.1.tar.gz
tar xzvf expat-2.0.1.tar.gz
cd expat-2.0.1
./configure
make
make check
sudo make install
cd ..

# build GPG for signature verification
curl -O ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.7.tar.bz2
openssl sha1 gnupg-1.4.7.tar.bz2
tar xjvf gnupg-1.4.7.tar.bz2
cd gnupg-1.4.7
./configure
make
make check
sudo make install
cd ..

# copy GPG files from Tiger install
mkdir -m 700 ~/.gnupg
cp ${PATH_TO_TIGER_HOME_FOLDER}/.gnupg/*gpg* ~/.gnupg/

# git
curl -O http://kernel.org/pub/software/scm/git/git-1.5.2.4.tar.bz2 \
-O http://kernel.org/pub/software/scm/git/git-1.5.2.4.tar.bz2.sign
gpg --verify git-1.5.2.4.tar.bz2.sign git-1.5.2.4.tar.bz2
tar xjvf git-1.5.2.4.tar.bz2
cd git-1.5.2.4
make prefix=/usr/local all
make prefix=/usr/local test
echo $?
sudo make prefix=/usr/local install
cd ..

# manpages
curl -O http://www.kernel.org/pub/software/scm/git/git-manpages-1.5.2.4.tar.bz2 \
-O http://www.kernel.org/pub/software/scm/git/git-manpages-1.5.2.4.tar.bz2.sign
gpg --verify git-manpages-1.5.2.4.tar.bz2.sign git-manpages-1.5.2.4.tar.bz2
sudo tar xjv -C /usr/local/share/man -f git-manpages-1.5.2.4.tar.bz2