2012-12-11 4 views
0

2.0.2 레일 어플리케이션을 작업 중입니다. 이제 rake db:migate으로 windows 컴퓨터에서 명령을 실행하면 Errno::ENOEXEC in SystemsController#index이됩니다.Errno :: ENOEXEC 예외

Windows PC의 레일즈 응용 프로그램에서 시스템 명령을 실행하는 다른 방법이 있습니까?

Errno::ENOEXEC in SystemsController#index 

Exec format error - rake db:migrate 

RAILS_ROOT: E:/RoR/ibt/InstantRails-2.0-win/rails_apps/config 
Application Trace | Framework Trace | Full Trace 

E:/RoR/ibt/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``' `` 
E:/RoR/ibt/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``'` 
app/controllers/systems_controller.rb:24:in `index' 

내가 루비 콘솔에 무엇입니까 : 나는 레이크가 위치해 배치 파일에서 레이크 파일을 실행하여이 문제를 해결 한

irb(main):001:0> system('dir') 
Volume in drive E has no label. 
Volume Serial Number is 522C-BDB1 

Directory of E:\RoR\ibt\InstantRails-2.0-win\rails_apps\config 

11/29/2012 03:11 PM <DIR>   . 
11/29/2012 03:11 PM <DIR>   .. 
11/29/2012 02:41 PM <DIR>   app 
11/29/2012 02:42 PM <DIR>   config 

=> true 
irb(main):002:0> system('rake db:migrate') 
=> false 
irb(main):003:0> 
+0

. 시스템 명령 ' –

답변

0

여기

오류입니다 . 컨트롤러 파일

system("#{RAILS_ROOT}/../../ruby/bin/rake.bat db:migrate") 

에서

irb(main):001:0> system('dir') 
Volume in drive E has no label. 
Volume Serial Number is 522C-BDB1 

Directory of E:\RoR\ibt\InstantRails-2.0-win\rails_apps\config 

11/29/2012 03:11 PM <DIR>   . 
11/29/2012 03:11 PM <DIR>   .. 
11/29/2012 02:41 PM <DIR>   app 
11/29/2012 02:42 PM <DIR>   config 

=> true 
irb(main):002:0> system('rake db:migrate') 
=> false 

이 결과를 제공합니다

나는 점점 오전 오류와 함께 내 질문에 업데이트 한
== 99 AddFieldtoSystemAssoziations: migrating ================================= 
== 99 AddFieldtoSystemAssoziations: migrated (0.0391s) ======================== 
+0

을 사용했기 때문에 Formate가 깨졌습니다. 내 질문을 해결했습니다. 지원 mu 주셔서 감사합니다. –

관련 문제