Wednesday, April 14, 2010

Getting started with Heroku and Spree: Part 2 - Configuring Ruby [GUIDE]

At Gunner Technology, we have found that if we give a little, we usually get more in return.

Here's what I mean. Most of our clients know nothing about the Internet other than some buzz words around it. Giving them specs, bids, wireframes, sample recommendations, etc isn't very powerful.

We've found that building a prototype and showing them examples of what we want to do is about five times more likely to end in a relationship than if we try to tell them what we want to do.

This means banging out a WordPress site on a shared host. Setting up a Twitter account and faking interaction, promotions and messages.

Right now, we're working on forming a relationship with a Mexican restaurant. They don't have a Web site, and we feel they could see a 30% increase in sales by taking orders online, registering their site with Yelp, Google and Bing and implementing a Twitter/Foursquare marketing campaign.

So, we're going to put together a demo site for them using Spree and we'll host it for free with Heroku.

We also have a new MacBook Pro we're going to set up from scratch to get this started, so we figured we'd take you through the whole process, step by step.

This is part 2: Configuring Ruby

Since we do a lot of development and testing, we're going to start with Ruby Version Manager or RVM, which will let us easily switch between Ruby and Gem versions.
  1. The best and easiest way to install RVM is with Git. Install it using this link.
  2. Once you have get installed, open a Terminal window and paste this command:
    mkdir -p ~/.rvm/src/ && cd ~/.rvm/src && rm -rf ./rvm/ && git clone --depth 1 git://github.com/wayneeseguin/rvm.git && cd rvm && ./install
  3. During the installation process you'll be asked to modify your .bash_src and .bashprofile. Do so
  4. After that, install Ruby 1.9.1 with this command in terminal: rvm install 1.9.1
  5. Install Ruby Enterprise Edition with this terminal command: rvm install ree-1.8.7
  6. Set enterprise edition as the default as this will match the Heroku environment we'll be running spree in: rvm use ree-1.8.7 && rvm --default ree-1.8.7
  7. Install Rails: gem install rails --no-ri --no-rdoc
  8. Install SQLLite3: gem install sqlite3-ruby --no-ri --no-rdoc
  9. Install AWS-S3 gem: gem install aws-s3 --no-ri --no-rdoc
  10. Install Mongrel gem: gem install mongrel --no-ri --no-rdoc
And that's it! Next time, in part 3, you'll create your spree application.


Follow Me | Friend Me | Find Me
blog comments powered by Disqus