I'm trying to find and replacace the string "placeholder" in a text file. Any idea how I could get the following code to work?
file = File.open('/folder/template.txt', 'r+')
file.g...
I am attempting to create two things. The first is a image that links to a find_all page that displays a list of all the data in a database. Below is the code found in the controller file busi...
Hello
Need to compare 2 files (column 1 data only in both files - unique count) and output the difference.
Note: to compare like for like I need to strip out "Availability" in File1 Column1 ...
Dear experts,
I am trying the feature of rake db:migrate
And during the trial I did:
* clean up unused model, controller, and unused create_"model".rb (at db/migrate folder)
* renumber...
So, jumping on this Ruby on Rails bandwagon. Obviously there are a number of conceptual hurdles for me to tackle, coming from a less structured do-it-yourself background (Perl mostly). As with...
I was wondering if there is a way to update more than one DIV at a time with a single observer or if this can only be done with multiple observers.
Thanks,
Grant
Hello
Below is a script which Gertone kindly helped me with and was wondering rather than write in each individual file within the script (as I can have lots of files) - I would like to join ...
Dear experts,
Anybody have information / sample / tutorial on how to write "multiple" AJAX calls in Ruby on Rails?
I wonder why there is no such (multiple AJAX calls) information at Agil...
Hi all, trying to make a swear word filter and i got this piece off of some website:
class String
def to_clean_english(bad_words = %w(stupid moron dumbass retard))
bad_words.inject(se...
Someone has had to have done this before and I am looking for a good way to do it.
How can I get the click on the link to run the AJAX function to populate & reveal (Prototype slide effect)...
Hello!
Fairly simple problem. I've been learning ruby/rails for about a week.
I have set-up the basics, linked to a MySql db, learned about migrations etc.
One of the fields in m...
Hi, I'm brand new to trying to learn ROR. I just downloaded and installed Ruby on Instant Rails and all went well... I believe... Cookbook app included w/ Ruby on Instant Rails v2.02 works fin...
Goodafternoon,
I have got a minimum Mongrel instance running (see ruby code) and i am hitting it with an Ajax request using Prototype. (see javascript code) I get the 'onLoading' event, but...
Hey folks,
I'm creating a Rails application, which has an Admin Panel. All the controllers that belong to the Admin Panel are stored in the subdirectory controllers/admin, but there is an adm...
dear experts,
I have a simple helper at ruby on rails (refer to the code below). Although it works fine (no error), but the one that been executed is only the second line. It will only disp...
I am trying to pass an array that I have created into an ActionView::Partials render. Is this the right approach or am I going in the wrong direction? When I tried to use it I kept getting a...
Does Active Record have a method that takes in an Array and searches a table where a certain field is like every element in the Array?
What I want to do is to pass in an Array of strings an...
Hello
Below is my code to count lines & words in a txt file - which works. How can I modify this to count lines & words in Microsoft Word.doc file?
My attempt thus far:
lines = File.readlin...
I have a number of tables in an a mysql database all of which contain data. I find that I need to add a column to one of the tables and would like to do so without loosing the data already co...
Hey Guys,
I am working on migrating a Ruby on Rials website from a Linux server to Windows server. I installed Instant Rials on the Windows server.
I also think there is a quick setup co...
what is the best environment to run ROR (both windows/linux)? i am new to this ROR, just started learning .. reading the articles... not sure how to run and see the output ..i have windows env...
Hello
New to Ruby!
If I create a simple script whereby I want the results (when run) to be saved out to a .txt file
How is this done - my script, for now, is as follows ........
line_count...
My background is in visual basic 6 and little asp (earlier visual foxpro, clipper ) with the strong SQL store proc.I have been a programmer for about 15 yrs and now stay home mom for past 3 1/...
Hello
Not sure if Ruby is suited to the following or not?
In a given worksheet certain text can be repeated in any given cell - Ideally I would like an Input box where I can type in text to...
When I try to access the RoR home page on http://localhost:3000, I see the page. But, when I try to access the same using the network host name of my machine, the page fails to load.
telnet...