322 Topics

Member Avatar for
Member Avatar for Suneetha Reddy

[code=ruby] i am new person to ruby.can any one tell me what is ruby? what is ruby purpose?.why it is used?. plz tell me reference sites [/code]

Member Avatar for MariaERamos
0
140
Member Avatar for superjacent

In learning Ruby I've dug out some old C++ exercises and one in particular which can be found [URL="http://prime357.net/node/80"]here [/URL]deals with a for loop. I'm basically converting the C++ code to Ruby code. I won't repeat the C++ code but the exercise is as follows: Write a C++ program that …

Member Avatar for superjacent
0
149
Member Avatar for shekarls

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 ftp.connect(URL,21) ftp.login(username,passwd) ftp.chdir(directory) …

0
96
Member Avatar for superjacent

How do I configure SciTE so that when code ( gets() ) asks for user input I can enter that input via the output console. At present, all that happens is a 'Terminate' button appears in the output console. If the code doesn't contain any keyboard input, then all is …

0
103
Member Avatar for clai2x

please excuse me, i'm not a developer but a tester and i'm no good at doing programming stuff and all. im into automation now for my testing and i choose to use ruby for it but i have a problem hope you guys could help me out of this... i …

0
94
Member Avatar for superjacent

I dabbled in Ruby quite a while ago but only at the console level. I didn't take it any further at the time. I'm now considering treating it more seriously this time, though I'd have to start from the start. My understanding is that Ruby is a cross-platform development language. …

Member Avatar for fraogongi
0
164
Member Avatar for vesper967

So I'm writing a program that reads in a file which has each word on a different line. The program is supposed to loop through the file in such a way that when it reads a line and gets to the end of the line it adds that word to …

0
68
Member Avatar for pasabeer

Is it possible to create dynamic menu items for a web application. While clicking on one menu item, it should expand and show the child menu items. While clicking again it should collapse the menu and hide the children. While clicking on child menu item, it should show the corresponding …

Member Avatar for Jennysmithuk
0
131
Member Avatar for EdTheUniqueGeek

Hello. I am completely new to web development but want to learn Ruby, and maybe PHP. I am currently a Sys Admin working in a Windows environment but I am very familiar with Linux OS server platforms also having built and run both a Windows and Linux web, MS SQL, …

0
87
Member Avatar for sum1

Hi, I have created a DB connection using OCI and got a record(type: varchar2), but I'm unable to compare it with a string (this is string is same as the one which I retrieved from DB). Below given is a code [code=ruby]conn = OCI8.new('username', 'pwd', 'DBNAME'); cursor = conn.exec('select fieldname …

0
62
Member Avatar for hericles

Hi, I recently started reading up on Ruby on Rails and decided to install it so I could give it a go. I found some inconsistencies and problems that I hope I can get some help with. First, when creating a project I used the ruby script/generate command and it …

Member Avatar for BoomerBrian
0
137
Member Avatar for clem_c_rock

This seems so easy but I keep hitting a brick wall on this. I have this modeling: [code] class User < ActiveRecord::Base has_many :friendships has_many :friends, :through => :friendships #... end class Friendship < ActiveRecord::Base belongs_to :user belongs_to :friend, :class_name => 'User', :foreign_key => 'friend_id' end [/code] I have these …

Member Avatar for TomK32
0
52
Member Avatar for clem_c_rock

Hello, I have an address table that has a HABTM relationship w/ a preferences table. I want to set the preferences table to handle a variety of preferences for each address. For instance, for each address the preferences table could carry values for make_private = t/f, report_updates=t/f ect. In my …

0
72
Member Avatar for clem_c_rock

I have a strange situation. I want to have a create_user form w/ all the fields blank When I call the create_user method, the corresponding create_user.html.erb form is displaying the first record's data from the user table in the form fields Here's a quick view of my form: [code] <% …

Member Avatar for clem_c_rock
0
97
Member Avatar for manisha

Hi friends. I am trying to install Ruby on rails on Linux platform.The OS i am using is Ubuntu. I am new to both Linux and RoR .So really need help.Here is the code i tried to run and the result : [QUOTE]manisha@manisha-desktop:~$ sudo gem install rails --include-dependencies /usr/bin/gem:11:Warning: Gem::manage_gems …

Member Avatar for MrAntonio
0
149
Member Avatar for mcmohd

