# install mysql if you dont have already installed
sudo apt-get install mysql-server mysql-client libhtml-template-perl mailx dbishell libcompress-zlib-perl mysql-doc-5.0 tinyca
# install ant and jdk
sudo apt-get install ant sun-java6-jdk
# install jruby
mkdir software
cd software
wget http://dist.codehaus.org/jruby/jruby-bin-1.1.5.tar.gz
tar xvfz jruby-bin-1.1.5.tar.gz
ln -s jruby-1.1.5 jruby
export PATH=$PATH:$HOME/software/jruby/bin
# install the version of rails wanted by jruby
jruby -S gem install jruby-openssl
jruby -S gem install rails
# list your gems
jruby -S gem list
# install the gems needed for db
jruby -S gem install activerecord-jdbc-adapter activerecord-jdbcmysql-adapter
# generate some code
cd ~/scripts/ruby
jruby -S rails wherehaveyoubeen -d mysql
cd wherehaveyoubeen
jruby script/generate controller states index
# configure access to the database server
vi config/database.yml
#development:
# adapter: jdbcmysql <- very important!
# encoding: utf8
# database: test_development
# username: root
# password: database
# socket: /var/run/mysqld/mysqld.sock
# generate the db
jruby -S rake db:create:all
jruby -S rake db:migrate
# edit your app
sudo apt-get install emacs ruby-elisp irb1.8 emacs22-el
emacs -bg black -fg wheat app/views/states/index.html.erb
# uncomment the secret in app/controllers/application.rb
vi app/controllers/application.rb
# run your app
jruby script/server