私は 'install bundle'を使用してアプリケーションを生成しました。ウェルカムボードアプリケーションの "アプリケーションの環境について"ページのActiveRecord :: ConnectionNotEstablishedにあります。RoR - ActiveRecord :: ConnectionNotEstablished
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'
任意のアイデア?
- これは、生成gemfile +すべてをインストールするには、バンドラを取得するために消去法で選択されたレール&のsqlite-ルビーのバージョン番号への変更です。
いくつかの背景
- 異なるバージョンについての提案は大丈夫ですので、私は本をつもりです。
- 私は何をしているのか分かりません。
- 私はOSX 10.5(ヒョウ)を使用してい
私は追加する必要があります任意のより多くの情報があるなら、私に教えてください。
ボーナスに関する質問:最初から別のsqliteバージョンで起動する必要がある場合は、新しいアプリケーションを作成するか、Bundlerを再度使用することはできますか?
編集 クレベールS.があなたのconfig/database.yml
ファイルのconfigureを設定示唆しているファイルは次のようになります。何が間違ってい
# 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
任意のアイデア?
Gemfileを変更した場合は、まず 'bundle install'を実行してください。特定のGemバージョンがロックされている場合は、' bundle update * somegem * ' –
を実行してください。 明確にするには、バンドルのアップデートを実行しても、宝石の追加を続けるだけではありませんか? – ntc
'bundle update'はそれだけで全てのgemの最新版を探します。 –