2009-10-27 92 views
0

我已經使用rubystack安裝了rails並設置了env路徑,所以我可以在cmd中使用它。當我嘗試使用它與cygwin我不工作(它不應該),如何使這個鋼軌工作在Windows和cygwin env或我必須單獨安裝。如何在Cygwin中使用rails

+0

使用Linux虛擬機。 – Dex 2011-09-13 07:50:43

+0

你有沒有在Cygwin中使用gem命令? – 2012-06-26 14:39:31

回答

0

如果你只是想安裝,所以你可以在cmd中使用它,那麼你可以做到這一點,而無需使用Cygwin。您可以在Windows下載並安裝ruby和rubygems,然後使用rubygems安裝您需要的rails和任何其他gem。然後,您必須正確設置路徑以包含ruby安裝的bin目錄,並且您應該能夠在Windows中使用cmd中的ruby。這並不能直接回答我所知道的問題,但是如果你只是在cmd中尋找rails,我希望它有幫助。

+0

謝謝,但我希望它在cygwin中運行,因爲e-textediot從它們運行它(如果我沒有這個錯誤)。現在我不能在e-texteditor中使用大多數導軌包,所以我想要一個解決方案。 – sarunw 2009-10-27 18:50:43

0

更新:我發現了兩個問題,解決了我在下面列出的問題。

首先

  • 運行Cygwin的setup.exe,然後搜索「使」
  • 等待搜索結果
  • 安裝中出現(您可以通過點擊附近的頂部做到這一點的所有項目「樹」)

其次

  • 運行Cygwin的setup.exe並安裝rebase軟件包。
  • 使用Windows CMD線(是的,它必須是Windows CMD線沒有在cygwin!),運行\cygwin\bin\ash
  • 在灰提示符下運行/bin/rebaseall

重新啓動Windows。運行cygwin。運行:gem install rails


我已經通過cygwin安裝文件安裝了Ruby。我還安裝了「make」,「sqlite」和「openssl/openssh」。

我已經通過從網站下載成功安裝了Gems,cd進入/ cygwin/bin /,然後進入臨時目錄,然後運行ruby setup.rb。

這一切都完美安裝。現在我運行gem install rails。它失敗產生以下錯誤。我無法找到關於此的更多信息。任何幫助非常感謝。

gem install rails 
cygwin warning: 
    MS-DOS style path detected: C:\ProgramData/gemrc 
    Preferred POSIX equivalent is: /cygdrive/c/ProgramData/gemrc 
    CYGWIN environment variable option "nodosfilewarning" turns off this warning. 
    Consult the user's guide for more details about POSIX paths: 
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames 
Building native extensions. This could take a while... 
     0 [main] ruby 524 C:\cygwin\bin\ruby.exe: *** fatal error - unable to remap \\?\C:\cygwin\lib\ruby\1.8\i386-cygwin\etc.so to same address as parent: 0x230000 != 0x330000 
     0 [main] ruby 524 C:\cygwin\bin\ruby.exe: *** fatal error - unable to remap \\?\C:\cygwin\lib\ruby\1.8\i386-cygwin\etc.so to same address as parent: 0x230000 != 0x330000 
Stack trace: 
Frame  Function Args 
023FAEF8 6102796B (023FAEF8, 00000000, 00000000, 00000000) 
     1 [main] ruby 2736 fork: child 524 - died waiting for dll loading, errno 11 
023FC218 61004F1B (611A7FAC, 61243684, 00230000, 00330000) 
End of stack trace 
     1 [main] ruby 2736 fork: child 524 - died waiting for dll loading, errno 11 
1049214 [main] ruby 6948 C:\cygwin\bin\ruby.exe: *** fatal error - unable to remap \\?\C:\cygwin\lib\ruby\1.8\i386-cygwin\etc.so to same address as parent: 0x230000 != 0x3D0000 
1049214 [main] ruby 6948 C:\cygwin\bin\ruby.exe: *** fatal error - unable to remap \\?\C:\cygwin\lib\ruby\1.8\i386-cygwin\etc.so to same address as parent: 0x230000 != 0x3D0000 
Stack trace: 
Frame  Function Args 
023FAEF8 6102796B (023FAEF8, 00000000, 00000000, 00000000) 
023FB1E8 6102796B (6117EC60, 00008000, 00000000, 61180977) 
023FC218 61004F1B (611A7FAC, 61243684, 001055653 [main] ruby 2736 fork: child 6948 - died waiting for dll loading, errno 11 
230000, 003D0000) 
End of stack trace 
1055653 [main] ruby 2736 fork: child 6948 - died waiting for dll loading, errno 11 
2095819 [main] ruby 6924 C:\cygwin\bin\ruby.exe: *** fatal error - unable to remap \\?\C:\cygwin\lib\ruby\1.8\i386-cygwin\etc.so to same address as parent: 0x230000 != 0x360000 
2095819 [main] ruby 6924 C:\cygwin\bin\ruby.exe: *** fatal error - unable to remap \\?\C:\cygwin\lib\ruby\1.8\i386-cygwin\etc.so to same address as parent: 0x230000 != 0x360000 
Stack trace: 
Frame  Function Args 
023FAEF8 6102796B (023FAEF8, 00000000, 00000000, 00000000) 
023FB1E8 6102796B (6117EC60, 00008000, 00000000, 61180977) 
023FC218 61004F1B (611A7FAC, 61243684, 00230000, 00360000)2103039 [main] ruby 2736 fork: child 6924 - died waiting for dll loading, errno 
11 

End of stack trace 
2103039 [main] ruby 2736 fork: child 6924 - died waiting for dll loading, errno 11 
ERROR: Error installing rails: 
     ERROR: Failed to build gem native extension. 

     /usr/bin/ruby.exe extconf.rb 
creating Makefile 

make 
gcc -I. -I/usr/lib/ruby/1.8/i386-cygwin -I/usr/lib/ruby/1.8/i386-cygwin -I. -g -O2 -c bcrypt_ext.c 
make: gcc: Command not found 
make: *** [bcrypt_ext.o] Error 127 


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/bcrypt-ruby-3.0.1 for inspection. 
Results logged to /usr/lib/ruby/gems/1.8/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out 

您的信息我的紅寶石和寶石版本低於:

$ ruby --version 
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin] 

$ gem -v 
1.8.10