I got it working eventually ,after adding gem 'dbi' .
thanks
User Profile
Collapse
-
How to connect to Mysql & Query for Database Tables?
Hi Guys,
Ruby imposes several way of connecting to Mysql (DBI,activereco rd..) Database using ruby code. Let me know if anybody knows how to connect to mysql the easiest way.
I am getting all sorts of error trying to connect to mysql. I am using Windows XP OS.
Hope to hear from you guys soon!!
Cheers -
MYSQL GUI Synchronization Tool
Hi Guys,
Please do let me know if there any "MYSQL GUI Synchronization Tool" exists. I have googled for some tool, but most of them are not Open Source.
Let me know if any Free GUI tool exists with complete features for DB Synchronization .
thanks -
Upgrading DB Schema to multiple Mysql Instances automatically
Hi Guys,
I have multiple Mysql DB instances containing same schema but different data in the tables, running in my unix server.
I always have the issue of not upgrading all the instances at the same time, this leads into inconsistent of DB schema.
My question, is there any tool/script that can sync all my DB instances automatically once i upgrade one instance.(Sync only at schema level not data).... -
On the Similar lines to Multiple file downloads, i am facing issue with deleting the files on remote FTP server.
<CODE>
ftp.delete("fil ename.xls") # This line works as i am giving exact filename
ftp.delete("*.x ls") # Trying to delete all files with .xls extension , but i get 'getresp' : 550 Delete operation failed (Net : : FTPPermError) issue.
<CODE>
Wondering whether its an issue with...Leave a comment:
-
Delete Enitre column in excel using ruby code
Hi All,
I need to delete entire column(GB) in excel using ruby code.
let me whether i should write some ruby code or is there a way to call an
excel macro from ruby
whichever is simpler or easy way to maintain.
cheers -
Thanks for the reply, I am novice to ruby & programming, it will be great if you could give me the sample code for the looping.
Because i dont want to hardcode the file names.
For example: If i have 5 excel files in my server with different names, i would like to download them with the *.xls, but as i see with the getbinary.file method is that i can download only one file at a time!!!
Correct me if i am wrong!!Leave a comment:
-
FTP - Multiple file downloads using ruby
I have written ftp code which will download a single file from the
Server using the below code:
...Code:require 'rubygems' require 'net/ftp' require 'fileutils' URL = 'IP address' username = 'test' passwd = "test" filename = "file1" directory = '/home/test/' localfile = 'C:\\Documents and Settings\\User1\\Desktop\\file1' ftp=Net::FTP.new
-
Thanks for your suggestions, I figured out that giving the following will work!!
require 'C:\Documents and Settings\Deskto p\File1'
But what i am looking for is not hardcoding the path, since if someone else has to run my program he should be able to do it without touching in the code like modifying the path name etc..
I am using eclipse with RDT plugin, is there anyway i can setup these paths!!
Similar to Build Path for...Leave a comment:
-
Importing other files to run ruby programs
Hi all,
I have 2 files which are placed in two different folders. These folders
are not under any Classpath & i am using a windows system.
I have the following snippet of program, which i am stuck with,
File1:
---------------------------------------------------------------------------------
<rubycode>
class Test
puts " This output is from file1 "... -
-
How to get Time difference from system time?
I am using the following to get the time:
puts Time.now --> starting of my script
<MY CODE>
puts Time.now --> end of my script
I want to get the Time difference between two Time.now
Problem I am facing is i cannot directly take the difference as Time.now displays the time in following format : "Tue Feb 12 19:55:37 +0530 2008"
Any other better way to solve... -
Hi,
I tried using Thread.new(syst em('D:\ruby\bin \selenium.cmd') ), it doesnt seem to do what i want, i will be on the watchout , if i find any answers will be updating here!!
cheers...Leave a comment:
-
Hi improvcornartis t,
I have one doubt pertaining to system call and starting my server.
I use the system call --> system("D:\ruby \bin\selenium.c md")
This starts a server followed by which i would be calling all the methods in my code.
But until the first part of system call ends, i am not able to go to successive methods.
I cant stop the server and then start calling other methods since all...Leave a comment:
-
Thanks improvcornartis t !!, It works great :)
I see your the only one actively answering Q's.
Thanks...Leave a comment:
-
Calling windows Batch file from ruby program
Hi All,
Is there anyway i can call windows Batch file from ruby program.
I tried the following line, it failed :
cmd.exe /c C:\Documents and Settings\user\D esktop\RUN.bat
Suggest me if you have an answer for this.
Cheers -
-
I am using just Ruby.
I have installed Mysql ODBC 3.51 Driver ,I can see that - Data Source(ODBC) under Administrative Tools in windows.
let me know if i need to test anything specifically for that.
CheersLeave a comment:
-
Unable to Connect to Mysql from ruby
Hi Guys,
I have tried out several ways to connect to my MYSQL database thru Ruby on my windows machine.
I have used ruby-mysql, mysql-ruby, ruby DBI....but havent been lucky so far,
is there any installer kind of a thing to do this stuff!
""I get the following error - mswin32-ruby16.dll was not found""
Can anybody guide me in steps getting this working for me!!!
... -
Thanks for Code, it works fine :)
I have one more stuff to go with writing the text files,
My present output looks like this:
Upload Result\n filename status #Rows Quantity #Ignored #Deleted #Modified Messages FISCAL-CALENDAR.xls Loaded 140 0 0 0 0 On Hold 0 0 0 0 0
I rather like to see new line after each sentence, what should i do for that? Is there a way i can say to insert new line character...Leave a comment:
No activity results to display
Show More
Leave a comment: