Advertisement

900 organizations, including eBay, Ericsson and Lockheed Martin, now work smarter with Corporate Accounts. Save up to 42%!

 

Welcome! If you have any general questions about Experts Exchange, feel free to ask me.

 
Time Tested Ruby Solutions: 1 - 25 of 156
 
Basically I have one string that I need to break out into seperate parts.  I'm still not great with ruby functions so just need a little help. I start with a string that looks like the foll...
Hello Just started playing with rails - very first app - hello world. when opening a browser  - URL http://localhost:3000/say/hello - to run this app I get the following error message in the...
dallasray@justis:~$ sudo gem install mongrel mongrel_rails Select which gem to install for your platform (i486-linux)  1. mongrel 1.1.3 (java)  2. mongrel 1.1.3 (i386-mswin32)  3. mongrel ...
Dear experts, In RoR there is a function called link_to_remote(name, options = {}, html_options = {}) where we can write an AJAX link. This is the example for Rails API   link_to_r...
I have an installation of LAMP through XAMPP; i.e. I have PHP, MySql, Apache configured. I also downloaded Ruby and installed Rails through Ruby Gems command line. What do I do next? How d...
I have been running Ruby on a CentOS vps for a while with no problems.  I have been running 1.8.4, which was installed using Yum.  I want to upgrade to 1.8.6, but Yum can't seem to find this v...
I have the need to create a large number of check boxes (22), and then write the values to a single entry within Ruby on Rails. The user will fill out a form, and select the check boxes for...
I am generating a list from a collection using partials.  In each row of the list I am using a checkbox which the user can use to set the "on-off" state of that item.  The intent is when the u...
I am trying to get my submission form to disable it's submit button until turned back on by RJS.  Here is how I am doing it and if someone can suggest a solution that would be great.  i just n...
I forgot to put any code in the 'down' section. How do I undo a 'rake db:migrate'?
I have a one-to-many relationship between a 'file' and a 'directory'.  What I'd like is that in the 'file' scaffolding (maybe view is more appropriate?), a dropdown with all 'directory' listin...
I am trying to iterate thru a table in a webpage. This works:: table = ie.table(:index,5) <- it finds the correct table in the page This works::xtable = ie.table(:index,5).row_count() <- it ...
Hi experts, I started working with with Ruby and this looks like a rather simple problem I think, but still couldn't solve it. products = Array.new doc.search( "//td[@class='foo']" )....
I am trying to start up a rails project and I run: rake db:create And I get: Couldn't create database for {"encoding"=>"utf8", "username"=>"root", "adapter"=>"mysql", "host"=>"localho...
Hi , I'm trying to format an error message that comes out of save! method but , it keeps going to its default screen.  here 's the code controller   def register     @title ="Register" ...
hi, i've got the following problem: within a view of my rails program i'm trying to open a form in a lightwindow. for this form need one predefined value (the category id from where the form ...
I am installing Ruby On Rails on SLES 10, http://www.novell.com/documentation/sles10/esd/di_sles10_vmware.html. All was fine until I tried to start the console. From Google I think I learne...
I am trying to find the best approach to a selection list in a form that I have. What I have are two selection lists, 'A' & 'B'.  In my database all I store is selection list 'B'.  Selectio...
Hello I am brand new to ruby and was wondering how I can open a file in a different directory. My current script (Phil.rb) reads as follows and is in the same directory as my text file (SC6....
Dear experts, From what i read, RoR has great support to AJAX. My question is how Ruby on Rails compare to Google Web Toolkit? In other words, what does Google Web Toolkit have, that RoR...
This should be simple: text = 'adam|paul|mike' I want to replace that with   ->   <b>adam</b><b>paul</b><b>mike</b> So each name seperated by a |  OR a name at the end of the string s...
HI, I am a complete beginer in Ruby. I want to find out how to open a text file, read every line and remove each occurance of quotes (") in the file using Ruby code. Thanks
Hello My following script is only dumping first line to a file - where as it should contain many hundreds - can someone correct my attempt please. P File.open("U:/Phil_Sivyer/4_B_Man_ho...
Hi, I am trying to use a cron job to render and mail pdf files on a daily basis. Problem is that this code doesn't compile and render the template; it just passes the embedded ruby code o...
This is purely a self learning exercise, I'm not sure whether this is going to be possible or not, though I'm sure it would allow for some great flexibility in future code. What I want, is ...