views:

1268

answers:

2

Hi,

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

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.

Gem listing :

*** 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)

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

  • 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 !

A: 

See if this helps: http://www.technipages.com/error-193-1-is-not-a-valid-win32-application.html

From what is mentioned in this article, do you have a folder called "nu" in your D:/ drive? If yes, try renaming it and check if the server runs fine.

Vijay Dev
Thank you for the suggestion, though it's not from the path -- I cannot start a server from a regular directory "D:\bla" for instance (generated a sample project, rails bla), still getting the same error.
Dr1Ku
+3  A: 

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 !

Dr1Ku