お世話になっております。
###前提・実現したいこと
minimalインストールしたcentos7にMastodonを構築しています。
こちらのqiita記事にしたがって操作しています。
###発生している問題・エラーメッセージ
記事の通りに進めていたところ、rake secretを実行時にエラーが発生します。
shell
1cd ~ && git clone https://github.com/tootsuite/mastodon.git live && cd live 2git checkout $(git tag | tail -n 1) 3bundle install --deployment --without development test 4yarn install 5 6cp .env.production.sample .env.production 7sed -i '/^REDIS_HOST=/ s/redis/localhost/' .env.production 8・・・略・・・ 9sed -i "/^PAPERCLIP_SECRET=$/ s/$/`rake secret`/" .env.production 10sed -i "/^SECRET_KEY_BASE=$/ s/$/`rake secret`/" .env.production 11sed -i "/^OTP_SECRET=$/ s/$/`rake secret`/" .env.production
エラーメッセージは次の通りです。
shell
1[mastodon@mstdn live]$ rake secret 2rake aborted! 3Gem::LoadError: You have already activated rake 12.0.0, but your Gemfile requires rake 11.3.0. Prepending `bundle exec` to your command may solve this. 4/home/mstdn/live/config/boot.rb:3:in `<top (required)>' 5/home/mstdn/live/config/application.rb:1:in `require_relative' 6/home/mstdn/live/config/application.rb:1:in `<top (required)>' 7/home/mstdn/live/Rakefile:4:in `<top (required)>' 8LoadError: cannot load such file -- bundler/setup 9/home/mstdn/live/config/boot.rb:3:in `<top (required)>' 10/home/mstdn/live/config/application.rb:1:in `require_relative' 11/home/mstdn/live/config/application.rb:1:in `<top (required)>' 12/home/mstdn/live/Rakefile:4:in `<top (required)>' 13(See full trace by running task with --trace)
試したこととして、
エラーメッセージにあるようにbundle execを追加して実行すると次のエラーメッセージが出ます。
shell
1[mastodon@mstdn live]$ bundle exec rake secret 2rake aborted! 3NameError: uninitialized constant Annotate 4/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-0.2.14/lib/bootsnap/load_path_cache/core_ext/active_support.rb:50:in `block in load_missing_constant' 5/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-0.2.14/lib/bootsnap/load_path_cache/core_ext/active_support.rb:8:in `block in with_bootsnap_fallback' 6/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-0.2.14/lib/bootsnap/load_path_cache/core_ext/active_support.rb:14:in `without_bootsnap_cache' 7/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-0.2.14/lib/bootsnap/load_path_cache/core_ext/active_support.rb:8:in `rescue in with_bootsnap_fallback' 8/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-0.2.14/lib/bootsnap/load_path_cache/core_ext/active_support.rb:6:in `with_bootsnap_fallback' 9/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-0.2.14/lib/bootsnap/load_path_cache/core_ext/active_support.rb:50:in `load_missing_constant' 10/home/mstdn/live/lib/tasks/auto_annotate_models.rake:43:in `<top (required)>' 11/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-0.2.14/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `load' 12/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-0.2.14/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `load' 13/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/engine.rb:654:in `block in run_tasks_blocks' 14/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/engine.rb:654:in `each' 15/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/engine.rb:654:in `run_tasks_blocks' 16/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/application.rb:443:in `run_tasks_blocks' 17/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/engine.rb:457:in `load_tasks' 18/home/mstdn/live/Rakefile:6:in `<top (required)>' 19/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>' 20/home/mstdn/.rbenv/versions/2.4.1/bin/bundle:22:in `load' 21/home/mstdn/.rbenv/versions/2.4.1/bin/bundle:22:in `<main>' 22NameError: uninitialized constant Annotate 23/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-0.2.14/lib/bootsnap/load_path_cache/core_ext/active_support.rb:50:in `block in load_missing_constant' 24/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-0.2.14/lib/bootsnap/load_path_cache/core_ext/active_support.rb:6:in `with_bootsnap_fallback' 25/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-0.2.14/lib/bootsnap/load_path_cache/core_ext/active_support.rb:50:in `load_missing_constant' 26/home/mstdn/live/lib/tasks/auto_annotate_models.rake:43:in `<top (required)>' 27/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-0.2.14/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `load' 28/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-0.2.14/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `load' 29/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/engine.rb:654:in `block in run_tasks_blocks' 30/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/engine.rb:654:in `each' 31/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/engine.rb:654:in `run_tasks_blocks' 32/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/application.rb:443:in `run_tasks_blocks' 33/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/engine.rb:457:in `load_tasks' 34/home/mstdn/live/Rakefile:6:in `<top (required)>' 35/home/mstdn/live/vendor/bundle/ruby/2.4.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>' 36/home/mstdn/.rbenv/versions/2.4.1/bin/bundle:22:in `load' 37/home/mstdn/.rbenv/versions/2.4.1/bin/bundle:22:in `<main>' 38(See full trace by running task with --trace)
どうすればrake secretが実行できるようになりますか。
よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2017/05/21 09:57
2017/05/22 05:56
退会済みユーザー
2017/05/24 05:05
2017/07/28 07:42
退会済みユーザー
2017/10/01 17:42 編集