tags:

views:

19

answers:

1

Hello! I have an existing mysql db used by a rails app. I want to create a Ruby script to run to perform a weekly maintenance task on the database. My first line is:
require 'mysql'
I have tried various 'paths' to point there but get an error message like:

1:in `require': no such file to load

I have:

code at: \ruby\sites\somepgm
mysql at: \ruby\lib\gems\1.8\gems\mysql-2.8.1-x86-mswin32

How do i get them to be nice to each other?

+1  A: 
require 'rubygems'
require 'mysql'
Jed Schneider
This works! I figure I should learn Ruby separate from Rails to understand the whole thing better, so thats the purpose of this exercise. Thanks for the answer.
rtfminc
sometimes your gemrc file will load rubygems for you as well, so it isn't always clear if you have to do that or not but usually if you get a gem load error, its the first check.
Jed Schneider