【问题标题】:“Could not find bundler” ruby-2.3.0“找不到捆绑程序” ruby​​-2.3.0
【发布时间】:2016-11-17 15:07:07
【问题描述】:

我正在 Pi3 上安装 Dashing Dashboard。我有“在安装步骤中找不到 'bundler' 问题。我该如何完成安装?

$ source /home/pi/.rvm/scripts/rvm
-> OK

$ rvm current
ruby-2.3.0

$ bundle
/usr/lib/ruby/2.1.0/rubygems/dependency.rb:298:in 'to_specs': Could not find 'bundler' (>= 0) among 42 total gem(s) (Gem::LoadError)
    from /usr/lib/ruby/2.1.0/rubygems/dependency.rb:309:in 'to_specs'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:53:in 'gem'
    from /usr/local/bin/bundle:22:in '<main>'

$ gem install bundler
-> OK

$ bundle
-> the same problem

【问题讨论】:

  • 您的系统中可能存在配置错误。 RVM 告诉您您正在使用 ruby​​-2.3.0,但在您的堆栈跟踪中,我看到了对 ruby​​ 2.1.0 的 ruby​​gems 的引用。您能否提供您的 $PATH 变量和 which bundle 的输出?
  • “删除 rvm 并重新安装”解决了这个问题。感谢您的热情回复。

标签: ruby rvm bundler dashing


【解决方案1】:

我想你搞砸了你的权限,通过运行sudo gem install bundler 将捆绑程序安装到系统 gem 中。

删除捆绑器,然后将其安装在 RVM 下。仔细检查您的路径,以便将其安装在 RVM gem 存储中,而不是系统中。

【讨论】:

  • 谢谢Maxim,您的意思是/home/pi/.rvm 文件夹为“RVM 下”
  • 好像是这样,你可以使用 rvm gemdir 查看它在哪里。重新安装 bundler 后,它应该在 .rvm/ruby-2.3.0
  • 感谢您的回复。 “删除和重新安装”是个好主意。我应用了这些步骤,问题解决了。 $ rvm remove ruby​​-2.3.0 -&gt; 还没有 $ rvm uninstall ree,2.3.0 -&gt; OK $ rvm current system $ curl -L <a href="/default/index/tourl?u=aHR0cHM6Ly9nZXQucnZtLmlv" rel="nofollow" target="_blank">get.rvm.io</a> | bash -s stable --ruby -&gt; OK $ sudo reboot -&gt; OK $ source /home/pi/.rvm/scripts/rvm -&gt; OK $ rvm current ruby​​-2.3.0 $ cd project_name -&gt; OK $ gem install bundler -&gt; 好的 $ 捆绑包 -&gt; 好的
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-07-03
  • 1970-01-01
  • 2014-10-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多