简体   繁体   English

Windows 7 x64上的Ruby错误

[英]ruby error on windows 7 x64

install ruby 1.9.3, devkit, mingw gem install rails work good, but when i create new rails app - have bundler error 安装ruby 1.9.3,devkit,mingw gem安装rails效果很好,但是当我创建新的rails应用时-出现bundler错误

D:/Programes/Ruby193/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': 193: %1 эх  ты хЄё  яЁшыюцхэшхь Win32.   - D:/Programes/Ruby193/lib/ruby/1.9.1/i386-mingw32/digest/sha1.so (LoadError)
    from D:/Programes/Ruby193/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from D:/Programes/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/definition.rb:1:in `<top (required)>'
    from D:/Programes/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler.rb:138:in `definition'
    from D:/Programes/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/cli.rb:219:in `install'
    from D:/Programes/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/vendor/thor/task.rb:22:in `run'
    from D:/Programes/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
    from D:/Programes/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/vendor/thor.rb:263:in `dispatch'
    from D:/Programes/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/vendor/thor/base.rb:386:in`start'
    from D:/Programes/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/bin/bundle:13:in `<main>'

and commands like 和类似的命令

D:\Work\ruby>gem help commands
ERROR:  Loading command: server (LoadError)
193: %1 эх  ты хЄё  яЁшыюцхэшхь Win32.   - D:/Programes/Ruby193/lib/ruby/1.9.1/i386-mingw32/digest/md5.so
ERROR:  While executing gem ... (NameError)
uninitialized constant Gem::Commands::ServerCommand

file md5.so exists what i forgot to do and may ruby don`t work on windows 7 x64? 文件md5.so存在我忘记做的事情,并且可能在Windows 7 x64上无法运行ruby吗?

I think you use cyrillic without # encoding: UTF-8 , just add it to file where you use эх ты... 我认为您使用的西里尔字母没有# encoding: UTF-8 ,只需将其添加到文件中即可使用эх ты...

PS: откуда вообще там кирилица? PS:откудавообщетамкирилица?

Also running Windows 7 x64, and I had this same problem crop up on me with 1.9.3-p0. 同样运行Windows 7 x64,我在1.9.3-p0上也遇到了同样的问题。 Searched the web without success. 在网上搜索失败。 Also tried copying in the "sha1.so" file from 1.9.2-p290 in case it was a problem with that particular library -- nope. 还尝试从1.9.2-p290复制“ sha1.so”文件,以防特定库(不是)出现问题。

I'd suggest something about rubygems or bundler seems to break require , but the same bundler and rubygems code runs fine on 1.9.2. 我建议关于rubygems或bundler的某些内容似乎违反了require ,但是相同的bundler和rubygems代码在1.9.2上运行良好。 I get no problem running require "digest/sha1" in my own bare test file with Ruby 1.9.3. 我在使用Ruby 1.9.3的裸机测试文件中运行require "digest/sha1"没有问题。

Reverting to Ruby 1.9.2-p290 fixed the problem for me for the moment. 恢复到Ruby 1.9.2-p290暂时解决了我的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM