Rails3 and Datamapper quick start May 21st, 2010



Rails3 is almost released and I decided to try it out with Datamapper to see how things work. Things work AWESOME!

Here's a rundown of the steps I used:


gem update --system # you need rubygems >= 1.3.6
git clone http://github.com/rails/rails.git
cd rails
rake install
cd ..
rails my_dm_rails3_app -m http://github.com/jeremyd/rails-templates/raw/master/dm_rails_master.rb
cd my_dm_rails3_app
bundle install
Note: I cloned snusnu's repository here and modified to install a Gemfile that uses prerelease rubygems instead of git repository checkouts. This seems much faster and there were less dependency problems for me..

Textmate style rails plugins for VIM. October 11th, 2007

"Textmate is cool, but VI is forever"
Here's how to get some textmate like potential out of VIM using plugins. I have the following plugins installed: project.vim, genutils.vim, rails.vim, multvals.vim, rubycomplete.vim and surround.vim.
non-insert mode

what to typewhat it does
:help surroundshows help for the surround plugin
yss=surrounds the current line with <%= %>
yss CTRL-Eturns the current line into a block <% -%>newline char<% end -%>
yss-surrounds the current line with <% -%>
CTRL-X CTRL-Obrings up the OMNI complete window for the current object/method
yssecreates an ending for the current block. ie: an 'end' or closing brace
CTRL-G ecreates an ending for the current block. use in insert mode
insert mode
what to typewhat it does
:help surroundshows help for the surround plugin
CTRL-G =surrounds the current line with <%= %>
CTRL-G CTRL-Eturns the current line into a block <% -%>newline char<% end -%>
CTRL-G -surrounds the current line with <% -%>
CTRL-X CTRL-Obrings up the OMNI complete window for the current object/method
CTRL-G eputs an 'end' on the next line

Ubuntu VMware Server QuickStart May 12th, 2007

Ubuntu Server edition is very bare bones. I threw this together so I wouldn't forget the packages needed to spin up a VMware server installation.

sudo apt-get install build-essential linux-headers-`uname -r`
sudo apt-get install libxtst6 libx11-6 libXrender1 libXt6 libdb3 xinetd
tar -xzvf VMware-server-1.0.1-29996.tar.gz
cd vmware-server-distrib
sudo ./vmware-install.pl
After answering all the questions, you're good 2 go!

hellahella howto - web control panel hellanzb in Ubuntu 6.xx Edgy/Dapper May 12th, 2007

FYI:This guide has been RECENTLY CONSOLIDATED. Instructions for Dapper and Edgy are being combined back into one. Notes: Neither Edgy or Dapper can keep up on the python setuptools required to install hellahella's TRUNK. You must download the ez_setup.py script and use it for install. The ez_setup.py script likes to bomb out, I found that each time it got a bit further so I kept running it. After 4 runs it was able to download all the needed eggs and install them successfully. do this: Optional step) remove python setuptools if you have them installed from packages

apt-get remove python-setuptools python2.4-setuptools
then install subversion:
sudo apt-get install subversion
Then run the following command until it is successful. My experience was that it first choked on Paster setup, then on Cheetah, then on MyghtyUtils. The fourth time I ran it, it made it all the way through. Sweet!
sudo python ez_setup.py -U hellahella==dev
additional tips:: If you get GCC errors when ez_setup tries to compile Cheetah, you can install it from packages and run ez_setup.py again like this:
sudo apt-get install python-cheetah
sudo python ez_setup.py -U hellahella==dev

Finally, hellahella and it's dependancies are installed! Continue to setup:
paster make-config hellahella hella.ini
Then edit hella.ini to setup your hellanzb connection info and login information. The defaults seem to correspond to hellanzb.py 's defaults. Once you've setup hella.ini, you're almost there!
paster setup-app hella.ini
paster serve hella.ini
You now should be able to login to hellahella by opening http://localhost:5000/ in your browser.