我有一个 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 重新安装导轨并重新启动机器。命令提示符也以管理员身份运行。
有人有任何理论吗?