当我在我的Rails应用程序目录中运行bundle install时,Bundler会安装仅在生产组中的gem(例如heroku或pg).当我在本地运行rails服务器时,它还试图寻找在Google上具有ZERO结果的activerecord-tcp-adapter:
/Users/atestu/.rvm/gems/ruby-1.9.3-p125@global/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)
我想这个gem与heroku的生产环境有关,但是我的RAILS_ENV变量是空的.当我将它设置为开发或运行rails s -e开发时,我得到完全相同的问题.
我怎样才能更深入地研究这个问题?
编辑:这是我的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