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

dockerによる新規インストール時に rake enju_leaf:setup でエラーとなってしまう。 #1762

Closed
haruka8307 opened this issue Nov 20, 2022 · 2 comments

Comments

@haruka8307
Copy link

いつもお世話になっております。
インストールの手順に沿ってenju_leafの新規インストール作業を進めて,
データベースの作成までは問題なく進めることができましたが,

$ docker compose run --rm web rake enju_leaf:setup

を実行したところ下記のようなエラーメッセージが表示され先に進むことができずインストールに失敗します。

$ docker compose run --rm web rake enju_leaf:setup
WARN[0000] The "http_proxy" variable is not set. Defaulting to a blank string.
WARN[0000] The "http_proxy" variable is not set. Defaulting to a blank string.
WARN[0000] The "http_proxy" variable is not set. Defaulting to a blank string.
WARN[0000] The "http_proxy" variable is not set. Defaulting to a blank string.
WARN[0000] The "http_proxy" variable is not set. Defaulting to a blank string.
WARN[0000] The "http_proxy" variable is not set. Defaulting to a blank string.
WARN[0000] The "http_proxy" variable is not set. Defaulting to a blank string.
WARN[0000] The "http_proxy" variable is not set. Defaulting to a blank string.
[+] Running 3/0
 ⠿ Container enju_leaf-solr-1      Running                                                                                 0.0s
 ⠿ Container enju_leaf-redis-1     Running                                                                                 0.0s
 ⠿ Container enju_leaf-postgres-1  Running                                                                                 0.0s
rake aborted!
ArgumentError: Could not find or build blob: expected attachable, got #<File:/enju/lib/tasks/../../app/assets/images/icons/book.png>
/usr/local/bundle/gems/activestorage-6.1.7/lib/active_storage/attached/changes/create_one.rb:74:in `find_or_build_blob'
/usr/local/bundle/gems/activestorage-6.1.7/lib/active_storage/attached/changes/create_one.rb:20:in `blob'
/usr/local/bundle/gems/activestorage-6.1.7/lib/active_storage/attached/changes/create_one.rb:12:in `initialize'
/usr/local/bundle/gems/activestorage-6.1.7/lib/active_storage/attached/model.rb:65:in `new'
/usr/local/bundle/gems/activestorage-6.1.7/lib/active_storage/attached/model.rb:65:in `attachment='
/enju/lib/tasks/carrier_type.rb:8:in `block in update_carrier_type'
/usr/local/bundle/gems/activerecord-6.1.7/lib/active_record/relation/batches.rb:71:in `block (2 levels) in find_each'
/usr/local/bundle/gems/activerecord-6.1.7/lib/active_record/relation/batches.rb:71:in `each'
/usr/local/bundle/gems/activerecord-6.1.7/lib/active_record/relation/batches.rb:71:in `block in find_each'
/usr/local/bundle/gems/activerecord-6.1.7/lib/active_record/relation/batches.rb:138:in `block in find_in_batches'
/usr/local/bundle/gems/activerecord-6.1.7/lib/active_record/relation/batches.rb:245:in `block in in_batches'
/usr/local/bundle/gems/activerecord-6.1.7/lib/active_record/relation/batches.rb:229:in `loop'
/usr/local/bundle/gems/activerecord-6.1.7/lib/active_record/relation/batches.rb:229:in `in_batches'
/usr/local/bundle/gems/activerecord-6.1.7/lib/active_record/relation/batches.rb:137:in `find_in_batches'
/usr/local/bundle/gems/activerecord-6.1.7/lib/active_record/relation/batches.rb:70:in `find_each'
/usr/local/bundle/gems/activerecord-6.1.7/lib/active_record/querying.rb:22:in `find_each'
/enju/lib/tasks/carrier_type.rb:2:in `update_carrier_type'
/enju/lib/tasks/enju_biblio_tasks.rake:14:in `block (2 levels) in <main>'
/enju/lib/tasks/enju_leaf_tasks.rake:13:in `block (2 levels) in <main>'
/usr/local/bundle/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
Tasks: TOP => enju_biblio:setup
(See full trace by running task with --trace)

うちの環境だけの問題かもしれませんが,どうしたらいいでしょうか。
お手数をおかけしますが,どうぞよろしくお願いいたします。

@nabeta
Copy link
Member

nabeta commented Nov 21, 2022

@haruka8307 すみません、マニュアルが未リリースのmainブランチを使用するようになっていました。以下のコマンドを実行して、いったんデータベースをリセットしたあと、

$ docker compose down
$ docker volume rm enju_leaf_postgres

1.4系のブランチを参照するように変更して、セットアップを再実行してください。

$ git checkout 1.4
$ docker compose build
$ docker compose up -d
$ docker compose run --rm web rake db:create
(以下略)

@haruka8307
Copy link
Author

ご対応ありがとうございます。
無事に1.4系でインストールできました。

@nabeta nabeta closed this as completed Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants