瘦Web服务器拒绝在Windows 7 x64中运行

时间:2012-12-27 14:47:55

标签: ruby-on-rails windows-7 webserver thin

我从Github采用了一个项目,无法在Windows 7 x64中运行。

当我尝试在RubyMine中启动调试器时,我得到了这个:

runnerw.exe C:\Ruby193\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.17.beta14/bin/rdebug-ide --dispatcher-port 19743 --port 19744 -- D:/Work/angular-devise/script/rails server -b 127.0.0.1 -p 3000 -e development
Fast Debugger (ruby-debug-ide 0.4.17.beta14, ruby-debug-base 0.11.30.pre10) listens on 127.0.0.1:19744
Uncaught exception: cannot load such file -- thin_parser
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in 'require'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in 'block in require'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in 'load_dependency'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in 'require'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/thin-1.5.0/lib/thin.rb:39:in '<top (required)>'
    C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in 'require'
    C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in 'require'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in 'block (2 levels) in require'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in 'each'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in 'block in require'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in 'each'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in 'require'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler.rb:119:in 'require'
    D:/Work/Paul/Documents/PROGRAMM/Hill30/Projects/trainer-common/StringsEditor/angular-devise/config/application.rb:13:in '<top (required)>'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:53:in 'require'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:53:in 'block in <top (required)>'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in 'tap'
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in '<top (required)>'
    D:/Work/Paul/Documents/PROGRAMM/Hill30/Projects/trainer-common/StringsEditor/angular-devise/script/rails:6:in 'require'
    D:/Work/Paul/Documents/PROGRAMM/Hill30/Projects/trainer-common/StringsEditor/angular-devise/script/rails:6:in '<top (required)>'

Process finished with exit code 0

如果我尝试使用rails server命令运行应用程序,我会得到:

D:\Work\angular-devise>rails server
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in 'require': cannot load such file -- thin_parser (LoadError)
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in 'block in require'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in 'load_dependency'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in 'require'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thin-1.5.0/lib/thin.rb:39:in '<top (required)>'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in 'require'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in 'block (2 levels) in require'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in 'each'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in 'block in require'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in 'each'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in 'require'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler.rb:119:in 'require'
        from D:/Work/Paul/Documents/PROGRAMM/Hill30/Projects/trainer-common/StringsEditor/angular-devise/config/application.rb:13:in '<top (required)>'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:53:in 'require'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:53:in 'block in <top (required)>'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in 'tap'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in '<top (required)>'
        from script/rails:6:in 'require'
        from script/rails:6:in '<main>'

并且不知道该怎么做。谷歌不知道这个错误。在消除错误时你能指导我吗?

安装了Thin 1.5.0。

2 个答案:

答案 0 :(得分:-1)

我自己在Windows上设置开发环境时遇到了一些麻烦。这个错误只是你会看到的第一个错误(至少是我的猜测)。

我的解决方案是在VirtualBox中设置Ubuntu并在那里安装所有内容(包括RubyMine)。它工作得很好,使用起来很愉快。作为奖励,我可以在我完成编码时保存机器状态,当我重新开始工作时,一切都就在我离开的时候。

我使用的实际文件位于我的VM和我的&#34;真实&#34;之间共享的文件夹中。机器,所以我的计算机的备份系统自动备份它们(除了推送到BitBucket)。

有些人还使用Vagrant快速创建开发虚拟机,让您可以继续使用Windows(因为您只需要通过SSH连接到虚拟机,并可以继续在Windows上编辑文件)。我想是一个品味问题。

答案 1 :(得分:-1)

尝试使用'bundle exec rails s'来启动服务器。