322 Topics

Member Avatar for
Member Avatar for sunaruna84

Hi friends I am new for the ruby language.I need to convert the yml file into csv file format by using ruby. I am using the Ruby mine2.0.1 and got the conversion script from this link: [URL="http://github.com/tokland/yaml2csv/blob/master/yaml2csv_conv.rb"]http://github.com/tokland/yaml2csv/blob/master/yaml2csv_conv.rb[/URL] i had implemented the script in ruby mine 2.0.1 but is not wotking. …

Member Avatar for sunaruna84
0
341
Member Avatar for bharatk

Hello I have a rails application where I have to subtract 2 time stamps and display the result on the webpage I have used the following sql statement and I am getting the results. [CODE]select (julianday(resolutions.created_at)-julianday(tickets.created_at))*24 from tickets,resolutions[/CODE] the value of tickets.created_at is 2010-04-05 18:59:02 which is a time stamp …

Member Avatar for bharatk
0
201
Member Avatar for hawksury

Hi, I actually want to copy the contents of all files that is in a particular directory into a new directory.The new files should be of a specific size (2MB)and each with a new name (randomly assigned). My Current Code looks, testdir = "K:/test" # Iterating over each entry Dir.entries(testdir).each …

Member Avatar for hawksury
0
139
Member Avatar for Excizted

Hi. I'm just trying out Ruby on Rails, and I'm trying to create some application that takes a hostname from the user and then checks if it is connectible through Net::SSH and if it is, it should check if a file is present. Quite simple, and I also almost reached …

Member Avatar for Excizted
0
183
Member Avatar for rubyonrails

I have deployed a <URL SNIPPED>rails application on shared hosting server. FYI I am using passenger with apache2 module. But It gives an error.

Member Avatar for sourcebits
0
140
Member Avatar for johndoe444

I have wrote this following code to output aphostrophe (code 39 for utf-8): test_utf8.rb: puts "It\39s a wonderful life" then ran it using: ruby test_utf8.rb > utf8.txt While opening in gedit it shows a box corresponding to \39. While opening in open office, it asks which encoding and after selecting …

Member Avatar for johndoe444
0
72
Member Avatar for frida.kiriakos

hello, i want to run a ruby on rails application through apache web server via phusion passenger, i followed everything written in the guide and every guide and im still having a problem i really could use help, i spent two days on it and i am getting frustrated, when …

0
119
Member Avatar for colwem

I'm definitely a noob to rails so sorry if this is trivial. I have tables with associations on them. The associations are supposed to add methods to my models like model.others and model.others= and so on but when I try to use them I get errors like the following. NoMethodError: …

Member Avatar for colwem
0
165
Member Avatar for amithasija

hello members how r u another query for u people, can any body help me in sending sms through code.any kind of help will be highly appreciated...

Member Avatar for tiger86
-1
651
Member Avatar for danibootstrap

