469 Topics
Hey, I'm not a programmer at all, but I'm hoping someone could help me solve a problem. I've looked all over Google, Ruby forums, and C/C++ forums but havn't found my answer. I'm trying to generate all possible permutations for 5 digits (1,2,3,4,5), up to and including 6 digits long, …
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 …
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) …
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 …
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 …
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. …
I'm an experienced web developer in the confines of a .net environment. I'll looking to start working on a desktop application, but I'd like to steer away from .net. The programming language should meet the following criteria: - High level Object Oriented (higher than C, more like C#) - Not …
hello, I'm currently a PHP developer and I'm looking to learn new languages, what i found a good chose is ruby on rails. from what i came to know that ruby is much easier and fast way to develop web apps and uses techniques like MVC and DRY. however is …
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 …
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 …
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, …
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 …
Greetings. I've tried about 8 different methods of getting this done and am stumped. I need ideas. I need code to walk thru a hash, comparing each element against a string in case insensitive fashion. If the string is found to be a substring of any of the elements, the …
Okay how do you play Geek Auction? it's Pretty simple. You put how long you've been working in the field your in, how long you have worked with computers, anything that would promote yourself. Then others say how much they think your worth by DWJ points (Dani Web Joke Points) …
any information regarding ruby on rails with php.iam working on oscommerce now.i want to learn ROR
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 …
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 …
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 …
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] <% …
Hi everybody, I'm a rater infrequent user of this forum. I'm studying International Media and Computer Science and one of my courses is called Gender & Computing. I'm supposed to write an essay on a topic which I was free to choose. While working on my bachelor's thesis I had …
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 …
Hi am a new programmer and i am a CS/Graphics major. i have already learned Python, xHTML/CSS and i am in the current stage of learning java( i don't think this top portion really mattered) my question is what should i learn next? PHP or Ruby on Rails? i am …
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
Hello everyone. I have created a sales system for my company. Basically you telnet to the system and enter your login name, password ... From there you can access the sales system. I am working on a feature to write reports for a certain area of the system. For this, …
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 …
[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 …
(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 …
I personally use Ruby for a lot of general scripting off of the web (e.g., creating GUIs with FxRuby). I went to try and find some Ruby info and the first place I went was the Software Development area. After I couldn't find a Ruby forum in there, I looked …
Is there any such thing as destructors in ruby. I am trying to figure out how to destroy an object.
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 …
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 = …
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 …
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) …
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 …
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 …
Hi there! We're a Vancouver, Canada-based shop developing a 3D / web-based virtual worlds platform with Ruby on Rails. We're looking for beta testers, so if anyone's interested in 3D web stuff and cares to try a demo, please drop by: <URL SNIPPED> (see also a [URL="http://www.youtube.com/watch?v=VkH9GuSI184&fmt=6"]YouTube video[/URL]) We're also …
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 …
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 …
Ok, I've got a newbish question that Google is turning up tons of different answers too....hopefully I can get some interactive input. I've been working in Microsoft shops doing web development for going on 10 years now. I'm very familiar with SQL Server and classic ASP, and that is what …
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?
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, …
Hi- I have a javascript string variable: var string1 = "blah blah blah"; ....and after some operations are done to it (NOT directly by the user but triggered instead by events happening in the background) I want to pass it back to the server to be saved in the database …
hi I have installed Ruby 1.8.5-21 and also installed the watir gem. but when i use the below statement require 'watir' #i get the below error ./watir.rb:4: uninitialized constant Watir (NameError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from watir.rb:2 >Exit code: 1 please tell me how to prevent this error. …
I am a member of a QA/testing team for a software company in NYC. We have decided recently to begin the development of scripting tools to automate repetitive tasks used during our testing cycles. We have decided to use Ruby. Although we have admired Ruby from afar for some time …
So I'm new to Ruby and this code that I am supposed to be changing is using f.check_box for check boxes. The point of the boxes are to enable or disable specific qualities of a calendar. The problem is that I need to add another item (and therefore checkbox) to …
im making a dynamic table in ruby on rails in which im displaying devices in a table and corresponding to each device i want to show its status which is ibtained dynamically by an ajax function (periodically_call_remote) which updates a div. its working fine but its updating only the first …
Hi I m new to ruby so kindly forgive for small mistakes. I m trying to invoke a c function in ruby which uses a structure * as a parameter but i m able to run in one example and it is not running in the other case. Program which …
Hi I am new to ruby and these forums. I am interested in using Ruby on Rails and was wondering if anybody could tell me any good books that would help me. Also do I need to know any other languages before starting rails. Thanks!
Hello all- I'm looking for some advice.... As a newbie to rails and ajax I've been enlisted to add a feature to an existing application. In a page where users create new accounts I need to add some kind of observer to the form that checks to see if an …
The End.