similar to: ActiveRecord::Base.establish_connection in development and production envs

Displaying 20 results from an estimated 2000 matches similar to: "ActiveRecord::Base.establish_connection in development and production envs"

2013 May 28
5
Storing Rails controller callback data in session
http://stackoverflow.com/questions/16770090/storing-rails-controller-callback-data-in-session The idea is: - Perform some time consuming action in background. - Have the results from that action be propagated back to the controller using a callback. - Store the result in an in memory session store. - Have the result in session be used and available from that point onward.
2006 Aug 13
1
establish_connection method
I''m digging into rails source code. But I''ve got a problem in undestading actionrecord::base source code which is connection_specification.rb. In the body of establish_connection method, def self.establish_connection(spec = nil) case spec when nil raise AdapterNotSpecified unless defined? RAILS_ENV establish_connection(RAILS_ENV)
2012 May 22
3
[RESQUE]Question about queues
I run Resque with x ''general'' queues. With ''general'' I mean a queue that may run every type of Worker. Or in the Rake command: COUNT=x QUEUE=* rake resque:work When a worker runs a job of a specific class, it may not run another job of the same class simultaniously. This job has to wait until the previous job has finished before it may start. BTW The reason
2011 Jan 24
1
passing multiple arguments in resque scheduler
Hi, I have implemented resque scheduler in my application by looking at example here https://github.com/bvandenbos/resque-scheduler. I have configured resque_schedule.yml file, and in that I can pass arguments to the resque job. My requirement is to pass more than one arguments to the queueing resque job. If we consider the example given, clear_leaderboards_contributors: cron: "30 6 * *
2012 May 16
7
Rails 3.1.0 cannot connect to sqlite database on Mac Lion
I''m running Rails 3.2.3 on Mac Lion with sqlite 3.7.7 and ruby 1.9.3p125. I need to back down rails to 3.1.0 for a project but when I do that a simple index page give me a ActiveRecord::ConnectionNotEstablished error. Rails 3.2.3 works, 3.1.0 not. Any ideas? Just to show you it''s nothing fancy.... Gem file is only: source ''https://rubygems.org'' gem
2011 Apr 18
2
Problem with resque; parent process doesn't die
I am facing problem in resque process. I have following implementation: /config/resque_schedule.yml add_jobs_to_queue: cron: "15 * * * *" class: FooJob description: "Find results from class Bar and put on queue" /app/jobs/foo_job.rb class FooJob @queue = :normal def self.perform Bar.add_jobs end end app/models/bar.rb class Bar def self.add_jobs
2006 Aug 03
5
Store common settings in one file?
Hi, I''m looking for a way to store common settings, such as the application_name or email address from value in a file. I then want to be able to call these settings in my controllers and models? Is there any easy way of doing this? and where would you recommend I save the file ? Thanks scott -- Posted via http://www.ruby-forum.com/.
2011 Apr 27
1
'bignum too big to convert into long' while migration in rails
While i run rake db:migrate i got below error ,let me know any one . Please it is urgent to me. D:\raj\tweasier>rake db:migrate --trace (in D:/raj/tweasier) DEPRECATION WARNING: Rake tasks in vendor/plugins/open_flash_chart_2/tasks, vend or/plugins/resque/tasks, and vendor/plugins/resque/tasks are deprecated. Use lib /tasks instead. (called from
2011 Aug 29
0
Why is #verify_active_connections! :nodoc: ?
Hi, I''ve just got a quick question. How come ActiveRecord::ConnectionAdapters::ConnectionHandler#verify_active_connections! is marked with :nodoc: ? I understand that this is used internally (depending upon an application''s configuration?) on every request (?) to clear out old, stale database connections. All this to prevent the old, classic "MySQL server has gone
2011 May 18
0
Time based configuration in God
Hi, I am using resque, resque-scheduler gems in my rails app. To monitor the working of resque workers, I am using God tool. I want to add such a god configuration, which will monitor the time of job running in the resque worker. If process execution exceeds the time limit, then it should restart the worker. I read post at http://god.rubyforge.org/. However, couldn''t peek the right
2006 Jun 16
0
Mysql: establish_connection''...development database not conf
I have tried for several hour to get a mysql db connection to work, but have failed so far: This is a cpanel server running Mysql 4.1.19, fcgi with apache. Here is the output from script/console Loading development environment. /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:194:in
2007 Jul 19
0
locomotive and establish_connection
I am using locomotive for development. My app uses dual databases and hence I have a model that uses a different establish_connection to connect to the db. It seems that locomotive does not support this. Am I correct? If so, does anyone have a different approach to achieve this? thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed
2010 Jan 03
24
SQLServer on Rails
Does any one know how to setup SQLserver with ruby1.9. It was working on an earlier version and now nothing works! I have installed the gems dbi ,dbd-odbc and activerecord-odbc-adapter and can connect in straight Ruby. However, using rails with database.yml nothing works! I hosed everything and reinstalled rails and now, I get Win32/Parite virus on ruby.exe. Any ideas? I''m losing
2011 Jan 10
2
Problem with multiple requires in Ruby DSL
I''m loving playing around with the DSL. There are some problems (ie 5237), but now that it''s Ruby, I can fix them! woo! However, I''m stumped on this one, which may or may not be related to the DSL. When trying to have a resource have a simple dependency on two things at once, it simply fails, and I''m stumped as to why. The error message is: Parameter
2011 Jan 15
4
Best practices for email delivery in production
In pre Rails 3 world I was using ar_sendmail to queue up emails. Then I would setup a cron job every few minutes to deliver the emails. But that doesn''t work perfectly in Rails 3. What is the best way to deliver emails in production environment in Rails 3? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this
2009 May 21
1
DB connection problem in production
I have a separate DB for one model in my application and in development mode the connection is working properly, in production however it isn''t. production: adapter: mysql host: myhost username: root password: database: production_db users_production: adapter: mysql host: myhost username: root password: database: other_db The model that connects to the other
2004 Nov 14
3
Running Photoshop on a relatively old PC
For several months I've been thinking about moving to Linux operating system. This would resque our old machine which is getting left behind when it comes to hardware (and it would also put fun back into computing). The problem is that if I convert the only machine our family has to Linux, it would mean that an important program, Photoshop, which we use everyday has to be abandoned. This
2009 Oct 12
15
We're sorry, but something went wrong on Tomcat
I am using JRuby and I have to deploy on Tomcat. My web app is working fine in the dev envirmonment, with Mongel, but when I deploy on Tomcat I get "We''re sorry, but something went wrong on Tomcat". The problem is that production.log only shows: # Logfile created on Mon Oct 12 12:54:36 +0100 2009-bash-3.00 The file permission and directory are 777. Any idea how I can
2006 Feb 08
8
Strategies for Unit testing 2 databases
Hi, My application spans 2 (or more) databases for some very specific reasons... My models are working fine, even dynamically establishing connections as needed at runtime, and spanning relationships across the databases (which really impressed me). The problem is, I can''t seem to force Units for these models (that use a secondary db) to load their fixtures into and use the
2006 Mar 16
5
Multiple databases + switching databases
Hello, I have an application that access two different DBMS - Firebird and Postgres. So far, that''s ok. The problem is, depending on the customer logged, a different database (Firebird) must be selected. To make the things clearer: Postgres: 1 database shared by all customers with these tables: - user - vehicle - driver Firebird: several databases with different names and identical