草庐IT

getting-the-windows-os-version-in

全部标签

ruby-on-rails - 错误 : failed to build gem native extension when installing rails on mac mountian lion os

我最近更新到MountainLion并重新安装了Ruby,但是当我尝试运行测试Rails应用程序时,我收到一条错误消息,指出“我的系统当前未安装Rails”。我按照它说的做,输入sudogeminstallrails并得到:clearedfaster_requirecachesduetonewgeminstall...Successfullyinstalledrails-3.2.71geminstalledInstallingridocumentationforrails-3.2.7...InstallingRDocdocumentationforrails-3.2.7...但是当我检

ruby - Rspec : expect vs expect with block - what's the difference?

刚刚学习rspec语法,我注意到这段代码有效:context"givenabadlistofplayers"dolet(:bad_players){{}}it"failstocreategivenabadplayerlist"doexpect{Team.new("Random",bad_players)}.toraise_errorendend但是这段代码没有:context"givenabadlistofplayers"dolet(:bad_players){{}}it"failstocreategivenabadplayerlist"doexpect(Team.new("Rando

ruby-on-rails - Ruby:在 Windows 7 下安装 EventMachine 时出现问题

我正在尝试通过捆绑在Windows7上安装gemEventMachine(使用Ruby1.9.2和RubyInstaller),但出现以下错误。我还安装了DevKit,它可以正常工作,但我仍然无法弄清楚问题是什么:Installingeventmachine(0.12.10)withnativeextensionsC:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:551:in`rescueinblockinbuild_extensions':ERROR:Failedtobuildgemnativeextension.(G

ruby - 将 Ruby 程序作为 Windows 服务运行?

是否可以将ruby​​应用程序作为Windows服务运行?我看到有一个相关问题讨论运行JavaApplicationasaWindowsService,如何使用Ruby应用程序执行此操作? 最佳答案 查看以下库:Win32Utils.您可以创建一个简单的服务,您可以在闲暇时启动/停止/重新启动。我目前正在使用它来管理Windows托管的Rails应用程序的Mongrel实例,并且它可以完美运行。 关于ruby-将Ruby程序作为Windows服务运行?,我们在StackOverflow上

ruby-on-rails - 在 Windows 上安装特定的 Ruby on Rails 版本

通常我使用:geminstallrails我可以在Windows上安装Rails,但默认情况下,我猜安装的是最新版本3.0.3。如果我想安装其他版本的Rails,比如3.0.1,我该怎么做? 最佳答案 例子:geminstallrails-v3.0.1另外,运行gem-h可以看到gem的所有选项注意事项:如果你在*nix上使用RVM强烈推荐用于Ruby管理。 关于ruby-on-rails-在Windows上安装特定的RubyonRails版本,我们在StackOverflow上找到一个

ruby 和 "You must recompile Ruby with OpenSSL support or change the sources in your Gemfile"

我使用rvm将我的ruby​​升级到1.9.3-p392,还添加了2.0.0,每当我尝试使用这个版本时,当我运行我的bundle命令时,我都会收到这个错误。CouldnotloadOpenSSL.YoumustrecompileRubywithOpenSSLsupportorchangethesourcesinyourGemfilefrom'https'to'http'.InstructionsforcompilingwithOpenSSLusingRVMareavailableatrvm.io/packages/openssl.我已经按照几个不同的说明来解决这个问题。我尝试删除版本并

ruby - 如何在没有 Xcode 的情况下在 Mac OS X Mountain Lion 中安装 Ruby 1.9.3?

我想知道在OSX10.8MountainLion上为Ruby1.9.3构建开发机器的替代方法,它不需要Xcode。在我写这个问题的时候,MountainLion现在是GoldenMaster,所以它可以被认为是最终版本。Xcode还不能这样说,它还是预览版。RVM建议在Xcode上安装osx-gcc-installer,但我不想弄乱我的系统。在没有Xcode的情况下,在MountainLion上安装Ruby1.9.3的最干净的方法是什么? 最佳答案 事实证明,osx-gcc-installer是替代Xcode以安装Ruby1.9.3

ruby - 退格键和箭头键在 Windows 机器上的 IRB(Git Bash 控制台)中不起作用

我刚刚在Windows机器上安装了ruby​​1.9.2,退格键或任何其他箭头键都不起作用。只有当我在GitBash控制台上打开IRB时才会发生这种情况。但它在Windows控制台上运行良好。有什么帮助吗?注意:IRB在使用早期版本的ruby​​的两个控制台上都运行良好。 最佳答案 同样的事情发生在我身上。使用--noreadline运行irb解决了我的问题:irb--noreadline 关于ruby-退格键和箭头键在Windows机器上的IRB(GitBash控制台)中不起作用,我们

ruby - OS X Mountain Lion : gcc-4. 2 没有那个文件或目录

试图在MountainLion上安装一个gem,但make找不到gcc-4.2:kamil$geminstallposix-spawn-v'0.3.6'Buildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingposix-spawn:ERROR:Failedtobuildgemnativeextension./Users/kamil/.rbenv/versions/1.9.3-p0/bin/rubyextconf.rbcreatingMakefilemakecompilingposix-spawn.cmake

ruby-on-rails - 我可以在 Ubuntu 上使用 apt-get 安装 gems 吗?

我是Ruby新手,刚开始接触。Ruby教程说我应该从这里获取打包系统:http://rubyforge.org/frs/?group_id=126我在UbuntuLinux上。该页面有一个用于下载的.tar和.gem选项。我应该下载哪个?此外,gems是否与Javajar完全相似?如果我可以根据需要一个一个地下载gem,为什么还需要gem打包系统? 最佳答案 Ubuntu现在有ruby​​gems作为一个包对于Ubuntu12:sudoapt-getinstallrubygems对于Ubuntu14.04:sudoapt-getin