Displaying 20 results from an estimated 3000 matches similar to: "rails app breaks after pg restart"
2006 Mar 30
15
ActiveRecord 1.13.2 -> 1.14.0 breaks Postgres connectivity
To Whom It May Concern:
I have an ActiveRecord-based application (non-Rails). Life was grand
until I upgraded ActiveRecord yesterday, after which point I was getting
TONNES of these errors from my app and in PostgreSQL''s logs:
FATAL: terminating connection due to administrator command
According to Google searching, this happens when an external process
sends PostgreSQL SIGINT or
2006 Apr 03
2
problems testing on 1.1 and postgresql
Hi,
I get errors doing this:
1) createdb myapp_test
2) rake db:test:clone_structure
3) rake test:units
rake aborted!
PGError: ERROR: relation "matches" already exists
I''m using the :sql schema format because there are some problems with
postgres and the :ruby schema format
config.active_record.schema_format = :sql
It seems rake test:units is trying to create the tables
2006 Oct 22
7
GzipFilter gemplugin now available
This GemPlugin will gzip your HTTP responses from mongrel if the
client says that it supports it (eg, most modern browsers). I''ve
tested it in IE6, Firefox 1.5 and Firefox 2.0RC3
Install:
gem install gzip_filter --source http://edenli.com
Configure (assuming rails):
cd RAILS_ROOT
echo ''uri "/", :handler => plugin("/handlers/gzipfilter")''
2006 Nov 30
5
stability
Hi,
Are there any recommendations as to what is currently the most stable
setup is for mongrel & apache? I read somewhere (probably here) that you
should avoid using PStore for sessions. Are there any more of such
recommendations? Also, what is currently the safest version of mongrel
to use in production?
Jeroen
2007 Mar 12
17
need help writing a plugin
Hi,
I''m halfway developing a tiny plugin that allows people to scrub flash
video files. I''ve got my plugin setup to monitor a directory /movies.
Whenever a .flv file is requested within that directory, some stuff
should happen, if not, the request should be processed as usual. I don''t
know how to do the latter..
require ''mongrel''
require
2006 Sep 04
11
balancer://mongrel_cluster
A couple of questions please:
What is the benefit of having more than one Mongrel/Rails instance on
the same machine, could one instance not serve as many requests as say
three instances?
Is Mongrel Cluster a Apache add-in (like mod_*) or a separately running
load balancer which runs on a separate port, I could not work it out
from the sample Apache config...
|# Redirect all non-static
2006 Mar 28
2
error 500 page not showing on production (lighty)
Hi,
Do I need to configure something to get my custom public/500.html page
showing on my production server (lighttpd)? My custom 404 page is
showing but when I hit an exception I just see the default (Applcation
Error) message.
Also, is it possible to include some ERB in error404 and 500 pages?
Jeroen
2006 Sep 03
8
first request always fails
Hi,
Whenever I restart mongrel on my production server, the first request in
my browser always fails, I get this error:
Processing Base#index (for 83.xx.xx.xx at 2006-09-03 16:08:47) [GET]
Session ID: f1918346d193e19a70c3230286e5ce1a
Parameters: {}
TypeError (superclass mismatch for class Stats):
/app/models/stats.rb:1
stats.rb:1 just contains a normal A/R line:
class Stats <
2007 Dec 17
14
Change in isolation behaviour 1.08 - 1.10 ?
Hi,
I just moved from 1.08 to 1.10 and now have one example failing, which,
under 1.08, passed. Is the due to a change in behaviour?
Here''s my spec (removed some passing examples)
require File.dirname(__FILE__) + ''/../spec_helper''
describe "A user" do
before(:each) do
@user = User.new
@valid_user = User.new(
:email =>
2006 Feb 01
6
how to create a command line script that acts on a model?
Hi,
I''m looking to create a ruby script that loads a bunch of records and
manipulates these. Where do I start?
I got this to begin with:
#!/usr/bin/env ruby
require File.dirname(__FILE__) + ''/../config/boot''
players = Player.find :all
But it complains about a DB connection. How do I set this up?
Jeroen
2006 Apr 02
16
12 / 16 = 0
Hi,
Just thought it was weird that Ruby doesn''t automatically cast ints to
floats. Seems so un-rubyish
irb(main):006:0> 12/16
=> 0
irb(main):007:0> 12.to_f / 16.to_f
=> 0.75
Jeroen
2005 Oct 17
8
Using active record for SELECT MAX(column) FROM ...
Hi,
Is there an easy way of querying an active record for a maximum column
value? I need to do queries like:
SELECT MAX(salary) FROM employees
TIA,
Jeroen
2006 Mar 07
5
Capistrano: command never finishes?
Hi,
I have created a small :restart task to overwrite the default one:
task :restart, :roles => :app do
sudo "/etc/init.d/lighttpd stop"
sudo "/etc/init.d/lighttpd start"
end
This works fine and lighty does restart, but the last command never
finishes, so I never return to the prompt. Here''s my output:
cap restart
loading configuration
2005 Nov 27
5
OT: good admin gui postgresql on OSX?
Hi,
I recently bought by first Mac and I''m looking for some alternatives for
my windows applications.
Does anybody know a decent gui admin app for postgresql? On windows I
use postgresql manager:
http://www.sqlmanager.net/en/products/postgresql/manager
I find this a very good piece of software and it''s free, even though I
paid a little for some extra features. I''d
2005 Dec 18
13
calculate age based on DoB
Hi,
I wrote a little helper that calulates someone''s age based on his/her
date of birth.
def age(dob)
diff = Date.today - dob
age = (diff / 365.25).floor
age.to_s
end
It works fine, but it''s not completely accurate as it just takes the
average days in a year. It should be able to calculate this more
accurately, right? I can''t work it out
2006 Jan 27
8
ror/lighttpd - HTML files via port 80 become application/octet-stream?
Hi everybody
I am trying to get RoR to work with lighttpd.
Nearly there, but I am stuck with a strange phenomenon.
If I configure lighttpd to serve pages on say port 2000, I can get at my
testapp fine and see the "Welcome aboard" page.
However, if I configure lighttpd to use port 80, I get a download prompt
from my browser.
If I access my URI like
2010 Nov 18
2
Testing Error: ActiveRecord::StatementInvalid
I intentionally deleted the attribute author from the table comments.
When I used functional testing, I got the following message
ActiveRecord::StatementInvalid: PGError: ERROR: column "author" of
relation "comments" does not exist
What should I need to do in order to avoid this error message!!!
--
You received this message because you are subscribed to the Google Groups
2005 Nov 16
3
controller before_filter issues
Hi,
Some controller filters:
before_filter :require_logged_in, :only => [:create, :new, :confirm]
before_filter :init_players, :only => [:create, :new, :confirm]
The first one, you guessed it, redirects a user if he''s not logged in.
Now when I hit this page and I''m not logged in, the 2nd filter gets
executed and throws an error, because it depends on the user
2006 Feb 01
8
ruby equivalent of isset()
Hi,
Is there a way to test if a certain (local) variable has been initialized?
I''d like to do something like
if isset(myvar) and myvar.true?
#some code
else
#default behaviour
end
I have a lot of shared views that I call with params such as {
show_pager => true
Instead of having to explicitly say show_pager => false it should be
possible to make false a default value, right?
2006 Mar 22
9
render partial from withit mail template
Hi,
I''m trying to include a partial in an email template but it throws me this:
undefined method `controller_path'' for SupportMailer:Class
Extracted source (around line #12):
11:
12: <%= render :partial => ''footer'' %>
I guess email views are a little different from normal ones as they
don''t seem to have a access to a proper controller (?)