当我输入“bundle exec rake spec”时,我无法解决捆绑器或宝石的问题;
我正在尝试运行该命令
bundle exec rake spec
,但它返回以下内容:
/Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/shared_helpers.rb:2:in `require': no such file to load -- rubygems (LoadError)
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/shared_helpers.rb:2
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/setup.rb:1:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/setup.rb:1
要求 gems 似乎存在问题,但我的计算机上确实运行了 gems,
$ gem -v
返回 1.8.5
我不知道这是否与位置有关文件被存储?当我运行时,
$ gem list -d bundler
我得到
*** LOCAL GEMS ***
bundler (1.0.21)
Authors: André Arko, Terence Lee, Carl Lerche, Yehuda Katz
Rubyforge: http://rubyforge.org/projects/bundler
Homepage: http://gembundler.com
Installed at: /Library/Ruby/Gems/1.8
The best way to manage your application's dependencies
And in IRB:
irb(main):001:0> require "bundler"
LoadError: no such file to load -- bundler
from (irb):1:in `require'
from (irb):1
from :0
I've attempts toggling between different versions of Rails 3.0 (3.0.9 and 3.0.8), 我尝试卸载并安装 Bundler,并转到 RubyGems 检查是否还有我需要的任何进一步的依赖项,但似乎没有任何效果。
我正在使用 Snow Leopard 10.6.8 和 Ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10]
任何指示将不胜感激!
I'm trying to run the command
bundle exec rake spec
but it returns the following:
/Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/shared_helpers.rb:2:in `require': no such file to load -- rubygems (LoadError)
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/shared_helpers.rb:2
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/setup.rb:1:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.21/lib/bundler/setup.rb:1
There seems to be a problem with the requiring of gems but I do have gems running on my machine,
$ gem -v
returns 1.8.5
I don't know if it's to do with where the files are stored? When I run
$ gem list -d bundler
I get
*** LOCAL GEMS ***
bundler (1.0.21)
Authors: André Arko, Terence Lee, Carl Lerche, Yehuda Katz
Rubyforge: http://rubyforge.org/projects/bundler
Homepage: http://gembundler.com
Installed at: /Library/Ruby/Gems/1.8
The best way to manage your application's dependencies
And in IRB:
irb(main):001:0> require "bundler"
LoadError: no such file to load -- bundler
from (irb):1:in `require'
from (irb):1
from :0
I've tried toggling between different versions of Rails 3.0 (3.0.9 and 3.0.8),
I've tried uninstalling and installing Bundler and been over to RubyGems to check if there were any further dependencies I needed but nothing seems to be working.
I'm using Snow Leopard 10.6.8 and Ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10]
Any pointers would be much appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该使用 ruby 1.9.x。 Rails 将不再支持 1.8 分支。
考虑使用 http://beginrescueend.com
尝试使用 ruby 1.9,我怀疑这就是问题所在。
You should be using ruby 1.9.x. The 1.8 branch won't be supported for much longer in Rails.
Consider using http://beginrescueend.com
Try with ruby 1.9, I suspect that is the problem.