尝试在osx yosemite中运行ruby脚本时出错

时间:2015-10-15 09:02:19

标签: ruby rspec osx-yosemite

$ rspec auth.rb
-bash: /usr/local/bin/rspec: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directory

为什么我会收到上述错误?

其他信息:

$ which ruby
/usr/bin/ruby

$ ruby -v
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]

本地宝石

$ gem list
bigdecimal (1.2.0)
CFPropertyList (2.2.8)
childprocess (0.5.6)
diff-lcs (1.2.5)
ffi (1.9.10)
io-console (0.4.2)
json (1.7.7)
libxml-ruby (2.6.0)
minitest (4.3.2)
multi_json (1.11.2)
nokogiri (1.5.6)
psych (2.0.0)
rake (0.9.6)
rdoc (4.0.0)
rspec (3.3.0)
rspec-core (3.3.2)
rspec-expectations (3.3.1)
rspec-mocks (3.3.2)
rspec-support (3.3.0)
rubygems-update (2.4.8)
rubyzip (1.1.7)
selenium-webdriver (2.48.1)
sqlite3 (1.3.7)
test-unit (2.0.0.0)
websocket (1.2.2)

使用此命令打开脚本

sudo nano auth.rb

有什么想法吗?

1 个答案:

答案 0 :(得分:0)