'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'
어떤 아이디어가?
- 이 제거 과정에 의해 선택된 레일 & SQLite는 루비의 버전 번호를 생성 gemfile + 변화가 모든 것을 설치 들러를 얻는 것입니다.
다른 버전에 대한 제안이 좋은 그래서 나는이 책을 통해 갈거야
- 일부 배경입니다.
- 나는 내가하는 일을 모른다.
- 내가 OSX 10.5 (표범)를 사용하고
내가 추가해야 더 이상 정보가있는 경우 알려주세요.
보너스 질문 : 다른 sqlite 버전으로 처음부터 다시 시작해야하는 경우 새 앱을 만들어야합니까, 아니면 Bundler를 다시 사용할 수 있습니까?
편집 클레버 S.이 config/database.yml
파일 구성을 구성하는 제안했다 파일은 다음과 같습니다 무슨 일이야
# 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
'번들 업데이트 '는 모든 젬의 최신 버전을 찾습니다. –