我从github获得了一个名为Punchy的应用程序,我在本地服务器(Windows Vista)上运行它。它在Windows上运行良好,它在Heroku上运行良好。
环境是:
C:\Users\Jay\rapps\Punchy>rake about
(in C:/Users/Jay/rapps/Punchy)
About your application's environment
Ruby version 1.9.2 (i386-mingw32)
RubyGems version 1.5.2
Rack version 1.2
Rails version 3.0.0
Active Record version 3.0.0
Action Pack version 3.0.0
Active Resource version 3.0.0
Action Mailer version 3.0.0
Active Support version 3.0.0
Application root C:/Users/Jay/rapps/Punchy
Environment development
但是,我试图通过运行
来运行测试 > rake test
它变坏了。这是结果。
C:\Users\Jay\rapps\Punchy>rake test
(in C:/Users/Jay/rapps/Punchy)
C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `load': no such file to load -- winshellTEST
(LoadError)
from C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `block in <main>'
from C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `each'
from C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `<main>'
C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `load': no such file to load -- winshellTEST
(LoadError)
from C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `block in <main>'
from C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `each'
from C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `<main>'
C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `load': no such file to load -- winshellTEST
(LoadError)
from C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `block in <main>'
from C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `each'
from C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `<main>'
Errors running test:units, test:functionals, test:integration!
为什么它在我的本地机器上运行正常,在Heroku上,但测试不起作用?我感谢您提供的任何帮助。
答案 0 :(得分:0)
我能够从你的分支和Mazondo运行测试(7个测试中有2个失败)。我在osx上运行它们,所以环境完全不同。
运行测试我必须做的一件事是取消注释声明sqlite3作为Gemfile中的依赖项的行,然后运行迁移。
看起来问题是rails / ruby和windows之间的“集成”。有趣的是,google中唯一一个 winshellTEST 的热门话题就是你的问题。