没有这样的文件或目录 - H:/(Errno :: ENOENT)

时间:2013-03-04 10:09:04

标签: ruby-on-rails ruby-on-rails-3 ruby-on-rails-3.2

我有一个rails项目,我试图在Windows Server 2013上捆绑。

我已经在我的本地Windows 7计算机上成功构建并测试了该应用程序,并已成功捆绑并运行另一台已成功的Windows Server 2013上的rails服务器。

现在,当捆绑到主服务器时,我得到以下内容:

C:\inetpub\wwwroot>bundle
Fetching source index for https://rubygems.org/
C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:54
:in `stat': No such file or directory - H:/ (Errno::ENOENT)
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_
fetcher.rb:54:in `initialize'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/source.rb:253:in `new'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/source.rb:253:in `fetch_all_remote_specs'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/source.rb:234:in `block in remote_specs'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/source.rb:231:in `each'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/source.rb:231:in `remote_specs'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/source.rb:165:in `fetch_specs'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/source.rb:70:in `specs'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/definition.rb:176:in `block (2 levels) in index'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/definition.rb:175:in `each'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/definition.rb:175:in `block in index'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/index.rb:7:in `build'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/definition.rb:174:in `index'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/definition.rb:168:in `resolve'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/definition.rb:107:in `specs'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/definition.rb:102:in `resolve_remotely!'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/installer.rb:43:in `run'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/installer.rb:8:in `install'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/cli.rb:219:in `install'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/vendor/thor/task.rb:22:in `run'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/vendor/thor.rb:263:in `dispatch'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/lib/bundler/vendor/thor/base.rb:386:in `start'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22
/bin/bundle:13:in `<top (required)>'
        from C:/RailsInstaller/Ruby1.9.3/bin/bundle:19:in `load'
        from C:/RailsInstaller/Ruby1.9.3/bin/bundle:19:in `<main>'

尝试此操作时也会收到类似的错误:

C:\inetpub\wwwroot>gem install win32-service
ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory - H:/

我的RubyGems环境:

C:\inetpub\wwwroot>gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.16
  - RUBY VERSION: 1.9.3 (2012-02-16 patchlevel 125) [i386-mingw32]
  - INSTALLATION DIRECTORY: C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe
  - EXECUTABLE DIRECTORY: C:/RailsInstaller/Ruby1.9.3/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mingw32
  - GEM PATHS:
     - C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

我尝试通过RailsInstaller重新安装rails并重新启动计算机。命令提示符也以管理员身份运行。

任何人都有理论吗?

1 个答案:

答案 0 :(得分:0)

解决了问题 - 服务器没有默认网关,因此没有到达我们的TMG服务器。