Friday, August 27, 2010

Setting up Ruby on Rails on Windows 7


  1. Install Ruby (1.9.2 as of time of writing)
  2. Install RubyGems (1.3.7 as of time of writing)
  3. gem install mysql, rake, authlogic, rspec
  4. Remove rake.gemspec from C:\Ruby192\lib\ruby\gems\1.9.1\specifications
  5. Replace libmySQL.dll in C:\Program Files\MySQL\MySQL Server 5.1\bin with the one from InstantRails
  6. Login to MySQL (mysql -uroot -p)
    • CREATE DATABASE DB_NAME;
    • CREATE DATABASE DB_NAME_test;
    • CREATE USER 'test_user'@'localhost' IDENTIFIED BY 'test_pass';
    • GRANT ALL PRIVILEGES ON *.* TO 'test_user'@'localhost' WITH GRANT OPTION;
  7. Update database.yml correspondingly