Jan 23 2013

New Brew and Imagemagick

If you are running an updated version of Brew and Imagemagick, you’ll need to do some command line magic to get RMagick to work.

Homebrew 0.9.3
imagemagick 6.8.0-10

I also installed ghostscript.

brew install ghostscript

Onto that bit of magic:


cd /usr/local/Cellar/imagemagick/6.8.0-10/lib
ln -s libMagick++-Q16.7.dylib libMagick++.dylib
ln -s libMagickCore-Q16.7.dylib libMagickCore.dylib
ln -s libMagickWand-Q16.7.dylib libMagickWand.dylib

The details are here: http://stackoverflow.com/a/13960185/2002729


Jan 7 2011

Fresh Ruby & Rails Install on Snow Leopard

Download and Install XCode

XCode takes a while to download so we might as well start with this. You can continue on to the next steps while it downloads… until you run into a step that requires XCode

Download and Install MySQL

I’ve built mysql several times and haven’t find an advantage over installing it from the official DMG source. Installing it from the DMG is much easier and has a higher degree of success.

Just Google for “MySQL mac download”. It should take you to the MySQL download page. Download the 64-bit DMG and do the standard thing. Open it up and run the mysql install. Also add the System Preferences to make starting and stopping the MySQL service easier.

Update your Gems Environment

gem -v
gem environment
sudo gem update --system
sudo gem update
gem list --local

You might want to install hanna also. It’s an alternate rdoc template. I have it my system configured to automatically use hanna when generating rdoc.

sudo gem install hanna

Install Homebrew for your Unix Package Needs.

Homebrew is a nice simple package manager for OS X. Some alternatives are ports and fink. I’ve used them both before and prefer ports over fink.

ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"
brew

Once you install homebrew, you can easily install other packages. Ack “is a tool like grep, designed for programmers with large trees of heterogeneous source code.” Bash Completion helps make the bash command line easier to use. It’ll allow you to tab fill your ssh locations for example.

brew install git
brew install ack
brew install bash-completion

Install rvm

Here’s where we start adding some real meat to your system. rvm is not strictly necessary but highly recommanded.


# Install rvm
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
# set up rvm in .profile... or use rubyconsumer's dotfiles setup. (see below)
# To seamlessly abandon the Apple-installed system ruby (ruby 1.8.7 patchlevel 174 for Snow Leopard):
rvm install 1.8.7 # installs patch 302: closest supported version
rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system # migrate your gems
rvm --default 1.8.7

Set up Dotfiles

I have my dotfiles saved on github. I suggest either 1) look through and picking up what you need, 2) fork it, use it as is and start making your own additions. I've tried to keep it commented.

I place my configs into dropbox and symlink to them.


cd ~/Dropbox/wtsang

Clone or fork and clone dotfiles


git clone git@github.com:rubyconsumer/dotfiles.git

Set up dotfiles.


cd dotfiles
setup

My dotfiles project has a setup script which will non-destructively symlink to dotfiles. You'll need to modify it to work for you, until I make the appropriate changes since it's hardcoded to my Dropbox location.

Install Editor

Textmate is an obvious choice. If you are going to use vi, check out mac vim and carlhuda's Janus.


for i in ~/.vim ~/.vimrc ~/.gvimrc; do [ -e $i ] && mv $i $i.old; done
git clone git://github.com/carlhuda/janus.git ~/.vim
cd ~/.vim
rake


Jan 24 2009

Ruby on Rails Tutorials

Looking for some Ruby and Rails Tutorials?

Check out http://webdeveloper.econsultant.com/ruby-rails-tutorials/


