質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Q&A

解決済

1回答

7836閲覧

bundle installでエラー発生する。

kumasan616

総合スコア10

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

0グッド

0クリップ

投稿2018/09/07 01:52

編集2018/09/07 02:15

前提・実現したいこと

Centos7環境で、Bitnami Redmine-3.4.6-1(2018/9/7時点最新版)をインストールし、プラグインをインストールしようとすると、エラー発生でプラグインをインストールできない。

発生している問題・エラーメッセージ

bundle installすると、
以下のメッセージが表示されてしまう。
※bundle install --no-deploymentを指定しても同じ結果になってしまいます。

「Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.」


↓ここからは実際のコマンドです。

[root@localhost ~]# cd /opt/redmine-3.4.6-1/
[root@localhost redmine-3.4.6-1]# ./use_redmine
bash-4.2# echo $PATH
/opt/redmine-3.4.6-1/perl/bin:/opt/redmine-3.4.6-1/git/bin:/opt/redmine-3.4.6-1/sqlite/bin:/opt/redmine-3.4.6-1/ruby/bin:/opt/redmine-3.4.6-1/subversion/bin:/opt/redmine-3.4.6-1/postgresql/bin:/opt/redmine-3.4.6-1/php/bin:/opt/redmine-3.4.6-1/mysql/bin:/opt/redmine-3.4.6-1/apache2/bin:/opt/redmine-3.4.6-1/common/bin:/root/.rbenv/shims:/root/.rbenv/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/root/bin
bash-4.2# cd /opt/redmine-3.4.6-1/apps/redmine/htdocs/plugins/
bash-4.2# bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Using rake 12.3.1
Using i18n 0.7.0
Using minitest 5.11.3
Using thread_safe 0.3.6
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.3.0
Using crass 1.0.4
Using rack 1.6.10
Using mime-types-data 3.2016.0521
Using arel 6.0.4
Using public_suffix 3.0.2
Using coderay 1.1.2
Using concurrent-ruby 1.0.5
Using htmlentities 4.3.4
Using thor 0.20.0
Using mimemagic 0.3.2
Using mysql2 0.4.10
Using net-ldap 0.12.1
Using ruby-openid 2.3.0
Using bundler 1.14.6
Using rbpdf-font 1.19.1
Using redcarpet 3.4.0
Using request_store 1.0.5
Using rmagick 2.16.0
Using tzinfo 1.2.5
Using nokogiri 1.8.2
Using rack-test 0.6.3
Using mime-types 3.1
Using addressable 2.5.2
Using sprockets 3.7.1
Using rack-openid 1.4.2
Using rbpdf 1.19.3
Using activesupport 4.2.8
Using loofah 2.2.2
Using mail 2.6.6
Using css_parser 1.6.0
Using rails-deprecated_sanitizer 1.0.3
Using globalid 0.4.1
Using activemodel 4.2.8
Using fiscali 2.4.3
Using rails-html-sanitizer 1.0.4
Using roadie 3.2.2
Using rails-dom-testing 1.0.9
Using activejob 4.2.8
Using activerecord 4.2.8
Using protected_attributes 1.1.4
Using actionview 4.2.8
Using actionpack 4.2.8
Using actionmailer 4.2.8
Using actionpack-xml_parser 1.0.2
Using railties 4.2.8
Using sprockets-rails 3.2.1
Using jquery-rails 3.1.5
Using roadie-rails 1.1.1
Using rails 4.2.8
Bundle complete! 32 Gemfile dependencies, 56 gems now installed.
Gems in the groups development, test and sqlite were not installed.
Use bundle show [gemname] to see where a bundled gem is installed.
bash-4.2#


該当のソースコード

ソースコード

試したこと

ここに問題に対して試したことを記載してください。

補足情報(FW/ツールのバージョンなど)

ここにより詳細な情報を記載してください。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

mather

2018/09/07 02:04

プラグイン、というタグは不適切です。Rubyなどのほうがまだ良いと思います。
kumasan616

2018/09/07 02:10

ご指摘ありがとうございます。当方LinuxやRedmineについては経験浅い為誤認識していました。Rubyに変更しました。
guest

回答1

0

ベストアンサー

エラーメッセージではなく、警告です。実際にインストールは実行されてますよね。

Don't run Bundler as root.
(Bundlerをrootユーザーで実行しないでください。)

基本はプロジェクト単位で Gemfile を管理すれば良いので、 root 権限は必要ないはずです。一旦 root ユーザーで実行してしまうと今後も root ユーザーの権限でないと実行できなくなってしまうケースがあります。

root は権限が強すぎるため、間違うとシステムを破壊しかねません。どうしても必要な場合を除き、使うべきではありません。
Linuxのユーザー管理をちゃんと勉強してくださいね。

投稿2018/09/07 02:01

mather

総合スコア6753

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

kumasan616

2018/09/07 02:13

ご回答ありがとうございます。 当方LinuxやRedmineについては経験浅い為に、もう少しお聞きしたく。 rootではなく、別ユーザーでログインし、bundle installを実行でよいのでしょうか。
kumasan616

2018/09/07 05:01

インストールは実行されていました。 ありがとうございました。
mather

2018/09/07 05:30

はい。ファイルの置き場所の問題もあると思います。 例えば、 redmine ユーザーというのを作っておいて、 redmineユーザーでインストールとRedmineプロセスの起動を管理し、そこにApache, nginxを繋ぐ部分だけrootユーザーで管理するなどの方法が代表的かと思います。 なぜ一般のユーザーではなくredmineユーザーをわざわざ作るのかと言うと、Redmineのプロセスからは特定のディレクトリ以外へのアクセスを許可しないなどの個別のコントロールがやりやすいからです。
kumasan616

2018/09/07 08:24

ありがとうございます。 プラグインがインストールされました。 本当に助かりました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問