How to set the application database to be used by Resque? - ruby-on-rails-3

I have a Rails application running with Resque, but I'm facing a problem when running it on production environment.
The application runs using development's database. How can I set the database to be used by Resque according to application environment?
Thanks!

When starting the Rails server, you should also provide the environment:
rails server -e production

Related

Admin Server and Managed Server set to Production mode in Weblogic

I am very new to Weblogic and have a question.
I have a Admin Server and four Managed Server .
I want to set Prodcution Mode to true in Admin Domain , would this also run all the managed servers in Production Mode ?
Also, does this change require weblogic restart ?
I am using Weblogic 12c.
Thanks
All servers in the domain run in production or development mode, it is a domain wide setting. Managed servers refer to the admin server to determine their run mode. And yes you will need to restart all servers in your domain for this to take affect.
Google is your friend - this was the first link that came up:
http://docs.oracle.com/cd/E23943_01/apirefs.1111/e13952/taskhelp/domainconfig/ChangeRuntimeModes.html

Creating a MySQL instance on Cloudbees Jenkins for running tests

we am using Jenkins hosted on Cloudbees for building our Github hosted code base. We would like to run an Integration Test pipeline for each build. For that, we need to create a MySQL DB before running the integration tests on Jenkins. Is there an easy way to create a MySQL DB as part of a Job in Jenkins, on Cloudbees?
Please look at the CloudBees DEV#cloud MySQL guide.
It covers configuring and starting a MySQL server that runs inside the build process.
A persistent MySQL server is typically more troublesome as you would need to clear out the tables prior to each test run.

What is the correct way to install Celery/Redis to run the tasks on another server?

The web server itself runs django. I would like the web server to delegate the actual tasks work to another server.
First, setup your redis server on the remote server. Change your django configuration to connect to this server.
When you deploy your app, I recommend using fabric to deploy to your web server and your worker server. It should handle the restart logic as well.

Rails 3.1: Is it possible to run UNICORN sever on windows?

Just wanted to know is it possible to use unicorn as dev web server on MS Windows machine?
Thanks!
Unicorn use much of features provided by Unix/Unix-style kernels.
Therefore - it's not possible.

mysqldump blocking Ruby on Rails

This is a trickier problem than it sounds. I run Ruby/MySQL on many servers and use mysqldump w/o any problems. However, I'm using an Ubuntu setup and it appears to be acting quite different than Fedora and RHEL. When I backup the production server using mysqldump it causes Rails to become inaccessible. Apache is still able to serve up images and CPU/memory usage is low, so it appears to be purely a contention with RoR and MySQL. I am using InnoDB, which has allowed mysqldump to backup this exact same database on a Fedora server w/o any downtime. However, the other server was running Ruby 1.8.7 and Rails 2.3.
Here are the complete server specs:
Ubuntu 10
Rails 3
RVM
Ruby 1.9.2
Passenger
Apache
MySQL
Additional "clues":
I can connect fine to the production database and access records using mysql client
I can use Rails console to load the production environment and query tables using ActiveRecord
I cannot access the production webserver through Apache/Passenger, nor can I access it when I run a production instance with Webrick (through 'rails s -e production')
Any thoughts as to why mysqldump would be blocking Rails (and only Rails)?
So this thing has an answer (from comments above):
please use mysqldump with params --single-transaction – Neo Apr 22 at
14:59