I have generated an app using 'install bundle' and am getting the error ActiveRecord::ConnectionNotEstablished in the "About your application’s environment" page of the welcome aboard app.
The Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.0'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
any ideas?
- This is the generated gemfile + changes to the version numbers of rails & sqlite-ruby selected by process of elimination to get the bundler to install everything.
Some Background
- I am going through a book so suggestions about different versions are fine.
- I don't know what I'm doing.
- I'm using OSX 10.5 (leopard)
Let me know if there is any more information I should add.
Bonus question: If I need to start from scratch with a different sqlite version, should I create a new app or can I user the Bundler again?
edit
Kleber S. has suggested configuring the configure your config/database.yml file the file looks like:
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# 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
any ideas what's wrong?
bundle install, if a specific gem version is locked, it'll ask you to runbundle update *somegem*- Matthew Rudybundle updateby itself goes to find the lastest versions of all gems. - Matthew Rudy