Order of Chaos  

Go Back   Order of Chaos > World of Warcraft > Mods & Addons > AddOn & Utility Development

Reply
 
Thread Tools
Old 10-24-2006, 12:44 PM   #1
Guild Officer
 
RageKage's Avatar
 
Join Date: Sep 2004
Posts: 1,991
RageKage is a glorious beacon of lightRageKage is a glorious beacon of light
DKP/Crafting Manager (gManager)

No, I'm not trying to rip off Google, I just don't have a good name for the tool.

What I've embarked on is a improved DKP system, that'll include Scheduling (with Calendar, and XML/RSS export) and a resurrected version of the Crafting Manager that I announced but never finished. So now I'm looking for contributors, and new coder blood, and some new brains - mine is running out.

Thing is it's written in Ruby on Rails (RoR) - For the better part of a year I've been working with this framework, and it honestly makes web development a lot more fun. You can read about it here http://www.rubyonrails.com But for our purposes in this post, I'm going to talk you through getting a Web Development environment in Windows.

So to get started working on the new system you need a Ruby On Rails dev Environment - I'll start with windows since it's actually easier than OSX or even linux (which I'll include later).

For Windows this is by far the simpliest way I can explain to install RoR.
  1. Download this http://rubyforge.org/frs/download.ph...ruby185-21.exe This is the Ruby one click installer, it's a simple natively compiled version of Ruby. Make sure you choose to update the path variable (if asked) and install RubyGems. RubyGems is a package mangaement facility for Ruby libraries (one of which is RoR)
  2. Open a Command prompt (aka Dos Prompt)
  3. type in ruby -v, you should see something like "ruby 1.8.5 (2006-08-25) [i386-mswin32]" returned. This is good.
  4. Next, type in "gem install rails --include-dependencies". This will install RoR, hurray. Should see messages like installing ActiveRecord, and installing RDoc.. all normal. Once it's completed type in "rails" you should see a help message, this is also good.
  5. After that is finished you need to install Rake, Rake is Ruby's version of Make, I won't go into what Make is, basically it's just a launcher for various scripts and tasks. Install this by issueing "gem install rake" from the Command Prompt.
  6. Next, install Mongrel - Mongrel is a web service written in Ruby - Personally I like it better than Webrick (the default webservice) so if you want you can skip this step. However if you want to install it, issue this command at the command prompt "gem install mongrel --include-dependencies"
  7. You'll also need MySQL, the DKP is written to use MySQL. You can find the install for MySQL here http://dev.mysql.com/downloads/mysql/5.0.html#downloads, instructions on installation are here: http://dev.mysql.com/doc/refman/5.0/...tallation.html
  8. Once MySQL is installed, go back to the Command Prompt and install the Ruby MySQL bindings, issue the command "gem install mysql" - you'll be prompted with multiple versions, select the most recent version with the (mswin32) tag.
  9. Obtaining RadRails Ruby IDE is probably the best way to create and manage projects for Rails in Windows. It's a personal favourite on the Windows Platform (due to NOT havign TextMate which I'm much more fond of but it's OSX only) You can download RadRails here, http://prdownloads.sourceforge.net/r...2.zip?download. As a side note, you'll need Java installed. Ironic I know - but it's an IDE.....
Once RadRails is extracted you can start it and hopefully you get the GUI. You'll need to configure it with the paths to ruby, rails and rake. From the task bar select Window->Preferences - within preferences select Rails->Configuration Enter in the path to where rails, rake and mongrel_rails installed (typically in C:\ruby\bin)

Checkout DKP code:
Getting the actual codebase isn't very hard, I check in all the code to an SVN repository.

First a few things to get the environment setup, open up the command prompt again and issue the following command:

"mysqladmin -u root -p create gmanager_development"

use the password for the root account for the mysql server - usually you define it during the installation.

Leave the command prompt open and return to RadRails. From RadRails create a new project File->New - expand the SVN section and click on checkout project from SVN, click Next. Select "Create new repository location" radio button and click next. type in teh following URL "http://pistonz.net/svn/gmanager" click next. You shoudl see 'trunk' in the next window, click the + to expand it, you should see many directories like (app, config, log, public) this is good. Click on 'trunk' and click next. Select "check out project using new project wizard" checkbox and click Finish.

New wizard pops up, click on Rails Project and click next. Give the project a Name like "OOC gManager" or just "gmanager". Use the default location. Uncheck generate rails application skeleton, and if you installed Mongrel check off "Create a Mongrel Server" and uncheck "Create a Webrick server", if you didn't install Mongrel, leave the settings as they are and click Finish. Remember to make note of the location.

RadRails should start to checkout the code.

Once the code is checked out, you can start to configure the environment.

From the Rails Navigator expand the project, and inside the config directory there should be a database.yml.example file, copy that file as database.yml.

Edit database.yml file and examine the development: area, and make changes where necessary. specifically username, and password. This for development is usually root and the password given during mysql installation.

I'm not going to go into the whole securing your mysql installation, because frankly this is a toy app.

Once all this is done, go back to the command prompt and change directories to where RadRails checked out the application.

run this command "rake db:bootstrap" and follow up with "rake db:bootstrap:load" should load default fixtures and settings, including the database schema. If you have problems, review the above steps for creating the database.

Once this is finished, go back to RadRails - click on the servers tab at the bottom, and select the Mongrel/Webrick server and click the start button.

Everything hopefully will start and you can from yoru browser goto http://localhost:3000/ and see the Rails welcome page.

Last edited by RageKage; 10-24-2006 at 03:46 PM.
RageKage is offline   Reply With Quote
Old 10-24-2006, 01:26 PM   #2
Red Rubbery Mageness
 
Zymun's Avatar
 
Join Date: Sep 2004
Posts: 1,493
Zymun is a jewel in the roughZymun is a jewel in the rough
Great instructions, Rager; have been looking for an excuse to learn Rails -- and despite the somewhat mixed message of needing Java for Rails development, it's hard to argue with Eclipse, definitely my favorite IDE for non-C++ development. :)

Couple of things:

- the link to the RadRails ZIP doesn't work (or didn't for me), but a simple search on Sourceforge is all that's required to get it.

