I have read previous threads on this topic, but the solutions I've found there have not solved my problem. I have a rails 3.2.9 application that does not do database access - it uses an HTTP Rest protocol to another application to access persistent data. The app runs OK in a local test environment with "rails server" using WEbrick, but fails to run with Nginx/Passenger with the error "* Exception LoadError in application (Please install the sqlite3 adapter: gem install activerecord-sqlite3-adapter
(sqlite3 is not part of the bundle. Add it to Gemfile.))". From the stack trace it would appear that ActiveRecord wants to eagerly establish a database connection in code that executes prior to the request being processed. I have tried to follow the instructions to remove ActiveRecord from my dependencies with no luck. I generated with --skip-activerecord, which produced an application.rb like this as expected:
require File.expand_path('../boot', __FILE__)
# Pick the frameworks you want:
# require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "sprockets/railtie"
require "rails/test_unit/railtie"
There are no references to activerecord or active_record anywhere in my application except in the gemlock file created by bundler, in comments and in readme. Bundler reports ActiveRecord as a dependency, and 'bundle viz' reports rails itself as being the gem requiring ActiveRecord. Any suggestions or advice would be most welcome.
In response to eric's question, here is my Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.9'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'