【问题标题】:Error in first RubyMine project: "Dont run Bundler as root"第一个 RubyMine 项目中的错误:“不要以 root 身份运行 Bundler”
【发布时间】:2016-06-30 23:23:37
【问题描述】:

我正在尝试设置我的第一个 RubyMine 项目(之前我使用了一个为 Rails 完全设置环境的 IDE)。

克隆 repo 并打开后,我无法安装必要的 gem,并出现错误。

40:232:执行错误:不要以 root 身份运行 Bundler。打包机可以问 如果需要 sudo ,则以 root 身份安装你的包 为这台机器上的所有非 root 用户中断这个应用程序。

重现错误:

  1. 打开项目时有一个弹窗。

RubyMine has detected that some of the gems required for 'job_tracker_1' are not installed

  1. 我查看run with sudo,然后点击install missing gems

  2. 然后我收到一个错误(如上所示)。

或者:

如果我在终端中运行bundle,则响应为bash: bundle: command not found

谁能告诉我如何解决这个问题?

【问题讨论】:

  • 不要检查run with sudo并尝试。
  • gem install bundle ?
  • @Kumar - 成功了!

标签: ruby-on-rails rubymine


【解决方案1】:

无需使用sudo 安装具有超级用户访问权限的 gem,如有必要,它可能会提示您这样做。

原因是使用sudo 安装将为所有用户以root 身份安装它。如果多人使用您的机器,这可能会导致奇怪的行为。即使您是单个用户,也建议您通常将 gems 安装到您的主文件夹本地。

取消选中run with sudo并点击install missing gems

【讨论】:

    猜你喜欢
    • 2021-02-28
    • 2014-10-15
    • 1970-01-01
    • 2010-11-02
    • 2017-12-15
    • 1970-01-01
    • 2022-12-03
    • 2019-05-15
    • 1970-01-01
    相关资源
    最近更新 更多