I know a lot of people who use ruby are either doing their development on linux machines or macs, but for those people who are brave….. here is a guide for you setting up LovdByLess with Ruby on Rails on Windows machine. The machine I used is Windows XP.
LovdByLess is built with Ruby on Rails and is a social networking solution that has everything you need to build your community.
The folowing installation of Ruby and Ruby on Rails was created with guidance from the RubyOnRails.org documentation which can be found here.
Install Ruby compiler
For Windows I used the One-Click Installer - Windows found here: rubyforge.org(Which for me at the time of this post was version ruby186-26)
I like to be able to run ruby from where ever I am in the command prompt so in order to do that just add this line (if not there already) to your Path variable in the System Variables:
c:\ruby\bin;
Setup RubyGems and Rails on Ruby
Download from here rubyforge.org the latest release of Ruby gems. I used the zip version 1.1.0 for this installation. Extract the zip file to where ever you want. Open a console (cmd.exe) window and proceed to where you extracted the rubygems 1.1.0. Run this command:
c:\[rubygems 1.1.0 Path]\ ruby setup.rb
Now we want to setup Rails. Just type this in the command prompt:
gem install rails --include-dependencies
Download and extract the zip file from LOVDbyLESS.
We have to install the following gems using the RubyGems program we just installed. From the command prompt, run the following:
c:\gem install youtube-g
c:\gem install rflickr
c:\gem install uuidtools
c:\gem install colored
c:\gem install hpricot
c:\gem install mocha
c:\gem install redgreen
c:\gem install RedCloth
c:\gem install acts_as_ferret
c:\gem install ferret
c:\gem install win32console
c:\gem install avatar
c:\gem install tzinfo
c:\gem install rails
****If you get asked during these gem installations to Install hoe, rubyforge, Rake, mime-types, xml-simple, etc just type Yes for these.****
Get rmagick gem here, download and extract. Execute:
ImageMagick-6.3.7-8-Q8-windows-dll.exe
In the console change directory to where you extracted the gem.
gem install rmagick-2.0.0-x86-mswin32
This will require a reboot of your machine at some point before you try to use this gem. (Trust me. this took me a long time to figure out!)
We need to create a mysql user account to run the LovdByLess database with. This assumes you have Mysql running on your machine. From the command prompt type and hit enter:
mysql --user=root mysql -p
Enter your password. Create mysql user:
GRANT ALL PRIVILEGES ON *.* TO 'lovdbyless'@'%'
IDENTIFIED BY 'my_password' WITH GRANT OPTION;
Then exit mysql:
quit mysql
Go to the directory where you extracted LovdByLess and open the config folder. Copy database.yml.tmp to database.yml. Edit this file and replace the values for username and password with the mysql user you created above.
From the command prompt, proceed to your LovdByLess directory, run the following:
rake db:create:all
rake db:migrate a=no
rake
The last command should run all ruby tests for the project. Now run this from your lovdbyless folder in the command console:
ruby script\server
The rails server is now up and running. Open up a web browser and go to this address:
http://localhost:3000/
Please let me know if you had any issues setting this up. Thanks!