1

私はプロダクションモードでアプリケーションをデプロイしていますが、プロセスを終了しようとするとsqliteアダプタが必要になります。誰かがこの問題を止める方法を知っていますか?sqlite3アダプタのインストールを停止する方法サーバ上に `gem install activerecord-sqlite3-adapter`をインストールする

私はRAILS_ENV = productionを使用していますが、この場合は機能しませんでした。

current$ rails generate admin_interface:setup RAILS_ENV=production 
DEPRECATION WARNING: Support for Rails < 4.1.0 will be dropped. (called from warn at /home/ubuntu/.rbenv/versions/2.2.2/lib/ruby/2.2.0/forwardable.rb:183) 
/home/ubuntu/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/rubygems_integration.rb:322:in `block in replace_gem': Please install the sqlite3 adapter: `gem install activerecord-sqlite3-adapter` (sqlite3 is not part of the bundle. Add it to Gemfile.) (LoadError) 
    from /home/ubuntu/vitrineonline/releases/10/vendor/bundle/ruby/2.2.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/sqlite3_adapter.rb:3:in `<top (required)>' 
    from /home/ubuntu/vitrineonline/releases/10/vendor/bundle/ruby/2.2.0/gems/backports-3.6.8/lib/backports/std_lib.rb:9:in `require' 
    from /home/ubuntu/vitrineonline/releases/10/vendor/bundle/ruby/2.2.0/gems/backports-3.6.8/lib/backports/std_lib.rb:9:in `require_with_backports' 
    from /home/ubuntu/vitrineonline/releases/10/vendor/bundle/ruby/2.2.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `block in require' 
    from /home/ubuntu/vitrineonline/releases/10/vendor/bundle/ruby/2.2.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:236:in `load_dependency' 
    from /home/ubuntu/vitrineonline/releases/10/vendor/bundle/ruby/2.2.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `require' 
    from /home/ubuntu/vitrineonline/releases/10/vendor/bundle/ruby/2.2.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in `resolve_hash_connection' 

答えて

0

私が見る最初の問題は、このコマンドの生活のためにその変数を設定して、あなたのコマンドの先頭にRAILS_ENV宣言を置くべきであるということです。

RAILS_ENV=production bundle exec rails generate admin_interface:setup 

これは根本的な原因である可能性があります。

export RAILS_ENV=production 

だから、あなたが持っていない:あなたは、シェルのためにそれを設定し実行したい場合は

(またGemfileで指定gemsetが正しくロードされていることを確認するためにbundle execの使用を注意してください)コマンドごとに手動で設定します。

データベースアダプターが正しく構成されていない可能性があります。これがRuby on Railsアプリケーションの場合、データベースアダプタはconfig/database.ymlで定義されています。指定されていない場合は、デフォルトでsqlite3になっている可能性があります。正しく設定されたdatabase.ymlファイルがあることを確認してください。

production: 
    adapter: postgresql 
    database: rails4_stack 
    username: myusername 
    password: mypassword 
    pool: 5 
    timeout: 5000 
    encoding: utf8 
    reconnect: false 
+0

ありがとうございました。 – jjplack

関連する問題