Ruby on Rails Win7 x64? [英] Ruby on Rails Win7 x64?

查看:79
本文介绍了Ruby on Rails Win7 x64?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



I've just upgraded to Win7 x64 Professional and wanted to recommence developing my Rails Apps, however I'm getting the following error :

=> Booting Mongrel
=> Rails 2.3.5 application starting on http://127.0.0.1:3344
D:/nu codes/R/ruby-1.8.7-p174-i386-mswin32/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:271:in `require_frameworks': 193: %1 is not a valid Win32 application.   - D:/nu codes/R/ruby-1.8.7-p174-i386-mswin32/lib/ruby/1.8/i386-mswin32/openssl.so (RuntimeError)
from D:/nu codes/R/ruby-1.8.7-p174-i386-mswin32/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:134:in `process'
from D:/nu codes/R/ruby-1.8.7-p174-i386-mswin32/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
from D:/nu codes/R/ruby-1.8.7-p174-i386-mswin32/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
from D:/nu codes/R/Aptana/tempproj/config/environment.rb:9
from D:/nu codes/R/ruby-1.8.7-p174-i386-mswin32/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from D:/nu codes/R/ruby-1.8.7-p174-i386-mswin32/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from D:/nu codes/R/ruby-1.8.7-p174-i386-mswin32/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from D:/nu codes/R/ruby-1.8.7-p174-i386-mswin32/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
from D:/nu codes/R/ruby-1.8.7-p174-i386-mswin32/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from D:/nu codes/R/ruby-1.8.7-p174-i386-mswin32/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84
from D:/nu codes/R/ruby-1.8.7-p174-i386-mswin32/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from D:/nu codes/R/ruby-1.8.7-p174-i386-mswin32/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from D:/nu codes/R/Aptana/tempproj/script/server:3
from -e:1:in `load'
from -e:1

Process finished with exit code 1

,同时尝试运行服务器。我通过将所需的.dll复制到ruby \ bin目录中,缓解了有关OpenSSL和Iconv的所有错误。我对这个难以置信,是不是现在我正在运行x64?我不知道,至少其他堆栈跟踪命名为导致它的.dll。

while trying to run the server. I've alleviated all the errors regarding OpenSSL and Iconv by copying the required .dll s into my ruby\bin directory. I'm stumped about this one, could it be that I'm running x64 now ? I have no idea, at least the other stack traces named the .dll which was causing it.

宝石列表:

*** LOCAL GEMS ***
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
authlogic (2.1.3)
cgi_multipart_eof_fix (2.5.0)
gem_plugin (0.2.3)
mongrel (1.1.5)
mysql (2.8.1)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)

我也运行MySQL v5.1.41-community。我会尝试安装MySQL 5.0。

I'm also running MySQL v5.1.41-community. I will try installing MySQL 5.0.


  • 更新:我必须说我永远不会在项目中使用OpenSSL,所以我必须说我是非常困惑,首先它是必需的。试着看看它是否是一个Rails错误,我创建了一个虚拟应用程序(rails bla),并且rails甚至不会创建默认骨架,因为一些随机错误(raise NotImplementedError,没有随机设备)弹出主动支持/ lib / active_support / secure_random.rb。我已经GOOGLE了,并用另一个版本替换它 github 。我创建了这个框架,但试图运行服务器,我得到了同样的错误,即使它是Rails默认的虚拟应用程序。再次文件,再次不知道什么OpenSSL是在这里做什么,并要求DLL。

  • Update : I must say that I never do use OpenSSL in the Project, so I must say I am quite baffled that it is required in the first place. Trying to see if it was a Rails error, I've created a dummy app (rails bla) and rails wouldn't even create the default skeleton since some random error ( "raise NotImplementedError, "No random device" ) popped up at "activesupport/lib/active_support/secure_random.rb" . I've googled that and replaced it with another version from github. That created the skeleton, but trying to run the server I get the same error, even if it's the Rails default dummy app. I will try to hack into that file again, again no idea what OpenSSL is doing here in the first place and requiring DLLs.

在亏本的任何帮助将是
先谢谢!

At a loss, any help would be appreciated. Thanks in advance !

推荐答案

它毕竟是一个DLL问题,去了1.8.6,x32 MySQL和OpenSSL,解压每个提到的dll 在这篇优秀的博客文章中,它们都运行得很顺利,天哪!是的,我已经回答了我自己的问题:-)谢谢!

It was a DLL problem after all, went 1.8.6, x32 MySQL and OpenSSL, unpacked every dll mentioned in this excellent blog post and it's all running smoothly again, gosh ! And yes, I've answered my own question after all :-) Thank you !

这篇关于Ruby on Rails Win7 x64?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