similar to: Object constructors - Noob Question

Displaying 20 results from an estimated 6000 matches similar to: "Object constructors - Noob Question"

2006 Sep 05
2
question about passing array of AR objects to worker
got a wierd problem maybe someone can help with. whenever i try to pass an array or AR objects to my worker, i end up with a DRb object in the worker...here''s an example class SearchWorker < BackgrounDRb::Rails attr_reader :resources def do_work(resources) logger.info resources.inspect end end class SearchController < ApplicationController def start_search
2006 May 14
2
object class with STI and Polymorphic Assoc''s.
Hi, lets say I have a a table, "Linkings" that I am using for polymorphic associations. One of the associations is to the "person" table, and there are several other associations. "Person" has 2 types, "slacker" and "suckup". It is modelled as such: class Linking < ActiveRecord::Base belongs_to :person belongs_to :linkable, :polymorphic
2006 May 08
2
Noob Question - Variable Scope
I feel awful asking such a basic question, but here it goes.... I have a controller, "NewsController". The user enters and the "list" action is called and I populate an instance variable "@news" which contains all the elements I''d like to display using a form. The user then changes something and the "update" action is called. Is
2006 Apr 11
15
Migrating rails 1.0 app to 1.1 - Noob question
Hi all, I''ve upgraded my system to Rails 1.1.1 successfully. After much looking I haven''t found out how to migrate an existing application to a new rails version though. What is the procedure, if any, for upgrading the application I''ve developed in 1.0? Is there a script I need to run? -- Posted via http://www.ruby-forum.com/.
2006 Jun 15
3
rails-based blog roundup
I''m considering rolling my own rails-based blog, but want to take a look at what''s available first. Here''s what I know about: Typo http://typosphere.org/ Simplelog http://simplelog.net/ Mephisto http://weblog.techno-weenie.net/2006/6/12/mephisto-out-in-the-wild Am I missing anything?? Thanks, -TJ
2006 Apr 27
2
Noob Design Question
I have chunk of data that I need for the life of the session. I am going to use it for selects through out my app. Is the best place to keep this data in the session? Is the session easily spoofed or cracked? While viewing the data is not critical in itself, spoofing it could cause me massive headaches. -- Posted via http://www.ruby-forum.com/.
2006 Apr 19
4
Weird Problem - probably a noob mistake
I was up late last night trying to find the cause of this, but I''m stumped. I have this relatively simple controller to load up a bio. It''s basicly id, name, desc, type (I use STI). class BioController < ApplicationController layout ''layouts/singlepanel'' def index @bio = Bio.find(:all, :conditions => [''site_id = ?'',
2006 May 11
12
Verifying Good Setup of RoR + PostgreSQL
I''ve been reading the RoR tutorials and wiki help stuff, but I''m stuck. :( I''ve got RoR installed properly and get the "Welcome aboard! You''re riding the rails." I have an "article" controller, "article" model, and both an "article" and "articles" views (one is a remnant, I think, and no longer needed) (the
2006 Jul 12
10
Recurring mySQL Error
I am getting the following error when running my app on the server: mysql::Error: Lost connection to MySQL server during query: <some SQL here> The SQL is usually a SHOW FIELDS statement, but after scouring the log files I see that it occassionally happens with other queries as well. I did a little research, and one topic I found suggested that I edit the /etc/mysql/my.cnf and increase
2006 May 10
4
Single Table Inheritance problem
I have two tables I am using single table inheritance with: Page and Item. "Page" has many "Items"; "Item" belongs to "Page". Item Model: class Item < ActiveRecord::Base end class Article < Item belongs_to :page end Page Model: class Page < ActiveRecord::Base end class Issue < Page has_many :articles end In my controller, when I
2006 May 10
12
Strange Behavior on Non-Index Pages
If I browse to \myRoRApp, I get the "Welcome aboard" screen. I''ve done the ruby scripts/generate controller MyTest, and "Rolling with Ruby on Rails" tells me I should be able to browse to \myRoRApp\MyTest and see an error page, but what I''m actually seeing is a fastcgi config file! I have installed fastcgi, but apache can''t "see" the
2010 Feb 06
4
500 Internal Error
I have on ubuntu a digital library application Kete which gives in the log/production.log: Please help, thnx. /!\ FAILSAFE /!\ Fri Feb 05 19:05:08 +0200 2010 Status: 500 Internal Server Error No connection to server (localhost:11211 DEAD (Errno::ECONNREFUSED: Connection refused - connect(2)), will retry at Fri Feb 05 19:05:38 +0200 2010)
2009 Apr 22
3
Error on running any controller- Noob question
Hi , I am running on Vista with webrick ... When I generate controllers , models and views I get an error as under. C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/ dependencies.rb:105:in `const_missing'' C:/ROR_lpapp042109/app/controllers/afflnetworks_controller.rb:5:in `index'' I tried reinstalling but kept stumbling on this. gem -v 1.3.2 rails -v 2.3.2
2009 May 08
2
Malformed HTML
I''m using Mechanize to parse an extraordinarily malformed html page. After submitting a form like so: page = mech.submit(dform) The result I get back is truncated. I suspect that it''s because the source HTML looks like this: <html> <head> yadda yadda</head> <p>some text</p> <html> <table yadda yadda> My
2019 May 31
4
odd msg at top of upsc output
Greetings all; gene at coyote:~$ upsc myups Init SSL without certificate database battery.charge: 100 battery.charge.low: 30 [yadda yadda] Is there a certificate package I should install? Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page
2007 Mar 07
10
Long URLs - New to Mongrel
My rails web app (rails 1.2.1) uploads an image from a Java applet by encoding it into the URL. This works fine when I''m using Webrick. I''m trying out Mongrel today, and I''m getting an error in Safari that says ?lost network connection? (NSURLErrorDomain:-1005). I get something similar in Firefox. Is there a way to make Mongrel accept a really long URL like
2006 Jul 12
5
railsapp/db/migrate Newbie question
I made a mistake when making my first app. I did not use the: ruby script/generate model <modelname> method for creating my models. I more or less hand crafted each og them. Is there a way to go back so I get my db migration scripts to populate? -- Posted via http://www.ruby-forum.com/.
2006 Jan 15
4
Redcloth gem properly installed ... still errors
Hi all, installed redcloth for using the object.attrib.textilize method in a template. Using 3.0.3 because it supoosedly works the best with rails 1.0.0. Keep getting the undefined method error. Did the require thingy, but no luck What would be the most I''m-a-guru place to put the require btw? Thanx. Gerard -- "Who cares if it doesn''t do anything? It was made with
2006 Apr 15
6
Good image API for RoR?
Hi, I need a relatively simple image api for the app I''m writing. I need to copy photos, rename them, and re-size them to put them in a standard format. I tried using RMagick/Imagemagick, but the photos would be corrupted on re-size, so I''m looking for some suggestions. -- Posted via http://www.ruby-forum.com/.
2006 Mar 13
5
Ruby on Rails Applications - To get RSS Feeds
Hi, all I am new to Ruby and also Ruby on Rails. I would like to know how we can get the RSS Feeds and display them in a Ruby on Rails applications. Thanks in Advance, sumi -- Posted via http://www.ruby-forum.com/.