Skip to content

Instantly share code, notes, and snippets.

@lalala
Created October 19, 2011 09:58
Show Gist options
  • Save lalala/1297874 to your computer and use it in GitHub Desktop.
Save lalala/1297874 to your computer and use it in GitHub Desktop.
[per@pollux Achievable]$ rake db:migrate
/home/per/.rvm/gems/ruby-1.9.2-head@achievable/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_
rake aborted!
Please install the mysql adapter: `gem install activerecord-mysql-adapter` (mysql is not part of the bundle. Add it to Gemfile.)
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
------------------------------------------
Gemfile
------------------------------------------
source 'http://rubygems.org'
gem 'rails', '3.1.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
#gem 'sqlite3'
gem 'devise', '>= 1.4.8'
gem 'mysql2', '>= 0.3.7'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.1.4'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem 'acts_as_list', '>=0.1.4'
gem 'bson_ext', '>=1.4.0'
gem 'haml', '>= 3.1.3'
gem 'cancan', '>= 1.6.5'
gem 'carrierwave', '>= 0.5.7'
gem 'rmagick', '>= 2.13.1'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
group :test do
# Pretty printed test output
gem 'turn', :require => false
end
----------------------------------------------
database.yml
----------------------------------------------
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: mysql
database: achievable_development
encoding: utf8
username: achievable
password: achievable
socket: /var/run/mysqld/mysqld.sock
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
@lalala
Copy link
Author

lalala commented Oct 19, 2011

SQLite version 3.x

gem install sqlite3

Ensure the SQLite 3 gem is defined in your Gemfile

gem 'sqlite3'

development:
adapter: mysql
database: achievable_development
encoding: utf8
username: achievable
password: achievable
socket: /var/run/mysqld/mysqld.sock

Warning: The database defined as "test" will be erased and

re-generated from your development database when you run "rake".

Do not set this db to the same as development or production.

test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000

production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment