Configuration error with Spork?: `require': no such file to load
I'm new to Ruby & Rails, and am currently working on the Rails Tutorial. Specifically I am currently working on the part of the book where I need to setup Spork.
Unfortunately when I enter
spork
I get
Using RSpec
-- Rinda Ring Server listening for connections...
-- Starting to fill pool...
Wait until at least one slave is provided before running tests...
** CTRL+BREAK to stop Spork and kill all ruby slave processes **
Spork is ready and listening on 8989!
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load --
magazine_slave (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from magazine_slave_provider.rb:5:in `<main>'
with the last 4 lines repeating.
Ok, simple enough, it appears to be a problem in lib/rubygems/custom_require.
The project lib dir doesn't contain a rubygems subdirectory, so I'm assuming it's in the ruby directory; but it isn't. So is rubygems some kind of virtual dir?
$ dir *custom_require*.* /s/b
Yeilds
C:\Ruby192\lib\ruby\1.9.开发者_开发知识库1\rubygems\custom_require.rb
C:\Ruby192\lib\ruby\gems\1.9.1\doc\rubygems-1.6.2\rdoc\lib\rubygems\custom_require_rb.html
C:\Ruby192\lib\ruby\gems\1.9.1\gems\rubygems-update-1.6.2\lib\rubygems\custom_require.rb
C:\Ruby192\lib\ruby\site_ruby\1.9.1\rubygems\custom_require.rb
So the html file obviously isn't it, and line 29 on the following files have comments.
C:\Ruby192\lib\ruby\gems\1.9.1\gems\rubygems-update-1.6.2\lib\rubygems\custom_require.rb
C:\Ruby192\lib\ruby\site_ruby\1.9.1\rubygems\custom_require.rb
There is code on line 29 of
C:\Ruby192\lib\ruby\1.9.1\rubygems\custom_require.rb
But when I commented out the code, I still got the error, and when I removed comments on lines before 29, the error line number did not change.
Can anybody throw me a bone as to what this might be?
Ok, here's what I did to solve the problem.
I'm not totally thrilled with the solution, and feel it leaves many more unanswered questions, but it may provide a hint to future people with similar problems.
I originally installed BitNami Ruby before RubyInstaller, so I thought there might be configurations somewhere that was at least partially using Bitnami, instead of RubyInstaller. So I uninstalled RubyInstaller, the BitNami. Then I reinstalled RubyInstaller and reran all gem installs etc, from the tutorial.
Unfortunately, while I no longer got the error above, I was getting a different one.
magazine_slave_provider.rb:5:in 'require': no such file to load -- magazine_slave (LoadError) from magazine_slave_provider.rb:5:in '<main>'
At least I could find this file & I solved this, by replacing
require 'magazine_slave'
withrequire File.dirname(__FILE__) + '/magazine_slave'
This seemed to resolve the problem for me, although it does seem like I just covered up a sympton of a bigger issue. It seems unlikely this is the actual problem when nobody else seems to be having this problem.
精彩评论