【问题标题】:Shoes 4 - LoadError: no such file to load -- bundler/setup鞋子 4 - LoadError:没有要加载的文件 - 捆绑器/设置
【发布时间】:2016-03-28 01:36:50
【问题描述】:

我是 Ubuntu 的新手,我很难弄清楚我在使用 Ruby 和直接来自 Github 的 the latest edition of Shoes 时遇到的这个问题。

它列出了 JRuby 和 JDK 作为它的依赖项——我很确定我已经正确安装了 JRuby 和 JDK(后者以 OpenJDK 的形式,包括 7 和 8)。我已经成功(我认为)安装了鞋子。但是,当我尝试在其中一个示例应用程序上运行 Shoes 时,我收到了这个错误:

LoadError: no such file to load -- bundler/setup
require at org/jruby/RubyKernel.java:1040
require at /usr/share/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54
(root) at /home/deadman/Apps/shoes4/shoes-swt/bin/shoes-swt:6
load at org/jruby/RubyKernel.java:1059
(root) at /home/deadman/Apps/shoes4/bin/shoes-swt:5

我调查了人们遇到的类似错误,但没有一个是专门针对鞋子的,我无法弄清楚我到底做错了什么。

有人能指出我找出这些错误的正确方向或推荐解决方案吗?如果需要更多信息,我会发布。

【问题讨论】:

  • 您似乎没有安装 bundler gem。尝试从命令行运行gem install bundler
  • @JonCairns - 我确实安装了bundler,但还是尝试再次安装它。仍然没有运气。我还运行了gem server 进行确认,它列出了正在安装的bundler 1.11.2,以及相关的shoes 4 gems。

标签: java ruby ubuntu jruby shoes


【解决方案1】:

我在使用 warbler 和非鞋类应用时遇到了同样的问题。我能够通过在require 'bundler/setup'之前添加以下行来解决此问题:

require 'bundler/dep_proxy'
require 'bundler/index'
require 'bundler/match_platform'
require 'bundler/remote_specification'
require 'bundler/stub_specification'
require 'bundler/endpoint_specification'

在您的情况(鞋类应用)中,似乎有几条不同的 require 'bundler/setup' 行。也许在破解 gem 之前先尝试将上面的内容放在 你的 脚本的顶部...

【讨论】:

    猜你喜欢
    • 2013-10-04
    • 1970-01-01
    • 2013-06-16
    • 1970-01-01
    • 2011-04-21
    • 1970-01-01
    • 1970-01-01
    • 2023-03-28
    • 1970-01-01
    相关资源
    最近更新 更多