-1

我从 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>'

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

瘦 1.5.0 已安装。

4

2 回答 2

-1

I had quite a bit of trouble setting up a dev environment on Windows myself. This error is only the first you'll be seeing of many (that's my guess, at least).

My solution was to set up Ubuntu in VirtualBox and install everything (including RubyMine) there. It works perfectly, and is a joy to use. As a bonus, I can save the machine state whenever I'm done coding, and when I get back to work, everything's right there exactly as I left it.

The actual files I work with are in a folder shared between my VM and my "real" machine, so the backup system for my computer backs them up automatically (in addition to pushing up to BitBucket).

Some people also use Vagrant to quickly create development VMs which let you keep using Windows (because you only need to SSH into your VM, and can keep editing files on Windows). A matter of taste, I guess.

于 2012-12-27T15:15:38.367 回答
-1

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

于 2012-12-27T15:18:06.870 回答