View Full Version : MySQL/Ruby how to install
merrua
September 4th, 2006, 09:23 AM
I'm trying to install MySQL/Ruby
and I thought the instructions at http://www.tmtm.org/en/mysql/ruby/
were refering to rubygems commands
Well one blank look from rubygems later its looking like I'm wrong.
anyone know a more modern up to date tutorial?
Or at least could explain where I unpack the module too
and what commands do I put where to install it?
rob
September 4th, 2006, 07:16 PM
It's probably easier to install it with "gem install mysql".
What platform are you trying to install it on?
merrua
September 5th, 2006, 03:59 AM
Windows 2000
merrua
September 5th, 2006, 08:03 AM
I tried that command to install with gems. It seems to work.
I tried to install what i though would be a stable release
from the options mysql2.7 but the installation failed.
mysql2.7.1 installed no problem though, but its installation
was very fast. Would mysql2.7.1 be ok to use?
merrua
September 6th, 2006, 10:19 AM
running a mysql-ruby test program from http://www.kitebird.com/articles/ruby-mysql.html.
I was thrown this ruby error. Does this mean that Mysql.2.7.1 didnt install properly either like i thought?
>ruby simple.rb
C:/ruby/lib/ruby/gems/1.8/gems/mysql-2.7.1-mswin32/ext/mysql.so: 126: The specified module could not be found.
-c:/ruby/lib/ruby/gems/1.8/gems/mysql-2.7.1-mswin32/ext/mysql.so <LoadError>
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in 'require' from simple.rb1
merrua
September 8th, 2006, 11:50 AM
also a window popped up saying
window
--------------------------------------------------------
ruby.exe - Unable to Locate Component.
this application has failed to start because LIBMYSQL.dll
was not found. Re-installing the application may fix this
problem.
--------------------------------------------------------
nurp
September 9th, 2006, 08:20 PM
copying C:\Program Files\MySQL\MySQL Server 4.1\bin\libmySQL.dll file to C:\ruby\bin worked for me. hope this was a correct action.
peace
merrua
September 11th, 2006, 10:38 AM
copying C:\Program Files\MySQL\MySQL Server 4.1\bin\libmySQL.dll file to C:\ruby\bin worked for me. hope this was a correct action.
peace
Tryed suggestion
new error is
Error code: 1044
Error message: Access denied for user 'testuser '@' localhost' to database 'test' simple.rb.13: undefined method 'close' for nil:NilClass <NoMethodError>
which does look more hopeful an error.
merrua
September 11th, 2006, 11:52 AM
added more user privilages for testuser for the test database in mysql administrator. You do so in the Mysql User Administation screen.
And problem was solved...
>ruby simple.rb
Server version: 5.0.24-community-nt
rogerdpack
October 10th, 2007, 06:23 PM
This problem occurs when you try to use ruby (after installing the mysql gem) and haven't installed mysql on your windows machine or didn't elect to set its 'bin' directory as part of your path. Fix those two and you're set!
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.