322 Topics

Member Avatar for
Member Avatar for jember

What is the best IDE that I should use to make a program using Ruby Language? And where can I download it for free? I'm self studying. :)

Member Avatar for kvprajapati
1
191
Member Avatar for benjaminFowl87

Hi I have my initialise constructor, why won't my function to_hash work ? [CODE]def initialize(msg) @original_msg = msg.strip.delete(' ') s = ["|","^"] @chunked_msg = @original_msg.split(s[0]) @msg_hash.self.to_hash end def to_hash @chunked_msg.each do |x| s = x.split("=") @msg_hash[s[0]] = s[1] end return @msg_hash end[/CODE]

Member Avatar for benjaminFowl87
0
98
Member Avatar for kishang09
Member Avatar for kvprajapati
0
92
Member Avatar for jhonnatas

hi guys i need some help,i have installed ruby 1.91+rails 3.0+radrails 0.7.2 bu twhen im using the radrails it cant start the server it keeps like: "starting the server" and it never works! rails path: C:\Ruby192\bin\rails rake path: C:\Ruby192\bin\rake it says it cant load script/server thanks

Member Avatar for 3magic
0
141
Member Avatar for gisek

Hi, I encountered a problem with threads in ruby. I created such a script: [CODE] require 'thread' def func $i = 0 while true $i += 1 $file.write("bbbb\n") Thread.pass end end def func2 $j = 0 while true $j += 3 $file.write("aaaa\n") Thread.pass end end def funcTerm while true a …

0
75
Member Avatar for nullSpace

Im trying to add new records to my joins table. but when ever i click my link to do so i get this error [QUOTE]uninitialized constant Channel::UsersChannel[/QUOTE] here is the code [CODE] <%= link_to "Subscribe to Channel", subscribe_path(channel, current_user) %>[/CODE] [CODE] def subscribe @channel = Channel.find(params[:channel_id]) @user = current_user @channel.users …

0
113
Member Avatar for Clawsy

Hello, I use Ruby with Sinatra in my application and I need to store a big data (exceeding 4K) in my session or somewhere secude on the server because I do some API calls and I refer to that data very often and that's why I need it stored. The …

Member Avatar for Clawsy
0
420
Member Avatar for dammmm

Hello, I am looking for some fullscript/CMS ready-made which would help me to see how to articulate and merge ruby/html/MySql. I allready worked on these different languages but have difficulties into merging all of them togheter to create a website. I thank you in advance, Damiano from Nicaragua! :)

0
68
Member Avatar for overlook

Greetings, I am trying to allign horizontal between this two submit button, but I do not understand how to do it, this codes below will show two button (submit1) and (submit2), but located vertically. I need to allign it as horizontal so submit2 button is located horizontally next to submit1 …

0
75
Member Avatar for asimzeeshan

