Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load 'active_record/connection_adapters/postgresql_adapter when using docker image fluent/fluentd:v1.3-debian-onbuild #65

Open
oranmoshai opened this issue Dec 5, 2018 · 3 comments

Comments

@oranmoshai
Copy link

@oranmoshai oranmoshai commented Dec 5, 2018

Dockerfile:
`FROM fluent/fluentd:v1.3-debian-onbuild

RUN buildDeps="sudo make gcc g++ libc-dev ruby-dev libpq-dev"
&& apt-get update
&& apt-get install -y --no-install-recommends $buildDeps
&& sudo gem install
fluent-plugin-sql --no-document
&& sudo gem install
pg -v 0.21.0 --no-document
&& sudo gem install
fluent-plugin-remote_syslog --no-document \
&& sudo gem sources --clear-all
&& SUDO_FORCE_REMOVE=yes
apt-get purge -y --auto-remove
-o APT::AutoRemove::RecommendsImportant=false
$buildDeps
&& rm -rf /var/lib/apt/lists/*
/home/fluent/.gem/ruby/2.3.0/cache/*.gem`

Error:

2018-12-05 09:20:11 +0000 [error]: #0 Could not load 'active_record/connection_adapters/postgresql_adapter'. Make sure that the adapter in config/database.yml is valid. If you use an adapter other than 'mysql', 'mysql2', 'postgresql' or 'sqlite3' add the necessary adapter gem to the Gemfile. path=nil error_class=LoadError error="Could not load 'active_record/connection_adapters/postgresql_adapter'. Make sure that the adapter in config/database.yml is valid. If you use an adapter other than 'mysql', 'mysql2', 'postgresql' or 'sqlite3' add the necessary adapter gem to the Gemfile."

@repeatedly
Copy link
Member

@repeatedly repeatedly commented Dec 5, 2018

How about install latest pg, not 0.21.0?

@PACordonnier
Copy link

@PACordonnier PACordonnier commented Jan 14, 2019

Hi,
Not the OP but same issues, using fluent/fluentd:stable (fluentd v1.3.2 right now). It is based on Alpine not debian

FROM fluent/fluentd:stable

RUN apk add --no-cache --update --virtual .build-deps postgresql-dev \
        sudo build-base ruby-dev \
 && sudo fluent-gem install fluent-plugin-sql \
 && sudo fluent-gem install pg --no-document \
 && sudo fluent-gem install fluent-plugin-kubernetes_metadata_filter \
 && sudo gem sources --clear-all \
 && apk del .build-deps postgresql-dev \
 && rm -rf /home/fluent/.gem/ruby/2.5.0/cache/*.gem

Ruby version is 2.5.2

And I get the exact same error as OP, it probably has to do with version mismatch I guess.
I will try more versions and update the issue when I found something that fits my needs :)

@ymchun
Copy link

@ymchun ymchun commented Feb 17, 2019

@oranmoshai seems you removed libpq-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.