Ruby on Rails »
Rails taking too much ramSat, 28 Aug 2010 17:25:07 UT
Hi, I am trying to deploy my application that requires rails-2.3.8, ferret_server running in background(DRB) and workling_client+sterling. Above configuration is running on a VPS with 512MB, latest Ruby Enterpise Edition+ passenger+nginx+mysql. But I continue to see out of memory issues. What I notice that every ruby thread is consuming 15%of 512MB(from
Ubuntu Local Ruby Server Help
Sat, 28 Aug 2010 18:06:33 UT
Hello everyone, I'm extremely new to Ubuntu, and kind of new to Ruby on Rails. I have a question that I was hoping someone come kindly help me with. My company has recently purchased a Facebook script that has been developed with Ruby on Rails and I am trying to setup the development environment on my local machine. However, the server won't run.
validates_uniqueness_of missing in rails 3.0 rc2?
Sat, 28 Aug 2010 19:32:08 UT
Has anybody noticed validates_uniqueness_of missing in rails 3.0 rc2? I'm not sure if this is a bug or I'm just doing something wrong. Here's what I'm doing. Class 1: class Title < ActiveRecord::Base validates_length_of :language, :is => 3 validates_uniqueness_of :language, :scope => :book_id
Using Logger to Create a Root-Owned Log File
Thu, 26 Aug 2010 23:54:09 UT
I have an application which I want to write log entries to its own separate log file in the log directory. Of course the log directory is owned by root and has permissions 755. I was expecting that Logger would operate setuid root or something similar so that it would be able to write log entries to root-owned log directories. I find that
Rails 3 install on Ruby Enterprise
Fri, 27 Aug 2010 00:35:11 UT
hi there - attempting to sudo gem install rails --pre on a system running ruby enterprise-1.8.7-2010.02. however, I'm getting an error: active model requires i18n before you say anything, I already ran the dependent gems install, too: gem install tzinfo builder memcache-client rack rack-test rack-mount
Children of the Nations' Rubyist has gone missing! [Job]
Fri, 27 Aug 2010 01:49:03 UT
Children of the Nations [cotni.org] is seeking a seasoned RoR programmer who wants to make a difference in orphaned and destitute children’s lives. PLEASE only those with intermediate to advanced Ruby on Rails experience need apply, as this is a prerequisite. Although this is a full-time position, we will consider applicants only able to work half-time.
need help on YouTube_model plugin
Fri, 27 Aug 2010 02:27:30 UT
I used YouTube_Model plugin to display videos of a user. it works fine but gives only top most 25 results. i dono how to get other videos. Please can anybody help me? -nirosh-
error using nested attributes
Fri, 27 Aug 2010 04:14:24 UT
I have following models class User < ActiveRecord::Base belongs_to :user_type has_many :addresses, :as =>:addressee, :dependent => :destroy has_many :photos,:as => :asset,:dependent => :destroy accepts_nested_attributes_for :addresses, :allow_destroy => true accepts_nested_attributes_for :photos, :allow_destroy => true
Dynamic creation of layouts at runtime
Fri, 27 Aug 2010 04:56:13 UT
I've learned how to dynamically change which layout is used at runtime, but I now have a question of whether it is possible to create new layouts (or modify existing ones) at runtime and have the app automatically recognize those changes? If so could you point me to an example or explain how it would be done.
count of records meeting condition
Fri, 27 Aug 2010 05:13:19 UT
Forgive this question, but I'm new to rails, and my SQL is rather rusty. I have a line like so to get all records for a particular time period: @recordings_for_period = Recording.find(:all, :order => "date_of_event DESC", :conditions => ["date_of_event >= ? AND date_of_event < ?", start_date, end_date])
if nested attribute is blank
Fri, 27 Aug 2010 05:47:17 UT
HI, I need to know if any nested attributes is blank then how it would work? e.g - In my case user have addresses & photos(nested attributes) but not mandatory while adding user if i haven't added photos & submit form then while editing that user it will not shown me photo upload field because photo object is not exist for that user
Cannot convert string to integer error with arrays and hash
Fri, 27 Aug 2010 07:33:45 UT
Ok so I am trying to read a hash of arrays and I seem to be getting a cannot convert string to integer error. Here is my code: <% @information['food']['servings '].each do |servings| %> <% servings['serving'].each do |serving| %> <%= serving['name'] %> <br/> <% end %> <% end %> Here is what the hash looks like:
Syntax highlighting in IRB || Script/Console
Fri, 27 Aug 2010 08:44:48 UT
Railers, I would like to know if there is a way of changing colors for IRB standard input ($stdin). What I am interested in "is having IRB highlighting syntax as I type". Among other stuff, I would like to be able to: - set its background colours - have differing colours for strings, variables, keywords, e.t.c.
Stylesheets in PDF (Prawn)
Fri, 27 Aug 2010 08:53:58 UT
Hi, Can we use stylesheet classes inside Pdf reports? i am trying to change the header_color from b7e3fe to .heading oh the stylesheet, inside the table file:heading.pdf.prawn texts=[""],[""] pdf.table texts, :headers => [" Heading "], :header_color => 'b7e3fe', file: public/stylesheets/style.css
Multipart email - HTML & document files
Fri, 27 Aug 2010 08:58:07 UT
What I want, and can't seem to achieve, is to send an html email with an attachment. As it stands, I can do one or the other and aren't sure how to get both to work. Mailer: [link] Corresponding view: [link] Can anyone give me some assistance with this or point me to some
How to add to a collection_select collection?
Fri, 27 Aug 2010 09:33:25 UT
Hello everyone, I have a method that goes through a hash of arrays and i need to be able to add the name value and the id value to a drop down menu. How would I do this? Many thanks, jakx12
drop down
Fri, 27 Aug 2010 11:35:13 UT
Guys, I have a partial for a form here: <% form_remote_tag(:controller => "posts", :action => "create") do %> <%= label_tag(:title, "Title") %><br /> <%= text_area_tag(:title, nil) %><br /> <%= label_tag(:body, "Description") %><br /> <%= text_area_tag(:body, nil) %><br /> <%= submit_tag("Post") %>
cannot insert data into mysql
Fri, 27 Aug 2010 12:29:12 UT
When I am going to create a new product Item into my depot application I got the following error: Mysql::Error: #23000Duplicate entry '0' for key 1: INSERT INTO products (`image_url`, `date_available`, `price`, `title`, `description`) VALUES('[link], '2010-08-27 12:23:00', '90.0', 'jjhjh', 'hgjgjhjkhjhkhkkkkkhkhkhkh')
Recording a Live Earning Cast call
Fri, 27 Aug 2010 12:30:47 UT
Hi all, I am working on a project, in this I am assigned a task, this task consist of recording a live earning cast call when administrator press single button for that event. The Earning cast call are basically conference calls which happen at the company premises. How can I implement this recording functionality in ROR,
Sort table by price and print the cheapest price car
Fri, 27 Aug 2010 12:50:16 UT
Hello, I am quite new to ruby. I have coded in Java earlier and the code to fire a query in ruby is a lot different and I am struggling. I have this model create_table "used_cars", :force => true do |t| t.string "make" t.string "model" t.string "trim" t.decimal "engine_size_cc"