I am running CPanel and recently discovered that I can install RubyonRails there too ([url]http://docs.cpanel.net/twiki/bin/view/AllDocumentation/RubyonRails/WebHome[/url]) I have the new icon RUBY ON RAILS in my CPanel (after installation following the instruction from the link above). Now when I create a test application, it runs OK but when I click on …

Member Avatar for gacela
0
289
Member Avatar for laddu2098

[COLOR="Green"]hello every one hi i am new to daniweb i think i will find a solution in daniweb. hi i wanted to change my php melody1.6.4 url structure my url structure is like this [url]http://example.com/frozen/frozen-2010-movie-video_1c4063b5a.html[/url] i wanted to change it to like this [url]http://example.com/frozen/frozen2010movie/1c4063b5a[/url] i have spent my valuable time …

Member Avatar for laddu2098
0
179
Member Avatar for Mysteri

Hi, I'm a web developer and wanted to try ruby. I installed ruby 1.8 on my debian server with eruby and mod_ruby for apache2. Apache config files are configured correctly to accept .rhtml files and parse them. If I type sth like <% print "Test" %> then there's no problem, …

0
91
Member Avatar for SWEngineer

I have a view file, "show.html.erb", and a Javascript file, "coordinate.js". In coordinate.js" I have methods to calculate the width and height of an image. How can I call those methods on the "Canvas" in my view. And, below you can find the scripts of the two files: [B]* show.html.erb[/B] …

Member Avatar for SWEngineer
0
96
Member Avatar for thiliniss

I like to learn Ruby.but I didnt use it.I have already used as J2EE.I dont know about Ruby?What is this Ruby??????

Member Avatar for zark_yoc
-2
78
Member Avatar for hassancool

Hi there...... I have received a domain from a customer which is showing me very strange things..... When I tried to login via FTP it showed me empty directory.... The server is apache and when I try to login via cpanel it gives me this error "Not Found The requested …

Member Avatar for Excizted
0
151
Member Avatar for alexgv14

[url]http://keyonary.com[/url] When you search for something like paste all of the keyboard shortcuts slide up on your browser. I know its making a ajax requested and then using jquery for the effect. BUt how is it done. Is there a plug-in or anything in ruby that is similar.

Member Avatar for Excizted
0
62
Member Avatar for tiger86

This is not an advertisement, this is purely a thread telling people about resources that I've found, well resourceful. For those who are stuck with Ruby on Rails or need to learn the basics you should check out the free videos by Ryan Bates at [url]www.railscasts.com[/url], they've helped me a …

Member Avatar for tallship
0
415
Member Avatar for Jothe

Hi people, am trying to start a ruby on rails project, however i only know a bit of ruby but nothing on rails.So does anyone who can point me to the right locations for Good resource material either site or books would be highly appreciated..

-1
67
Member Avatar for stilllearning

I am really new to this, so please excuse me if this is a dumb question. I am saving some data using ruby on rails and one of those fields is a background for the divs I am rendering back on load. I created the partial layouts successfully but I …

Member Avatar for blocblue
0
115
Member Avatar for alexgv14

My observe field doesn't do anything any idea why. [CODE]<%= observe_field 'keyword', :frequency => 0.5, :update => 'results', :loading => "Element.show('.spinner')", :complete => "Element.hide('.spinner')", :url => { :action=> 'search_results' }, :with => 'keyword' %> <%= form_remote_tag :url =>{ :action => :search_results }, :update => "results", :loading => "$('.spinner').show()", :complete => …

0
100
Member Avatar for alexgv14

I am working on a search function on RoR that basically just has a cool visual effect when a user clicks the search button. Here is the code in my view for search.rhtml [CODE]<html> <head> <title>Tutor</title> <%= javascript_include_tag :defaults %> </head> <body> <h1></h1> <%= form_remote_tag :url =>{ :action => :search_results …

0
139
Member Avatar for Member 785602

I've just upgraded an existing app from Rails 1.2.5 (Ruby 1.8.5) to Rails 2.3.8. There were several issues to the upgrade including finding and installing a good MySQL gem (dll in my case). This app worked fine on Rails 1.2.5 but I needed to upgrade for security concerns. There are …

0
71
Member Avatar for johndoe444

problem with this code: [CODE]parseIcmPage url, '<ul id="topListFilter"', '<div id="footer">' def parseIcmPage(url, start_point, end_point) data = getHtmlPage url s = data.index(start_point) e = data.index(end_point, s) len = e-s list_str = data.index[s, len] puts list_str, '\n' end[/CODE] [CODE]icm.rb:42: warning: don't put space before argument parentheses ./util.rb:121:in `index': wrong number of arguments …

Member Avatar for craiggles
0
230
Member Avatar for mattitude

So far today has been one of those days where I can't get anything to work. For the past three hours, I have been trying to require tmail library, and trying to connect to my mail server with imap. Here is a brief session illustrating my frustration. [CODE]irb(main):001:0> require 'net/smtp' …

Member Avatar for tiger86
0
294
Member Avatar for mattitude

I have a ruby program that is supposed to send e-mails, and the exact code worked before, but won't work now. Can anyone help me understand why? Here's the code: [CODE] STDOUT.sync = true require 'net/smtp' require 'rubygems' require 'hpricot' require 'open-uri' Net::SMTP.start('smtp-server.cfl.rr.com', 25) do |smtp| smtp.open_message_stream('MBECK88@cfl.rr.com', ['mbeck@knights.ucf.edu']) do |f| …

Member Avatar for tiger86
0
90
Member Avatar for bitsynthesis

Upflickr is a ruby gem that makes it easy to add basic image uploading and organizing functionality to ruby scripts or apps. For installation and usage documentation, please visit the project homepage: [url]http://bitsynthesis.com/upflickr[/url]

0
124
Member Avatar for hawksury

Hi, I am having a problem when trying to restrict the size of the file to a certain size. My aim is to create [U]new files [/U]and [U]each file [/U]of a specific size. I am creating these new files by copying the contents over to these new files from a …

Member Avatar for Zoon
0
95
Member Avatar for johndoe444

I have some web page which contains accented words (in french/italian etc) which I need to parse/extract and display. But the internationalization is not being taken into consideration so crazy characters are being shown. I searched in google for ruby internationalization but came up with rails internationalization. As you know …

Member Avatar for kallin
0
113
Member Avatar for jakx12

Hey ok so im getting this error. no idea why, could you guys help? Controller action - [CODE]def confirm @title = "Confirm" if request.post? confirmation = params[:confirmation] account = Account.find_by_username_and_confirmation_code(params[:confirmation].username, params[:confirmation].code) if !account.nil? account = Account.update_attribute("confirmation_code", "") if account.save flash[:success] = "Congratulations you have now confirmed your email!" redirect_to :action …

0
67
Member Avatar for yumarksman
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
346
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
203
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
141
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
185
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
144
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
74
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
124
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
168
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
678
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
266
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
88
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
114
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
126
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
550
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
105
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
66
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
88
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
58
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
155
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
526

The End.