草庐IT

nodeJS安装(超详细小白教程)

全部标签

ruby - 使用 RVM 安装 Ruby 2.0.0

我尝试使用RVM安装Ruby2.0.0:rvminstall2.0.0安装完成后。我做了rvmlist。如下所示:rvmrubiesjruby-1.6.5.1[i386]/home/username/.rvm/scripts/list:line294:/home/username/.rvm/rubies/rbx-2.0.0/config:Nosuchfileordirectoryrbx-2.0.0[]=*ree-1.8.7-2011.12[i686]ruby-1.9.3-p0[i686]#=>-current#=*-current&&default#*-default为什么要安装Rub

ruby-on-rails - 安装 mysql2 (0.3.11) 时出错

我是一个Rails初学者,我从https://github.com/rubytaiwan/jobs.ruby.tw得到了一个演示。但是当我尝试运行这个演示时,我得到了一个错误。我跟着跑bundle我得到了错误Anerroroccurredwhileinstallingmysql2(0.3.11),andBundlercannotcontinue.Makesurethat`geminstallmysql2-v'0.3.11'`succeedsbeforebundling.但我可以确定我已经安装了mysql2Gemfile是source'https://rubygems.org'ruby"

ruby - 使用 Homebrew 安装 Ruby

我用Homebrew安装了Ruby:brewinstallruby在“注意事项”下它说:NOTE:Bydefault,geminstalledbinarieswillbeplacedinto:/usr/local/Cellar/ruby/1.9.3-p194/binYoumaywanttoaddthistoyourPATH.这是什么意思,如何将它添加到我的“路径”中?假设它与bash_profile有关,但这是新的。 最佳答案 在~/.bash_profile中添加以下行exportPATH=/usr/local/Cellar/ru

ruby - 从 github 存储库全局安装 ruby​​ gem

我想全局安装一个ruby​​gem(sudogeminstallcapybara-webkit)但我希望它从master的github存储库中安装。我知道这可以使用bundler来完成,但我想从命令行来完成,因为我主要使用pry进行编码。 最佳答案 下载源码:gitclonehttps://github.com/thoughtbot/capybara-webkit.git构建gem:cdcapybara-webkit&&gembuildcapybara-webkit.gemspec安装它(文件名/版本可能不同):sudogemins

ruby-on-rails - 在 bundle install 上安装 Nokogiri 时出错但已经安装

我在bundle我的Gemfile时遇到问题。当我运行bundleinstall时,我已经安装了Nokogiri,它无法加载Nokogiri。安装Nokogiri:geminstallnokogiriBuildingnativeextensions.Thiscouldtakeawhile...Successfullyinstallednokogiri-1.6.6.2Parsingdocumentationfornokogiri-1.6.6.2Doneinstallingdocumentationfornokogiriafter2seconds1geminstalledbundle安装:

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

ruby - 如何在 Windows 7 上安装 RVM

如何在Windows7上安装RVM?它说要安装RVM,并使用以下脚本:user$bash-sstable但是我不知道该怎么办。如果我在cmd中输入它,则会出现一条错误消息,说它“此时意外”。如何安装RVM? 最佳答案 没有适合您的RVM!来自RVM’sFAQ:DoesRVMworkonwindows?Willitinthefuture?NO.IfyouwouldliketomanagemultipleversionsofrubyonwindowspleaseusepikwhichisanexcellenttoolbyGordonTh

ruby-on-rails - 没有 sudo,Bundler 无法安装任何 gem

我正在尝试安装一个Rails应用程序,但每次我使用bundle时,如果没有sudo,它就会失败。我目前的情况是,只要对所有使用sudo,包括rails,一切都会正常。我认为这是不正确的。例如:$bundleupdateUpdatinggit://github.com/refinery/refinerycms.gitFetchinggemmetadatafromhttps://rubygems.org/.......Fetchinggemmetadatafromhttps://rubygems.org/..Resolvingdependencies...Enteryourpassword

ruby-on-rails - 使用 'gem pq' 安装 PostgreSQL gem 失败并出现错误 : Failed to build gem native extension

我正在学习RubyonRails并尝试开发应用程序。在我的应用程序中,我试图在开发模式下使用默认的SQLite数据库,在生产模式下使用PostgreSQL。但是我在尝试使用安装pggem时遇到以下错误:geminstallpgBuilding native extensions.  This could take a while...ERROR:  Error installing pg:        ERROR: Failed to build gem native extension.     /home/tusharkhatiwada/.rvm/rubies/ruby-2.0.

ruby - Chef 从源安装和更新程序

我有一个从源代码构建的程序。为此,我使用了script资源。什么是实现安装和更新逻辑的好方法?现在我只是使用内置的not_if条件实现了安装。script"install_program"donot_if{File.exists?('/program')}interpreter"bash"user"root"cwd"/tmp"code 最佳答案 首先,如果您有办法托管内部包存储库,我通常建议您为目标平台构建native包,并使用package资源来管理它们,而不是从源代码构建。我知道这并不总是可用或可行,所以...使“./confi