草庐IT

install_requires

全部标签

ruby - 如何解决 "You need to have Ruby and Sass installed and in your PATH for this task to work"警告?

我正在为工作设置一台新Mac。我已经在全局范围内安装了Grunt&GruntCLI。然后我在项目文件夹中执行了npminstall以安装所有依赖项。到目前为止没有问题,但是当我尝试运行sass:dist任务时,我收到了这个警告:Warning:YouneedtohaveRubyandSassinstalledandinyourPATHforthistasktowork.Moreinfo:https://github.com/gruntjs/grunt-contrib-sassUse--forcetocontinue.据我了解,我需要在更全局的级别上安装Ruby和Sass才能运行此任务。

ruby-on-rails - 错误 : Error installing capybara-webkit:

关于如何修复有什么建议吗?geminstallcapybara-webkit-v'0.11.0'Buildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingcapybara-webkit:ERROR:Failedtobuildgemnativeextension./home/durrantm/.rvm/rubies/ruby-1.9.3-p194/bin/rubyextconf.rbsh:qmake:notfoundGemfileswillremaininstalledin/home/durrantm/.rvm

ruby - 命令 rbenv install 丢失

在Ubuntu10.04中,我刚刚安装了rbenv。安装命令不存在。rbenv0.4.0-49-g8b04303Usage:rbenv[]Someusefulrbenvcommandsare:commandsListallavailablerbenvcommandslocalSetorshowthelocalapplication-specificRubyversionglobalSetorshowtheglobalRubyversionshellSetorshowtheshell-specificRubyversionrehashRehashrbenvshims(runthisaft

Ruby:require 与 require_relative - 在 Ruby <1.9.2 和 >=1.9.2 中运行的最佳实践

如果我想要,最佳实践是什么requireRuby中的一个相关文件and我希望它在1.8.x和>=1.9.2中工作?我看到几个选项:就做$LOAD_PATH忘记一切做$LOAD_PATHrequire'./path/to/file'检查是否RUBY_VERSIONrequire_relative作为require,使用require_relative事后需要的地方检查是否require_relative已经存在,如果存在,尝试像之前的情况一样继续使用奇怪的结构,例如requireFile.join(File.dirname(__FILE__),'path/to/file')-唉,它们似乎

ruby-on-rails - 如何解决 "ruby installation is missing psych"错误?

我使用rvm安装ruby​​1.9.3。即使安装成功,它也会提示libyaml。现在每次我想安装一个gem(比如rails)时都会出现这个警告:Itseemsyourrubyinstallationismissingpsych(forYAMLoutput).Toeliminatethiswarning,pleaseinstalllibyamlandreinstallyourruby.我使用MacosX10.7(Lion)。 最佳答案 以我为例rvmpkginstalllibyaml和rvmreinstallruby-1.9.3-p1

ruby 'require' 错误 : cannot load such file

我有一个文件,main.rb,内容如下:require"tokenizer.rb"tokenizer.rb文件位于同一目录,其内容为:classTokenizerdefself.tokenize(string)returnstring.split("")endend如果我尝试运行main.rb,我会收到以下错误:C:\DocumentsandSettings\my\src\folder>rubymain.rbC:/Ruby193/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in`require':cannotloadsuchfile--to

ruby - Ruby 中的 require_relative 和 require 有什么区别?

Ruby中的require_relative和require有什么区别? 最佳答案 看看docs:require_relativecomplementsthebuiltinmethodrequirebyallowingyoutoloadafilethatisrelativetothefilecontainingtherequire_relativestatement.Forexample,ifyouhaveunittestclassesinthe"test"directory,anddataforthemunderthetest"t

Ruby:Gemfile 中的 'require: false' 是什么意思?

这样做:gem'whenever',require:false表示需要安装gem,还是不需要? 最佳答案 这means安装gem,但在启动Bundler时不要调用require。所以你需要手动调用require"whenever"如果你想使用这个库。如果你要这样做gem"whenever",require:"whereever"然后bundler会下载命名为whenever的gem,但会调用require"whereever"如果需要的库的名称与gem的名称不同,这通常会被使用。 关于R

ruby - Ruby 中的 include 和 require 有什么区别?

我的问题类似于“WhatisthedifferencebetweenincludeandextendinRuby?”。Ruby中的require和include有什么区别?如果我只是想在我的类中使用模块中的方法,我应该require还是include? 最佳答案 What'sthedifferencebetween"include"and"require"inRuby?Answer:Theincludeandrequiremethodsdoverydifferentthings.Therequiremethoddoeswhatinc

javascript - 为什么我不能使用 browserify 在循环中 require(...)?

这行得通require('./AppCtrl');但如果我这样做['./AppCtrl'].forEach(function(name){require(name);});它会导致错误_prelude.js:1UncaughtError:Cannotfindmodule'./AppCtrl's@_prelude.js:1s@_prelude.js:1(anonymousfunction)@_prelude.js:1(anonymousfunction)@index.js:48@index.js:3s@_prelude.js:1(anonymousfunction)@_prelude.j