search for: threaded_connections

Displaying 8 results from an estimated 8 matches for "threaded_connections".

2005 Sep 29
2
[BUG] Quick Fix for SCGI leaked DB connections
Hi Folks, I believe I tracked down the problem with the leaked DB connections. The simple fix is to put: ActiveRecord::Base.threaded_connections = false In your environment.rb file right before environment.rb does any ActiveRecord use. For example, here''s mine: ActiveRecord::Base.threaded_connections = false ActiveRecord::Base.configurations = File.open("#{RAILS_ROOT}/config/database.yml") { |f| YAML::load(f) } ActiveR...
2006 Feb 28
6
Threading & database connections.
Hello all. Bear with me, there is a Mongrel question in here ;) I have been having some fun with database connections and ruby. Long story ( Found here: http://www.ruby-forum.com/topic/56047 ) short: I was making far too many in my application. I eventually fixed this (I thought) and when running webrick there were only ever two connections (One to each database) no matter how many users, this
2006 Jul 05
2
Serialized object behaves weird
Hi! I got a class named EinsatzFilter which I serialized to session. Before saving to session it works afterwards I keep getting the message: "undefined method `to_s'' for #<Person:0x38c6ab8>". "Person" is a from ActiveRecord::Base inherited class. Code: class EinsatzFilter include ApplicationHelper attr_reader :personen, :monat, :projekte, :kunde
2006 Apr 08
0
Typo and Instant Rails 1.2
...t for display -- Ed Gard def configure_rails(environment, port) ENV["RAILS_ENV"] = environment # Added to display environment and port -- Ed Gard STDERR.puts("Environment: #{environment}; Port: #{port}") require "config/environment" ActiveRecord::Base.threaded_connections = false require ''dispatcher'' end class RailsController < SCGI::Controller def initialize(config_file) @config_file = config_file # Added the port for display -- Ed Gard configure_rails(config[:env], config[:port]) super(RailsProcessor.new(co...
2007 Jun 19
1
Reloader paths/
after investigating why the reloader wasnt working , i discovered 2 probs, one of which was sorta my fault (but will likely happen to others who make one-file apps) first, my app was like this: #!/usr/bn/env ruby %w{applib1 applib2 digest/md80 airbus}.each{|r| require r}} if __FILE__ == $0 Mongrel.config do handler ''/'', Camping.reloader.new(__FILE__) end end not
2006 Apr 12
4
Instant Rails SCGI Problem
I have installed instant rails and configured it http://instantrails.rubyforge.org/wiki/wiki.pl?Getting_Started I can get typo and webrick to work on webrick localhost:3000 but cant get anything to work with scgi. When i start the scgi server i get a blank dos window screen. When i type www.mycookbook.com into the browser i get the following Unable to connect Firefox can''t
2006 Aug 01
3
starting fresh
...ping. anyone got better luck? this is my postamble if __FILE__ == $0 Blog::Models::Base.establish_connection :adapter => ''sqlite3'', :database => ''examples.db'' Blog::Models::Base.logger = Logger.new(''camping.log'') Blog::Models::Base.threaded_connections=false Blog.create require_gem ''fcgi'', ''>=0.8'' require ''camping/fastcgi'' Dir.chdir(File.dirname(__FILE__)) Camping::FastCGI.serve(__FILE__) # tried File.dirname(__FILE__) and (`pwd`.chomp) end -- gcc -O0 -DRUBY_EXPORT -rdynamic...
2006 Jul 18
4
intro
...so far: I use a simple FastCGI postamble Blog::Models::Base.establish_connection :adapter => ''sqlite3'', :database => ''/home/mathieu/mv/rf/public/blog-new.db'' Blog::Models::Base.logger = Logger.new(''camping.log'') Blog::Models::Base.threaded_connections=false Blog.create if Blog.respond_to? :create require ''fcgi'' require ''camping/fastcgi'' Dir.chdir(File.dirname(__FILE__)) Camping::FastCGI.start(Blog) the lib/camping/fastcgi.rb was missing in the camping 1.4.2 gem, so I took it from SVN trying...