问题描述
我在Mac上复制了一个testscripts文件夹,并从该站点逐步安装了ruby: https://gorails.com/setup/osx/10.10-yosemite
当我尝试运行任何.rb文件时,其抛出错误:/Users/**/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:require': cannot load such file -- selenium-webdriver (LoadError) from /Users/**/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
require' 来自create_new_course.rb:2:in''
我一直在搜索这样的错误,解决方案上发布的任何内容都没有帮助我.有什么建议吗?这是因为我只需要在特定位置复制scriptf文件夹.
另外,当我运行Rake命令时,它抛出以下错误:
耙子中止了!LoadError:无法加载此类文件-selenium-webdriver/Users//Documents///tests//Rakefile:4:in''(通过使用--trace运行任务,查看完整的跟踪信息)有人遇到此错误吗?关于此的任何建议都会有所帮助.
谢谢!
您可能没有安装selenium-webdriver gem.在您的终端中执行:
gem install selenium-webdriver
这是假设您安装了红宝石宝石,如果该命令不起作用,请从 https:/下载红宝石宝石./rubygems.org/pages/download .
I copied a testscripts folder on my mac, installed ruby step by step from this site: https://gorails.com/setup/osx/10.10-yosemite
When I'm trying to run any .rb file its throwing error:/Users/**/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- selenium-webdriver (LoadError) from /Users/**/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
require' from create_new_course.rb:2:in `'
I searched for such errors all over and none of the posted on solution helped me. Any Suggestion? Is this becuase I have to copy the scriptf folder in specific location only.
Also when I am running Rake command its throwing below error:
rake aborted!LoadError: cannot load such file -- selenium-webdriver/Users//Documents///tests//Rakefile:4:in `'(See full trace by running task with --trace)
Has anyone came across this error? Any suggestions on this would be helpful.
Thanks!
You likely don't have the selenium-webdriver gem installed. In your terminal execute:
gem install selenium-webdriver
This is assuming you have ruby gems installed, if that command doesn't work, download ruby gems from https://rubygems.org/pages/download.
这篇关于无法在Mac上运行.rb文件-在'require'中获取/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!