Helpful Ruby on Rails tutorials.

  1. AJAX powered chat in 3 hours on Ruby on Rails : Tutorial on creating simple Web chatroom
  2. Ajax on Rails : at ONLamp
  3. Beginner’s Guide to Rails, part 1 : series of tutorials at GodBit
  4. Building Ruby, Rails, LightTPD, and MySQL on Tiger : at Hivelogic
  5. Create a To Do List with Ruby on Rails – Beginner’s Tutorial : at thehua
  6. Distributing Rails Applications – A Tutorial : by Erik Veenstra
  7. Fast-track your Web apps with Ruby on Rails : at IBM
  8. Four Days on Rails : Tutorial in PDF at HomeLinux
  9. Getting Your Feet Wet With Ruby on Rails : at Webmonkey
  10. Installing Ruby on Rails with Lighttpd and MySQL on Fedora Core 4 : at DigitalMediaMinute
  11. Instant Rails : preconfigured Rails software
  12. Introduction to Ruby : for Perl programmers at SixBit
  13. Introduction to Ruby for Mac OS X : at IO
  14. Learning Ruby : by Daniel Carrera
  15. Many to Many Tutorial for Rails (PDF) : at JRHicks
  16. ObjectiveView Ruby on Rails Introduction (PDF) : at Ratio
  17. Really Getting Started in Rails : at Slash7
  18. Rolling with Ruby on Rails (Part1) : at ONLamp
  19. Rolling with Ruby on Rails, Part 2 : at ONLamp
  20. Ruby on Rails : at RegDeveloper.co.uk
  21. Ruby on Rails on Oracle: A Simple Tutorial : at Oracle
  22. Ruby on Rails Screencasts : at RubyOnRails
  23. Try Ruby : Try Ruby in the browser at Hobix
  24. Tutorial : a basic tutorial at RubyOnRails
  25. Really Getting Started in Rails : Despite being written back all the way back in January 2005, Amy Hoy’s short and sweet intro still manages to be relevant
  26. Rails for Designers : by Kevin Clark
  27. Ruby QuickRef : quick reference guide.
  28. Ruby Tutorials : at Tutorialized.com
  29. Using Ruby on Rails for Dev on Mac OSX : at Apple
  30. How to Build a Ruby on Rails Engine: In-depth Start-to-Finish Tutorial : at AlterLabs

Related Posts:

  1. Ruby on Rails Basics (9 links) : Software / services to help in PHP.
  2. Ruby on Rails Blogs (10 links) : Blogs featuring articles, codes and discussions on Ruby.
  3. Ruby on Rails Demos Exampls Code Samples (29 links) : s
  4. Ruby on Rails Hosts (238 links) : Web hosts supporting Ruby.
  5. Ruby on Rails Official Sites (3 links) : Official sites for Ruby developers.
  6. Ruby on Rails Projects Sites (346 links) : Projects and sites developed using Ruby.
  7. Ruby on Rails Tutorials (29 links) : Helpful Ruby on Rails tutorials.

Jul 2 2008

Faster Gem Docs

A few weekends ago, I was at Ann Arbor Startup Weekend. It was a great weekend. We had a functional alpha/beta at the end of the weekend. This was despite the, to put it mildly, congested wifi.

A lot of folks are very reliant on the internet for information. Understandably so, but it doesn’t work in a weak and no wifi situation.

Using gem_server to get your documentation each time seems like a lot of work.

Enter Bashfully Yours, Gem Shortcuts.

By setting up my bash to load up gem documentation, I’m able to get documentation faster then you can off the web.

gemdoc hpricot

Done!

Try it out. It might even inspire you to help out with documenting a few gems.


May 15 2007

Getting Ready for RailsConf

It’s a couple days ’till RailsConf and not only did I decided to write in my sorely neglected blog but I also decided, for some strange reason, to reload my laptop. Brilliant!

Well, there are several reasons for reloading the old MBP.

    1. free up some space on the pitifully small 100GB HD
    2. install BootCamp so I can play my one turn per 24hrs in Civ 4.
    3. clear the financial data from my laptop before traveling with it.

As if all the craziness associated with going to a conference on the other coast for about week wasn’t enough.
I backed up my HD onto an external HD using Carbon Copy Cloner… just in case. First bit of fun was discovering I had the wrong set of install disks (not for the Mac Book Pro). I’m still working on the reload, but things are working out well so far. I still need to figure out how to transfer over my old Address Book and Key Chain, but things are looking good.

After I’m done with this reload, maybe after getting back from RailsConf, I need to make a Carbon Copy of my drive so I can easily get back to a fresh start.