如何在 Cygwin 中使用 Rails
我已经使用 rubystack 安装了 Rails 并设置了 env 路径,因此我可以在 cmd 中使用它。当我尝试将它与 cygwin 一起使用时,我无法工作(它不应该),如何使该 Rails 在 Windows 和 cygwin env 上工作,或者我必须单独安装它。
I have installed rails using rubystack and set env path, so I can use it in cmd. When I try to use it with cygwin I doesn't work (it shouldn't), how to make this rails work on both windows and cygwin env or I have to install it separately.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您只是想安装以便可以在 cmd 中使用它,那么您无需使用 Cygwin 即可完成此操作。您可以在 Windows 中下载并安装 ruby 和 rubygems,然后使用 rubygems 安装 Rails 和您需要的任何其他 gem。然后,您只需正确设置路径以包含 ruby 安装的 bin 目录,您应该能够在 Windows 中通过 cmd 使用 ruby。我知道这并不能直接回答你的问题,但如果你只是在cmd中寻找rails,我希望它有帮助。
If you are just looking to install so you can use it in cmd, then you can do this without having to use Cygwin. You can download and install ruby and rubygems in windows and then use rubygems to install rails and any other gems you need. You then just have to set the path properly to include the bin directory of the ruby installation and you should be able to use ruby from cmd in windows. This doesn't directly answer your questions I know, but if you are just looking for rails in the cmd, I hope it is helpful.
更新:我发现两个项目解决了我在下面概述的问题。
首先
其次
\cygwin\bin\ash
/bin/rebaseall
重新启动 Windows。运行 cygwin。运行:
gem install Rails
我已经通过 cygwin 安装文件安装了 Ruby。我还安装了“make”、“sqlite”和“openssl/openssh”。
然后,我通过从网站下载、cd 到 /cygwin/bin/ ,然后进入临时目录,然后运行 ruby setup.rb 成功安装了 Gems。
这一切都安装得很完美。
现在我运行
gem install Rails
。它失败并产生以下错误。我找不到更多这方面的信息。非常感谢任何帮助。供您参考,我的 ruby 和 gem 版本如下:
Update: I found two items which fixed the problem I outlined below.
Firstly
Secondly
\cygwin\bin\ash
/bin/rebaseall
Restart Windows. Run cygwin. Run:
gem install rails
I have installed Ruby via the cygwin setup file. I've also installed "make", "sqlite" and "openssl/openssh".
I've then sucessfully installed Gems by downloading from website, cd into /cygwin/bin/ and then into a temp directory and then running ruby setup.rb.
This all installed perfectly.
Now I run
gem install rails
. It fails producing the following error. I can't find any more info on this. Any help much appreciated.For your info my ruby and gem versions are below:
请访问此站点:
http: //www.pluitsolutions.com/2006/03/30/install-ruby-on-rails-ror-on-cygwin
但是,如果您有其他问题,请发表评论,我们会查看。
Please visit this site:
http://www.pluitsolutions.com/2006/03/30/install-ruby-on-rails-ror-on-cygwin
However, if you have a different issue leave a comment and we will have a look.