similar to: basic ''find'' question

Displaying 20 results from an estimated 8000 matches similar to: "basic ''find'' question"

2006 Feb 03
9
Because I''m very slow - trying to use console
I can''t see how to use variables so I am using console to test things out... clients table - a column named first_name My very brief console session... >> clients = Client.find_by_sql("select * from clients where first_name = FN") ActiveRecord::StatementInvalid: RuntimeError: ERROR C42703 Mcolumn "fn" does not exist Fparse_expr.c L1034
2006 Feb 03
4
contoller code mysteries
In my controller...this code works def list2 first_name = params[:client][:first_name] @myclients = Client.find(:all, :conditions => ["first_name = :first_name", {:first_name => first_name}]) end this code doesn''t... def list2 first_name = params[:client][:first_name] if first_name searchstring = ''["first_name =
2006 Jan 26
42
ruby script/generate scaffold Product Admin hangs
Hi I am running Mac OX tiger with the installed ruby 1.8.2, and mysql5 (I checked that it was running in preference). I tried to run the various fixes recommended in agileweb. I am stuck on page 57, script/generate scaffold... > Could you paste in your database.yml file, from the > "config" folder inside your Rails app? If you have any > passwords entered there, you should
2006 Feb 15
10
STI Question
Hi everyone, I have 3 types of people (for now): Staff Faculty Students To break them up into classes, but keep them in the same People table, I''ve broken them up like so (code and ''ends'' snipped): class Person < ActiveRecord::Base class Employee < Person class Staff < Employee class Faculty < Employee class Student < Employee So, when I insert
2006 Feb 10
3
Lighttpd segfaults on first access
I just got a new Debian Sarge server and followed the brainspl.at "Debian Lighttpd Rails Stack" tutorial. The only place I deviated was the version of Lighty. The page uses 1.4.7 and I spotted that 1.4.10 was available. I installed that and couldn''t get anywhere. Lighty died on first access from the test rails app, and even from a ultra basic static config. No log,
2006 Aug 16
18
mongrel lighttpd and ssl
I am wanting to one run instance of lighttpd, many many instances of mongrel. I also need ssl but only for one of my sites. I understand that Mongrel does not play with SSL so I am forced to use Lighttpd. I think that lighttpd only handles ssl or non-ssl on any given instance. Is there a way for me to accomplish my goal of one lighttpd with multiple mongrels and the occasional ssl connection? --
2006 Jan 26
2
Run fastcgi in Apache 1.3, or proxy through lighttpd?
I''m working with a guy who has Apache 1.3 installed on his server, and it''s not an option to simply use lighttpd for a Rails application I''m helping him with. I''ve seen that Apache 2 apparently is crappy when it comes to fastcgi, but 1.3 isn''t so bad. I can then either just run my app straight in Apache, or I could proxy it through to lighttpd. Which
2006 Mar 23
2
lighttpd rails
I''m running lighttpd + fastcgi + rails Say that the lighttpd root directory is the rails application /public directory. I''m just curious. If theres a file in the document root with the same name as a controller, does the file get served first? How does that work? Does lighttpd check the root directory first to see if the file exists- If not, it calls dispatch.fcgi? I want to
2006 Jan 09
9
Noob, installing rails on a goDaddy virtual server?
Hi, I''m completely new to all of this. Not even certain this is an appropriate forum for an installation question. I''m just about to plunk down some money to get a virtual server. In looking over the list of isp''s elsewhere on this site, goDaddy isn''t mentioned - probably because they don''t offer rails as a standard distribution. There are some
2007 Dec 18
3
Mongrel + Lighttpd
Hi guys, I''ve been chasing a problem in my web-stack: Lighttpd -> Mongrel -> Rails, and found a problem with the interaction of Lighttpd and Mongrel. If a request takes more than 5 seconds, Lighty will retry it - and then the requests / responses get mixed up in Lighty and it returns a bad response to the client. Not good. I''m convinced that the problem is
2006 Feb 07
14
Production Server That Just Works?
Hi, Love Rails... I''m looking for a Production Quality Server that brings the same ease of use as Rails does to web development. I''ve tried TextDrive, and never got it to work. I''m sure there are good reasons why it didn''t work but they are beyond me. I''ve contacted tech support there several times, and it seems that there are so many setups that
2006 Feb 25
10
Performance issue.. after a while
Hello, I have an project running on a dedicated server: Debian, P4 CPU 3.00GHz, 1GB RAM, ruby 1.8.4 (2005-12-24) [x86_64-linux], rails (1.0.0), activerecord (1.13.2) lighttpd-1.4.10 + fastcgi + mysql 5.0 7 dispatchers. The project is a game, so a typical user would visit 100+ pages. When the server is busiest, it gets 35-40k requests/hour. For some misterious reason after a number of hours the
2005 Dec 15
5
site takes a while to load after first visit in a while
Using lighttpd + fcgi to power a site. When no one has accessed it in a while, the first visit to the page takes a while to load up. Then subsequent visits are fairly fast. Any ideas on how to fix it?
2005 Dec 01
12
Difficult process of restarting SCGI, Lighttpd, Apache, sessions
I''ve managed to get Rails working using Apache->Lighttpd->SCGI. Restarting everything is really difficult. This appears to be the process: - stop apache - stop lighttpd - stop scgi - make sure scgi still isn''t running (it sometimes does) - if it is, kill it - delete all session files (they often cause permission errors) - start scgi - start apache - start lighttpd - cross
2006 Feb 07
4
Can''t stop/start lighttpd
Hello everyone, I?ve been working with Ruby on Rails for about 2 months now and have really enjoyed the ease of use of it. I?m only been doing development on it so I?ve been using WeBrick. Recently, I have built a server running Debian Linux, with ruby 1.8.2, rails 1.0.0, lighty 1.4.3, and Mysql 5.0.18. I used WeBrick to generate a lighttpd.conf file for me, I changed the paths in the
2006 Jun 12
15
Mongrel Now Recommended Setup?
I see that the RubyOnRails.com site has migrated to Mongrel with Apache as a front-end proxy. Is that now the/a recommended setup for Rails apps? We''re still using FCGI but I''m always interested to learn more about other folk''s successful deployment choices. Across all of our sites we''re pumping out about 300k pages per day so anything that saves memory or has
2006 Apr 01
7
Rails Cluster Design
Hello everyone! A collegue and I are beginning development on a site that will eventually need to very scalable (assuming our business model is a good idea). My problem is that I''m not a sysadmin guru, and I''m not terribly comfortable with the design of the hosting platform. We''re going to start with two servers initially (for cost reasons), and I''m considering
2006 Jan 31
3
Random 502 Bad Gateway
I have moved my project to a dedicated server and I am getting a very annoying behaviour. I am able to view the site just fine when using the ip. The name is properly resolved on my computer, however I am getting "Bad Gateway The proxy server received an invalid response from an upstream server." This is simply random. The site works for several minutes, then i get this message for some
2006 Apr 15
9
Mongrel in Production ?
Hi Everyone, I was setting up Lighty+Fcgi on our server for last *couple* ( read zillion ) of hours. I had posted my problems in my previous email. But all in vain.. So, for time being, I switched to Mongrel. And the performance seemed quite good. This is the first time ever I''m using mongrel ( Awesome stuff ZedShaw..Thanks! ). I''m wondering if there are many people around
2006 Jan 20
3
Process watchdogging anyone ?
Hi ! I have Lighttpd and SCGI clusters running my applications. I self-host at RimuHosting, but I find that my processes die sometimes. I''m not a Linux administrator, so I simply want some kind of watchdogging process to ensure my stuff keeps on truckin''. I found Watchdog::Process on CPAN, but it won''t install. There''s some kind of error. Launchd would be