Dear Friends, If you are a Ruby programmer then its worth to have a look into this link. They have covered many good subjects on Ruby. [url]http://www.tutorialspoint.com/ruby/[/url] Thanks M.M

Member Avatar for Secret-
0
236
Member Avatar for Debadipta

I'm facing a problem while installing rails. I tried with the following commands individually but failed. They are: 1) gem install rails --include-dependencies 2) gem install rails -v=1.8.6 Error messages displayed: Could not find rails in local or repository Could not find ...... "http://gem/......" One more doubt is that is …

Member Avatar for destin
0
67
Member Avatar for yadavshubhanshu

[CODE] ....... ........... 1.upto(n){ str = gets.chomp if str.length > max max = str.length maxstr = str elsif str.length = max if str > maxstr maxstr = str end end } ........... [/CODE] this piece of code is giving me an error in the elsif line saying that [undefined method …

Member Avatar for destin
0
54
Member Avatar for Ziga

(Repost from Ruby-Forum.com. Sorry, but I'm really etching to continue learning Ruby..) In [URL="http://poignantguide.net/ruby/chapter-5.html"]w(p)gtr[/URL] I have found myself facing a code which, for the life of me, I just could not understand a few thing in! Seeing as this is the closest board realting to the subject, I shall post …

Member Avatar for Ziga
0
162
Member Avatar for kinger29

Is there any such thing as destructors in ruby. I am trying to figure out how to destroy an object.

Member Avatar for destin
0
107
Member Avatar for kinger29

I am trying to search through a string to find the number of occurences of a substring. I am doing this for all the strings in an array of strings. I only have figured out the while loops so far. How can I traverse through an array of strings using …

Member Avatar for destin
0
92
Member Avatar for needhelp83

This is my first program and Ruby and I am trying to get some help on writing a BST. [ICODE] require 'rational' class BST def insert(newo) if ! @o @o = newo else case @o <=> newo when 1 @left = BST.new if ! @left @left.insert(newo) when -1 @right = …

0
63
Member Avatar for clem_c_rock

Hello, I'm trying to get the backbone of a rails project up and running on localhost and also on a rails playground hosted site. On localhost the app runs great and I can call my say/hello w/ either: [url]http://localhost:3000/controller/say/hello[/url] or [url]http://localhost:3000/say/hello[/url], but when I try this on my rails playground …

Member Avatar for clem_c_rock
0
126
Member Avatar for slogeshwaran

Hello, I have to send mail to multiple recipients. I have one text file, it contains emailaddress. In ruby program i should parse the emailaddresses and send to multiple recipients. for example. Just parsing it into an Array and either iterate over the array (sending one e-mail for each address) …

Member Avatar for amithasija
0
279
Member Avatar for amithasija

hi everybody, i want to access the images stored in /public/images folder through url, means if my application is running on port-3000,than i want to access the images folder using localhost with this port in url.so that i can see any image in that folder just by changing name in …

Member Avatar for jrichter
0
113
Member Avatar for vhaerun

hi guys ! I'm kinda new to ruby , and was wondering about the following stuff , assume the following code : [code] Shoes.app { button("Press Me") { alert("You pressed me") } } [/code] how could I write code like that , so that when I call a method like …

0
67
Member Avatar for wjordan1987

Hello, I'm new to ruby I tried to view my webpage on the webrick server and this error came up. I made the webpage in notepage. All its says is "Hello World". I saved the ruby doc in the controllers folder as say_controller.rb and saved the notepad doc in the …

Member Avatar for MitkOK
0
78
Member Avatar for iam

I've been lurking on DaniWeb for a while now and have finally got round to registering, particuarly after realising it had a Ruby forum. I've been playing with Ruby for a couple of months now and am in love with its common sense approach to programming, and makes the likes …

Member Avatar for peter_budo
0
223
Member Avatar for nanodano

I think it is unfair to stick the Ruby discussion forum inside Web Development. Ruby on Rails is a really handy web framework, but Ruby has other capabilities. I think it should be put under Software Development, does anyone agree?

Member Avatar for peter_budo
0
236
Member Avatar for drweb

Hi All! I need to parse a piece Ruby source code file. For that purpose, I need a Ruby parser (which can be used on windows plateform). I tried to configure ruby_parser 1.0, but I am unable to configure it on windows XP, as it is depending upon RACC parser, …

0
79

The End.