ruby-on-rails – 即使在开发环境中,Rails环境看起来仍然停留在生产环境中

当我在我的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

解决方法

也许你应该检查.bundle / config文件

相关文章

validates:conclusion,:presence=>true,:inclusion=>{...
一、redis集群搭建redis3.0以前,提供了Sentinel工具来监控各...
分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣...
上一篇博文 ruby传参之引用类型 里边定义了一个方法名 mo...
一编程与编程语言 什么是编程语言? 能够被计算机所识别的表...
Ruby类和对象Ruby是一种完美的面向对象编程语言。面向对象编...