- you don't say it, but you need the MySQL 'bin' folder in your PATH in order to avoid an ass-ton of "LIBMYSQL.dll" not found Windows errors whilst building (or perhaps "raking" is the more apropos gerund ;-)) the bootstrap environment.
Zymun is offline   Reply With Quote
Old 10-24-2006, 02:06 PM   #3
Guild Officer
 
RageKage's Avatar
 
Join Date: Sep 2004
Posts: 1,991
RageKage is a glorious beacon of lightRageKage is a glorious beacon of light
hrm.. weird - i've never had a problem with libmysql being an issue..

But, the instructions worked? :)
RageKage is offline   Reply With Quote
Old 10-24-2006, 02:10 PM   #4
Red Rubbery Mageness
 
Zymun's Avatar
 
Join Date: Sep 2004
Posts: 1,493
Zymun is a jewel in the roughZymun is a jewel in the rough
Yep, have the whole thing up and building. Just need to learn Ruby now so I can actually understand what goes where (beyond the basic MVC model, which is obvious) and perhaps start contributing, depending on time available :)
Zymun is offline   Reply With Quote
Old 10-24-2006, 03:05 PM   #5
Dead....
 
Dirk's Avatar
 
Join Date: Oct 2004
Posts: 374
Dirk is on a distinguished road
Send a message via AIM to Dirk Send a message via Yahoo to Dirk
Ill get this installed tonight and start learning....
__________________
DirkLoogie - Warrior
Dirk is offline   Reply With Quote
Old 10-24-2006, 03:53 PM   #6
Slackass Extraordinaire
 
Neit's Avatar
 
Join Date: Nov 2004
Posts: 1,463
Neit has a spectacular aura about
I had the code before but didn't know how to setup the database. Maybe now I'll actually do something :)
__________________
Neito - Neit - Prowler
[Clarendon] whispers: you havent heard the last from me
Neit is offline   Reply With Quote
Old 10-24-2006, 03:56 PM   #7
Guild Officer
 
RageKage's Avatar
 
Join Date: Sep 2004
Posts: 1,991
RageKage is a glorious beacon of lightRageKage is a glorious beacon of light
The code you had i think is old and busted, new hawtness is the gmanager stuff :)
RageKage is offline   Reply With Quote
Old 10-24-2006, 07:10 PM   #8
Senior Member
 
mystalia's Avatar
 
Join Date: Jun 2005
Posts: 418
mystalia is on a distinguished road
Send a message via Yahoo to mystalia
Installed and running. Now like Zy I just need to figure out what all is going on :)