Hi, I am new to ruby and I want to write code which makes shared memory and writes to it.Similar to the C code here: [CODE=c]void main(int argc, char* argv[]) { HANDLE mappedFile = 0; int oneSecond = 1000; char* shared = NULL; HANDLE eventHnd; eventHnd = CreateEvent(NULL, FALSE, FALSE, …

Member Avatar for tiger86
0
261
Member Avatar for ignusb

Hello, I've written a basic class to help check on the status of various services, to be used in hopefully an extensible and easily modified manner.. I'm just a ruby/scripting/coding newbie, using tutorials online to learn from and working it all out as I go. I was hoping to get …

Member Avatar for tiger86
0
87
Member Avatar for xXReiichiXx

(sorry my bad english) I am a beginner and in an exercise the one who run the program must insert his birth date and the program must says if today is his birthday or not. In C to do this I can do (I jump a part of code): [code=c]printf("Insert …

Member Avatar for xml_looser
0
113
Member Avatar for dayt3

I'm working on comp. science 101 work and I have 4 methods left to do which I can't figure out and I've been trying for hours. Very elementary but difficult for smoeone new to computers and Ruby. For example: I need to write a method called 'diff' which accepts 2 …

Member Avatar for dayt3
0
123
Member Avatar for xylude

I need to replicate the encryption shown below: [code] def self.encrypt(password, salt) Digest::SHA1.hexdigest("--#{salt}--#{password}--") end [/code] I am trying something like this to no avail: [code] $salt = 'edc93eaf81aa1d64368c35213f192bb4ea81d20d'; $password = $_POST['input']; $password = sha1($salt.$password); echo "password sha1 value: " . $password; [/code]

Member Avatar for ruby_rocks
0
544
Member Avatar for jimmythechip

Ok, So rdoc avoids over-documentation by deciding that some modules & functions (e.g. private methods) are best left ignored and undocumented. Kindly rdoc lets you override some of this helpfulness by passing the '--all' and/or '--promiscuous' at run-time. Great. However, there are still some modules that are left undocumented for …

Member Avatar for tiger86
0
99
Member Avatar for higgo5

Dear friends- Short and sweet. How does a guy with no money and no real technical skill, start a website he is confident will break some ground? Cross my heart and hope to die. Chris

Member Avatar for tiger86
0
64
Member Avatar for czar82

I would like to use sarl3 [url]http://griff.sourceforge.net/sarl3_compiling.html[/url] for my degree thesis, but i had some problem in installing it. I'm using arch linux, i installed all the required package, but i get some error with ruby (i tried with ruby 1.8 and 1.9, but the error is still there). first …

0
87
Member Avatar for justsawyer

I need to know how to make a ruby script to just move files in downloads or to auto find them and move them to windows/cursors to install them then It would be nice if I could make the cursor set the default mouse cursor so any help?

Member Avatar for b72
0
56
Member Avatar for rahul8590

i was going through many ruby books and found this amazing text editing code (its just 17 lines ) provided u use Shoes toolkit. The code is working fine with no errors . but its only able to read (open) and input file but not save the text u wrote …

0
153
Member Avatar for Kruptein

I do php coding for some time and want to learn something new. After some researsh I ended up with 2 languages/frameworks but I can't choose between them. I'm a python programmer so python Django might be easier to start with. But I don't know a well-known website which is …

Member Avatar for Kruptein
0
515
Member Avatar for persianprez

I need to install these 3 tools in order to run Agriya Volume, but how do I? I'm running on a basic plan (linux) on securesignup. I don't have root access. Is there anyway? Or do I have to buy a VPS?? The three tools are: Mplayer + Mencoder Flvtool2 …

Member Avatar for persianprez
0
112
Member Avatar for atrip25

Ok, I have never used Ruby before and I'm trying to figure out how to convert my following Perl code into Ruby to do exactly what is does now. Basically I used a loop structure to produces the following output (user can specify how many lines need to be printed): …

Member Avatar for tiger86
0
248
Member Avatar for cutekate

I am posting form data into a file and also on the web page. Could please tell me how do i do that with ruby. This is my code for html form [CODE]#!/usr/bin/ruby print "Content-type:text/html\n\n"; # Display the form print <HTML; <html> <body> <form action="form1.rb" method="post"> <p>Your Name:<input type="text" name="name"></p> …

0
73
Member Avatar for Dark_Omen

Hello everyone, I just started to learn how to program in Ruby. It is a pretty cool language. You can get ruby from [url="http://www.ruby-lang.org"]www.ruby-lang.org[/url]. You can see my code snippets on making widgets using fxRuby (fxRuby is downloaded seperatly from ruby, unless you get the one click installer, which installs …

Member Avatar for pkc
0
422
Member Avatar for fraogongi

Hi y'all, I've run into problems while running my program in eclipse. Its a Jruby application that uses Glimmer to create GUI components. I've followed the instructions as in [url]www.indijava.in/community/article/Glimmer-Using-Ruby-to-Build-SWT-User-Interfaces[/url] within eclipse, yet I can't seem to get it work. Am trying to run a simple example as the one …

Member Avatar for reflexer
0
132
Member Avatar for michelle1

Hi there, QUESTION: Whilst "parse(argv)" is obvious, what does "opts.parse!(argv)" do in the below code? And what is the word use to describe doing this? CONTEXT: I am looking at a class called 'Options' whose job is to parse command line options which get passed to a program called 'PartInspector'. …

0
86
Member Avatar for skrithikaa

Hi, How do you create HTML files using RUBY. I have a requirement where I need to set color and font of the text, and also provide formatting options for tables having different colors for rows and border(on/off). Can anybody tell how to do this Thanks, K

Member Avatar for skrithikaa
0
3K
Member Avatar for michelle1

Hello there, [B]Ruby Version Installed:[/B] ruby 1.9.1 (2008-10-28 revision 19983) [i386-mswin32] [B]Operating Systems:[/B] Windows XP (both PC and laptop) [B]Laptop:[/B] I can run a gem command on with no problem [B]PC: [/B][COLOR="Red"] gem won't work despite that ruby works fine. I get this message for any gem command: [/COLOR] [CODE]% …

Member Avatar for michelle1
0
345
Member Avatar for tiger86

Hey; I have 6 months of work done in PHP and I really don't want to re-invent the wheel but I want to use some Ruby in my site. Is it possible to "mix languages" like PHP and ruby or will I run into some major problems? I would really …

Member Avatar for codejoust
0
268
Member Avatar for thegoatboy

Hello Hopefully someone can help me. I am trying to update fields in a mysql database using ruby with dbi, but no matter what I try, i just cannot update the row. I am able to search it, but never update. I search for the right string, then open a …

Member Avatar for thines01
0
228

The End.