當我在我的Rails應用程序目錄中運行bundle install
,捆紮機將安裝僅是生產組中的寶石(如Heroku的或PG)。當我在本地運行軌道服務器,它也試圖尋找一個ActiveRecord-TCP適配器具有零個結果在谷歌:Rails環境看起來像它堅持生產,甚至在開發環境
/Users/atestu/.rvm/gems/[email protected]/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require': Please install the tcp adapter: `gem install activerecord-tcp-adapter` (cannot load such file -- active_record/connection_adapters/tcp_adapter) (LoadError)
我想這寶石與Heroku的生產環境,但我RAILS_ENV變量空。當我將其設置爲development
或運行rails s -e development
時,我會得到完全相同的問題。
我該如何深入研究這個問題?
編輯:這是我的Gemfile
:
source 'http://rubygems.org'
gem 'rails', '3.2.1'
gem 'json'
gem 'jquery-rails'
gem 'authlogic'
gem 'acts-as-taggable-on'
gem 'rpx_now'
gem 'hominid'
gem 'ruby-tmdb'
gem 'memcached'
gem 'aws-s3'
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'
end
group :production do
gem 'heroku'
gem 'pg'
end
group :development, :test do
gem 'sqlite3'
gem 'taps'
end
這裏是我的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'。 – jdl 2012-03-10 00:58:49
請同時發佈您的database.yml文件 – 2012-03-10 03:27:59
這很奇怪,你確定這是你的** database.yml **文件嗎?它看起來很像您的應用程序中的某個地方,您要求使用** tcp **適配器進行連接。 – 2012-03-10 12:05:34