Created
October 30, 2011 09:00
-
-
Save veldtmana/1325721 to your computer and use it in GitHub Desktop.
MySQL database.yml config for Torquebox... (you have to use the 'activerecord-jdbc-adapter' and 'jdbc-mysql' gems)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| development: | |
| adapter: jdbc | |
| encoding: utf8 | |
| username: root | |
| password: password | |
| driver: com.mysql.jdbc.Driver | |
| url: jdbc:mysql://localhost:3306/myappname_development | |
| test: | |
| adapter: jdbc | |
| encoding: utf8 | |
| username: root | |
| password: password | |
| driver: com.mysql.jdbc.Driver | |
| url: jdbc:mysql://localhost:3306/myappname_test | |
| production: | |
| adapter: jdbc | |
| encoding: utf8 | |
| username: root | |
| password: password | |
| driver: com.mysql.jdbc.Driver | |
| url: jdbc:mysql://localhost:3306/myappname_production |
Author
Author
Using this setup you cannot drop or create the db with a rake task...
console$ mysql -u root -p
mysql> create database myappname_development;
Author
Also the torquebox session store param makes running rake tasks a mess:
rake aborted!
uninitialized constant ActionDispatch::Session::TorqueboxStoreTasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
fix it by adding:
begin
puts ActionDispatch::Session::TorqueboxStore
rescue
ActionDispatch::Session::TorqueboxStore = nil
endto the top of config/initializers/session_store.rb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This config should be used instead of the typical 'activerecord-jdbcmysql-adapter' gem that works using webrick.
Stack:
Rails 3.0.10
jruby 1.6.5
torquebox-server 2.x gem as opposed to installing and configuring torquebox
(see http://torquebox.org/news/2011/06/10/torquebox-gem/)
Ubuntu
following gems should be in gemfile: