在ubuntu上spork LoadError

时间:2012-10-17 22:48:07

标签: ruby-on-rails spork

这是完整的错误。关于如何解决这个问题的任何想法。我在谷歌上找不到任何东西。我在VirtualBox上运行Ubuntu Linux。

Using RSpec, Unknown
cannot load such file -- magazine/magazine_slave (LoadError)
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/var/lib/gems/1.9.1/gems/spork-1.0.0rc3/lib/spork/run_strategy/magazine.rb:18:in `<top (required)>'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/var/lib/gems/1.9.1/gems/spork-1.0.0rc3/lib/spork/run_strategy.rb:48:in `block in <top (required)>'
/var/lib/gems/1.9.1/gems/spork-1.0.0rc3/lib/spork/run_strategy.rb:48:in `each'
/var/lib/gems/1.9.1/gems/spork-1.0.0rc3/lib/spork/run_strategy.rb:48:in `<top (required)>'
/var/lib/gems/1.9.1/gems/spork-1.0.0rc3/lib/spork/runner.rb:73:in `run'
/var/lib/gems/1.9.1/gems/spork-1.0.0rc3/lib/spork/runner.rb:10:in `run'
/var/lib/gems/1.9.1/gems/spork-1.0.0rc3/bin/spork:10:in `<top (required)>'
/usr/local/bin/spork:19:in `load'
/usr/local/bin/spork:19:in `<main>'

2 个答案:

答案 0 :(得分:2)

我的ubuntu系统遇到了同样的问题。问题在于gems文件权限,除了所有者之外,用户无法读取这些权限。要解决此问题,请将文件的权限更改为0644或+ r,如下所示:

$ chmod -v 644 files/myfile.txt
mode  of  `files/myfile.txt'  changed  to  0644  (rw-r--r--)

您可以使用 sudo 获得许可。有关更多操作,请访问http://help.unc.edu/help/how-to-use-unix-and-linux-file-permissions/

答案 1 :(得分:0)

上次我编辑上面的答案,但我仍然无法解决问题。

然后我做了一些搜索,最后我解决了。

根据解决方案,似乎已安装的gem没有为可执行文件提供足够的权限。

我用过这个:gem 'spork-rails', github: 'sporkrb/spork-rails'

解决方案:a gist on github