草庐IT

安装详细步骤

全部标签

ruby - 安装 dm-mysql-adapter 时出错

我是Ruby的新手。我安装了DataMapper并且正在尝试安装dm-mysql-adapter-1.0.2gem。但是当我尝试安装时,出现以下错误。我正在使用ubuntu操作系统。vinoth@vinoth-laptop:~/Downloads$geminstalldm-mysql-adapter-1.0.2----with-mysql-lib=/usr/lib/mysql----with-mysql-conf=/usr/bin/mysqlWARNING:Installingto~/.gemsince/home/vinoth/gemsand/home/vinoth/gems/bina

ruby - 在未安装 Excel 的服务器上使用 Ruby 读写 Excel 文件

我需要在一台没有安装Excel的Linux服务器上读写(->转换)Excel文件。对于Python,存在http://www.python-excel.org/.Ruby有类似的东西吗?可能不需要处理最新的Office格式。只需旧的xls文件就足够了。 最佳答案 我同意Gonzih的观点,并且我经常使用roo。它允许我使用模板文件进行读取、写入和写入。该项目在他们的site上有很好的记录。.我总是使用类似的东西:input=Excel.new(path)output=Array.newinput.default_sheet=inpu

ruby-on-rails - Heroku Cedar - 没有安装 Resque 前端的静态 Assets

我有一个简单的Rails应用程序部署到HerokuCedar堆栈。该应用程序使用Resque并安装了ResqueSinatra前端应用程序,因此我可以监控队列:#routes.rb...mountResque::Server,:at=>"/resque"这很好用,但是当部署到Heroku时,Resquefront-end'sCSS&JavaScript没有被送达。一段Heroku的日志表明它正在返回零字节:...2011-07-13T16:19:35+00:00heroku[router]:GETmyapp.herokuapp.com/resque/style.cssdyno=web.

ruby-on-rails - 为什么我不能用 gem install rails -v 4.0.0 安装 rails?

我已经在GNU/Linux上安装了:rvm1.23.16(stable)byWayneE.Seguin,MichalPapis[https://rvm.io/]ruby2.0.0p247(2013-06-27revision41674)[x86_64-darwin12.4.0]我的系统中显然有所有的gem,但是当我运行命令时:geminstallrails-v4.0.0它指出安装了一个gem。但是Rails还没有安装。当我使用geminstallrails-v4.0.0或geminstallrails--version=4.0发生:Parsingdocumentationforrail

ruby - gem 安装失败,出现 "Could not find a valid gem ' yaml'"

我正在从一个当前可用的ruby​​程序构建一个gem。它使用jruby1.7.12,除其他外,它执行“require'yaml”。对于gem,我的Gemfile包含:source'https://rubygems.org'gemspec当我运行时gembuildprogram.gemspec这很好用,但是当我运行时geminstallprogram-0.15.01.gem它失败了ERROR:Couldnotfindavalidgem'yaml'(>=0)inanyrepositoryERROR:Possiblealternatives:aml,cyaml,haml,maml,raml没

ruby-on-rails - 在 El Capitan 上安装 Rails 时出现 -lgmp 错误的库未找到(Mac OS 10.11.1 (15B42))

在使用Rubyv2.2.2的ElCapitan(MacOSX10.11.1)上安装Rails时,出现以下错误:ERROR:Errorinstallingnokogiri:ERROR:Failedtobuildgemnativeextension./Users/jon/.rvm/rubies/ruby-2.2.2/bin/ruby-r./siteconf20151117-26799-ux15fd.rbextconf.rb--use-system-librariescheckingiftheCcompileraccepts...***extconf.rbfailed***Couldnotc

ruby-on-rails - cucumber 找不到步骤定义

我的Cucumber找不到步骤定义。文件结构(只有Rails根目录中的specs文件夹)如下所示:->specs->features->main_structure.feature->step_definitions->main_structure_steps.rb这是main_structure.feature:Feature:MainstructureScenario:ViewingtheStructurepageWhenIamonthestructurepage这是main_structure_steps.rb:When(/^Iamonthestructurepage$/)dov

ruby - 安装gem : Couldn't reserve space for cygwin's heap, Win32错误487错误

我正在尝试在我的机器上安装win32-apigem,但在构建native扩展时我遇到了一些问题:$geminstallwin32-api--no-ri--rdocTemporarilyenhancingPATHtoincludeDevKit...Buildingnativeextensions.Thiscouldtakeawhile...C:\Programs\dev_kit\bin\make.exe:***Couldn'treservespaceforcygwin'sheap,Win32error0ERROR:Errorinstallingwin32-api:ERROR:Failed

ruby - 在 Windows 上安装 RMagick

我已经对此进行了研究,并且已经在我的一台计算机上研究了几个小时。我大约3周前在我的台式电脑上安装了RMagick,它相当复杂。我不记得我采取的具体步骤,我真的很沮丧。我已经将ImageMagick安装到我机器上的C:\ImageMagick目录中我也为Ruby安装了开发工具包。我还将rmagick-rmagick-v2-2-g564f157放入我的C:中正确的gems文件夹中它在C:\Ruby22-x64\lib\ruby\gems\2.2.0\gems我收到以下错误:我将输入:geminstallrmagick--'--with-opt-dir="c:\ImageMagick"'并得

ruby-on-rails - "Given that I' m登录的 cucumber 步骤定义"

我有一个cucumber步骤:鉴于我已登录我不明白我应该如何将它作为一个步骤定义来实现。谁能指出我正确的方向、教程、博客等。 最佳答案 这是我的做法。Given/^Ihaveone\s+user"([^\"]*)"withemail"([^\"]*)"andpassword"([^\"]*)"$/do|username,email,password|@user=User.new(:email=>email,:username=>username,:password=>password,:password_confirmation=>