我在尝试使用捆绑安装时遇到此错误 - 是否有人知道可能导致它的原因?
$ 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'
答案 0 :(得分:0)
这是相当奇怪的但是在尝试某些事情的时候我偶然打错了捆绑器安装(而不是捆绑安装)并且它有效...
$ 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