简体   繁体   English

Rails Installer + Cygwin:如何在Cygwin内最佳使用Rails安装程序的红宝石版本?

[英]Rails Installer + Cygwin: How to best use the ruby version of the rails installer inside Cygwin?

I've just installed my Windows setup for working on Ruby on Rails through RailsInstaller. 我刚刚安装了Windows安装程序,以便通过RailsInstaller在Ruby on Rails上工作。 On the Windows command line it all works well. 在Windows命令行上,一切正常。 I'm also using cygwin, which install by default its own version of ruby. 我还使用cygwin,默认情况下会安装自己的ruby版本。 That doesn't work along well with C-extension gems like bcrypt-ruby. 对于像bcrypt-ruby这样的C扩展名宝石,这不能很好地工作。 the RailsInstaller version of ruby doesn't have a problem though. 虽然,Ruby的RailsInstaller版本没有问题。

Where I do get an issue is when I try to install unix-specific gems like unicorn on windows. 当我尝试在Windows上安装特定于Unix的宝石(例如独角兽)时,我确实遇到了问题。 It won't go. 不会的 This should work on cygwin. 这应该对cygwin有效。 So I'm in a conundrum. 所以我很困惑。 I've uninstalled the cygwin ruby. 我已经卸载了Cygwin红宝石。 But now I can't run the other ruby, rubygems or rake inside cygwin. 但是现在我无法在Cygwin中运行其他红宝石,红宝石或耙子。 It spits out the following lovely message: 它发出以下可爱的消息:

 C:\RailsInstaller\Ruby1.9.3\bin\ruby.exe: No such file or directory -- 
 /cygdrive/c/RailsInstaller/Ruby1.9.3/bin/bundle (LoadError)

Hope some of you could work around the issue. 希望你们中的一些人可以解决这个问题。

Cygwin Ports provides Rails for Cygwin's Ruby; Cygwin Ports为Cygwin的Ruby提供Rails。 choose the ruby-rails package and allow all dependencies to be installed. 选择ruby-rails软件包并允许安装所有依赖项。

Yaakov was close, it is indeed easier to just install everything into cygwin, including the C-extension gems (or most of them). Yaakov距离很近,只需将所有内容都安装到cygwin中确实很容易,包括C扩展名的gem(或其中大多数)。 The problem remains though, everytime there is an update on one of those gems. 但是,问题仍然存在,每当其中一个宝石有更新时。 Actually the solution was installing the devel make packages that were missing from my cygwin. 实际上,解决方案是安装我的cygwin缺少的devel make软件包。 After that I finally could compile and proceed. 之后,我终于可以编译并继续。

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

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