On a side-note, I also installed MySql GUI Tools in order to more easily see the db. (There might have been an easier way to view everything but I'm used to SQL Server).

http://dev.mysql.com/downloads/gui-tools/5.0.html
__________________
Dyonaxis - Lvl 80 Human Death Knight : Mining / Blacksmithing
Mystalia - Lvl 70 Elven Hunter : Mining / Engineering
Danorian - Lvl 70 Human Mage : Herbalism / Alchemy
mystalia is offline   Reply With Quote
Old 10-24-2006, 08:41 PM   #9
Red Rubbery Mageness
 
Zymun's Avatar
 
Join Date: Sep 2004
Posts: 1,493
Zymun is a jewel in the roughZymun is a jewel in the rough
SQLYog, baby. It's the only way to fly (and now it's OSS too ;-)).
Zymun is offline   Reply With Quote
Old 10-25-2006, 02:50 AM   #10
Senior Member
 
stark's Avatar
 
Join Date: Sep 2004
Posts: 300
stark is on a distinguished road
Send a message via ICQ to stark Send a message via AIM to stark
10 PRINT "LETS RAID MOLTEN CORE";
20 PRINT "NO LETS RAID TEH FRIDGE";
30 GOTO 10
40 END
__________________
Stark=Jugg
===========
Quote from IRC:
[11:39] Davidson: you're way too addicted to warcraft
stark is offline   Reply With Quote
Old 10-25-2006, 10:33 AM   #11
Who's your daddy?
 
Wolf's Avatar
 
Join Date: Nov 2004
Posts: 618
Wolf has a spectacular aura about
What exactly are you after here Rage? What parts of the system do you need coded. What parts are already complete/partially complete. What parts do you want to do yourself. What type of GUI do you want, what functionality ect..

I have been using rails for a while now and would love to help out and learn at the same time, just need to know exactly what you need.
__________________
Wolf - 70 Hunter
Shard - 70 Priest
Backstab - 70 Rogue
Hammer - 60 Paladin
Blades - 70 Warrior

Harm - 62 Shaman
Wolf is offline   Reply With Quote
Old 10-25-2006, 10:34 AM   #12
Who's your daddy?
 
Wolf's Avatar
 
Join Date: Nov 2004
Posts: 618
Wolf has a spectacular aura about
Quote:
stark View Post
10 PRINT "LETS RAID MOLTEN CORE";
20 PRINT "NO LETS RAID TEH FRIDGE";
30 GOTO 10
40 END
Psst, never gonna get to 40 :P
__________________
Wolf - 70 Hunter
Shard - 70 Priest
Backstab - 70 Rogue
Hammer - 60 Paladin
Blades - 70 Warrior

Harm - 62 Shaman
Wolf is offline   Reply With Quote
Old 10-25-2006, 10:42 AM   #13
Guild Officer
 
RageKage's Avatar
 
Join Date: Sep 2004
Posts: 1,991
RageKage is a glorious beacon of lightRageKage is a glorious beacon of light
Aha, well - not sure yet :)

It's basically a rewrite - I'm handling the DKP code at the moment, but someone handling the crafting code would be helpful, or even adding a module for profiles :) (you get to work with vedge on that one:) It's very early at this point - and if people would like they can peruse the running DKP code here.

http://pistonz.net/projects/chaosDKP
RageKage is offline   Reply With Quote
Old 10-25-2006, 10:49 AM   #14
Behind the Curve
 
Geometrix's Avatar
 
Join Date: Sep 2004
Posts: 284
Geometrix is on a distinguished road
Send a message via AIM to Geometrix
Quote:
RageKage View Post
(you get to work with vedge on that one:)

And people wonder why I never got anything done with it ... ;)
Geometrix is offline   Reply With Quote
Old 10-25-2006, 02:11 PM   #15
Mr. Macro
 
TheVedge's Avatar
 
Join Date: Sep 2004
Posts: 1,340
TheVedge is on a distinguished road
Send a message via ICQ to TheVedge Send a message via MSN to TheVedge Send a message via Yahoo to TheVedge
Quote:
Geometrix View Post
And people wonder why I never got anything done with it ... ;)
Want me to go ahead and put up the diffs of what I did vs what you did? :P
__________________

Remember, remember, the fifth of December,
the day all the addons got shot.
I know there were reasons, but the players cried "Treason!"
and then QQed quite a lot.


- Alliance -
Eluana, Divine Night Elf Priest (Tailoring)
Dursun, Druken Dwarf Hunter, Master of Fergus (Gnegnegneur)
Bookworm, Useless Human Mage (Banking)

- Hordes -
Dunbas, 'Splodin Undead Mage (Engineering)

TheVedge is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT -4. The time now is 08:13 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0