Rails安装'捆绑'抛出错误信息

时间:2013-02-04 02:04:05

标签: ruby-on-rails ruby bundle

我刚尝试通过RailsInstaller for Windows安装Ruby on Rails。一切都很顺利,直到我尝试创建我的第一个应用程序。基本上我跑

rails new 'first_app'

并且它会创建所有相应的文件,但在尝试运行“bundle install”

时会抛出此错误消息
C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:
36:in `require': 193: %1 is not a valid Win32 application.   - C:/RailsInstaller
/Ruby1.9.3/lib/ruby/1.9.1/i386-mingw32/openssl.so (LoadError)
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/openssl.rb:17:in `<top (
required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/https.rb:22:in `<top (required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/remot
e_fetcher.rb:316:in `connection_for'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/remot
e_fetcher.rb:368:in `request'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/remot
e_fetcher.rb:203:in `fetch_http'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/remot
e_fetcher.rb:213:in `fetch_http'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/remot
e_fetcher.rb:231:in `fetch_path'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_
fetcher.rb:265:in `load_specs'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_
fetcher.rb:231:in `block in list'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_
fetcher.rb:227:in `each'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_
fetcher.rb:227:in `list'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_
fetcher.rb:150:in `find_matching_with_errors'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/spec_
fetcher.rb:89:in `fetch_with_errors'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/depen
dency_installer.rb:110:in `find_gems_with_sources'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/depen
dency_installer.rb:228:in `find_spec_by_name_and_version'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/depen
dency_installer.rb:259:in `install'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/comma
nds/install_command.rb:121:in `block in execute'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/comma
nds/install_command.rb:115:in `each'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/comma
nds/install_command.rb:115:in `execute'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/comma
nd.rb:278:in `invoke'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/comma
nd_manager.rb:147:in `process_args'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/comma
nd_manager.rb:117:in `run'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/gem_r
unner.rb:65:in `run'
    from C:/RailsInstaller/Ruby1.9.3/bin/gem:21:in `<main>'

我尝试过重新安装,但它仍然会引发错误。

1 个答案:

答案 0 :(得分:2)

此处的相关错误消息为193: %1 is not a valid Win32 application

结帐this answer for a previous question about the same;它解释了问题发生的原因,并提供了如何解决问题的建议。

提供答案的人 - Luis Lavena - 广泛努力使ruby在Windows上运行良好,并且是Ruby Installer for Windows的创建者。