Ruby on Rails – My First Attempt

June 14th, 2010 | No Comments | Posted in Ruby on Rails

There is a lot of talk about Ruby on Rails and I decided to give it a try. I have zero experience with Ruby on Rails or the Ruby programming language. If it can speed up the development of web apps then it will be a great language to learn. This post is the first in a series of my attempts to learn RoR. What you will find below are my notes as I attempted to get it setup on a Windows 7 machine.  I can say that this initial setup process was frustrating.

——————————————————————————————————————–

I went to the Ruby on Rails site, http://rubyonrails.org, found the “get started” arrow to download version 2.3.8. Before I got that far I see there is a lot of talk about the new rails 3.0 and it is very close to being released. As it will take me quite some time to learn and develop an app I want to use the latest version. I went ahead and clicked on to download version 2.3. I researched some and read and it seems Ruby version 1.8.7, does not work so well with rails 3.

I downloaded and installed the Ruby installer for Windows with version 1.9.1-p378, from – http://rubyforge.org/frs/?group_id=167

It then installed Ruby in the drive, c:\Ruby191 and I selected for it to add ruby executables to your path and associate .rb and .rbw files with this ruby installation.

The ruby site then says to install RubyGems – the package manager for ruby. I followed the link and downloaded RubyGems 1.3.7. After that is says to extract, then run “ruby setup.rb”. I would be assuming I do this from the windows command line, from the directory I extracted it to. I did this and it appears to work. It said RubyGems installed the following executables: c:/Ruby191/bin/gem

Now with RubyGems installed I should be able to install all of rails and its dependencies by command line. I don’t want rails 2 though I want rails 3. Right now it is at rails 3.0 beta 4. To install the latest I run, “gem install rails –pre”. So I ran this and it held there on the command line for a minute or so then it started installing items and then it came back with an error. “ERROR: While executing gem … (Errno::EINVAL) Invalid argument – ./</cdesc-<.yaml”. I think this is because I need ruby 1.9.2, in search of help now, in the way of the irc channel.

The error is just for some documentation that did not work, so I am going to bypass that and proceed with 1.9.1.

I created a projects folder in my documents on windows and then went in to that directory on the command line and created my first rails app. “rails app1″. I had to use “rails new app1″  for it to work. This created the files and folders for the app.

Now to test to see if I can access the site on my local browser. I am having trouble getting the WEBrick server to load. Not sure what I got to on the command line but it recommended to run “bundle install” so I did. That did not fix the problem though.

It was telling me that it could not find the sqlite3.dll files. I had to get the files from http://sqlite.org/download.html and put them in the ruby191/bin folder.

After I did that I ran “ruby script\rails server” and it worked and I was able to load the site in the browser.

Bookmark and Share

Great Use of Product Bundles by Michigan Bulb Company

March 22nd, 2010 | No Comments | Posted in Site Reviews

Product bundles are a fantastic way to increase your Average Order Value (AOV). The Michigan Bulb Company has done an excellent job of using product bundles on their site. They sell bulbs, hedges, roses, shubs, trees and much more. If you plant flowers or landscape your yard each year you will know that certain plants and flowers go well together. This type of product is set up well to offer product bundles.

The Michigan Bulb Company goes well above a normal product bundle offering. They have a category on their site, “Gardens” and it features different types of flower gardens. When you click on a particular garden it brings you to a product page that has each type of flower/grass/shrub/etc. that you need to create the garden pictured. You can see an example by looking at the image to the left.

This is a great use of product bundles and will greatly increase the sites AOV.

Are you using product bundles effectively on your site?

Bookmark and Share