【问题标题】:bundle install: TypeError: Arguments to path.resolve must be strings捆绑安装:TypeError:path.resolve 的参数必须是字符串
【发布时间】:2015-09-21 17:10:42
【问题描述】:

我在尝试使用 bundle install 时收到此错误 - 有人知道可能是什么原因造成的吗?

$ bundle install
path.js:439
      throw new TypeError('Arguments to path.resolve must be strings');
            ^
TypeError: Arguments to path.resolve must be strings
    at Object.posix.resolve (path.js:439:13)
    at Object.<anonymous> (/usr/local/lib/node_modules/script/bin/bundle:38:24)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

示例 gemfile:

source 'https://rubygems.org'
gem 'capybara'

【问题讨论】:

  • 谷歌充满创意
  • 您要安装什么 gem?您是否尝试过卸载 bundler 并重新安装?
  • 我建议在您的问题中发布您的 Gemfile,以便人们查看是否存在语法错误。
  • @fl00r,我确实先尝试了 Google,但找不到任何与捆绑程序相关的内容(谷歌搜索现在让我回到这篇文章!)。
  • @Chris 我已经尝试卸载并重新安装。我收到任何 gem 的错误,将示例添加到 OP

标签: ruby rubygems bundler gemfile


【解决方案1】:

这很奇怪,但是在尝试某些东西时,我不小心打错了 bundler install(而不是 bundle install),但它起作用了……

$ bundler install
    Resolving dependencies...
    Using builder 3.2.2
    Using mime-types 2.6.1
    Using mini_portile 0.6.2
    Using nokogiri 1.6.6.2
    Using rack 1.6.4
    Using rack-test 0.6.3
    Using xpath 2.0.0
    Using capybara 2.4.4
    Using ffi 1.9.10
    Using childprocess 0.5.6
    Using cmdparse 3.0.1
    Using multi_json 1.11.2
    Using gherkin 2.12.2
    Using cucumber-core 1.2.0
    Using diff-lcs 1.2.5
    Using multi_test 0.1.2
    Using cucumber 2.0.2
    Using unf_ext 0.0.7.1
    Using unf 0.1.4
    Using domain_name 0.5.24
    Using highline 1.7.3
    Using http-cookie 1.0.2
    Using json 1.8.3
    Using net-http-persistent 2.9.4
    Using net-ssh 2.9.2
    Using net-ssh-gateway 1.2.0
    Using netrc 0.10.3
    Using parallel 1.6.1
    Using parallel_tests 0.15.0
    Using require_all 1.3.2
    Using rest-client 1.8.0
    Using rspec-support 3.3.0
    Using rspec-core 3.3.2
    Using rspec-expectations 3.3.1
    Using rspec-mocks 3.3.2
    Using rspec 3.3.0
    Using rubyzip 1.1.7
    Using sauce_whisk 0.0.18
    Using websocket 1.2.2
    Using selenium-webdriver 2.46.2
    Using sauce 3.1.3
    Using sauce-connect 3.1.0
    Using watir-webdriver 0.8.0
    Using bundler 1.10.6
    Bundle complete! 9 Gemfile dependencies, 44 gems now installed.
    Use `bundle show [gemname]` to see where a bundled gem is installed

但是当我输入 bundle install 时:

$ bundle install
path.js:439
      throw new TypeError('Arguments to path.resolve must be strings');
            ^
TypeError: Arguments to path.resolve must be strings
    at Object.posix.resolve (path.js:439:13)
    at Object.<anonymous> (/usr/local/lib/node_modules/script/bin/bundle:38:24)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-30
    • 2015-03-24
    • 2020-05-05
    • 2017-05-06
    • 2019-11-04
    • 1970-01-01
    相关资源
    最近更新 更多