草庐IT

after_install

全部标签

ruby - rvm system-wide install : Warning! PATH 未正确设置

我在Ubuntu12.10上的/usr/local/rvm/bin中安装了RVM的多用户版本。当我将Ruby从1.9.3升级到2.0.0时,这似乎导致每当我执行rvmversion或类似命令时弹出以下错误消息:$rvmversionWarning!PATHisnotproperlysetup,'/usr/local/rvm/gems/ruby-2.0.0-p247/bin'isnotatfirstplace,usuallythisiscausedbyshellinitializationfiles-checkthemfor'PATH=...'entries,itmightalsohel

ruby-on-rails - 在此机器上可用的 gem 中找不到 gem 'tzinfo-data (>=0) x86-mingw32'。运行 bundle install 以安装缺少的 gem

我是RubyonRails开发的新手。刚开始学习。我在我的Windows8.1电脑上安装了ruby​​onrails,并使用了网站上的以下软件包。我正在使用windows8.1包含的包是ruby2.0.0rails4.1bundler混帐数据库小TDSSQL服务器支持开发工具包但是当我尝试使用commandrails运行服务器时,出现以下错误。在此机器上可用的gem中找不到gem'tzinfo-data(>=0)x86-mingw32'。运行bundleinstall以安装缺少的gem我尝试使用bundleinstall命令,但随后出现以下错误dl已弃用,请使用fiddle请推荐

ruby-on-rails - 如何 "re-install"一个gem?

问题很简单,所以不是写两个命令有一个替代吗?例如gemuninstallsubexecgeminstallsubexec是否只是重新安装或类似的东西? 最佳答案 根据您要实现的目标,以下将gem恢复为.gem文件的内容:gempristine如果您想清理整套已安装的gem,您也可以使用--all运行它。 关于ruby-on-rails-如何"re-install"一个gem?,我们在StackOverflow上找到一个类似的问题: https://stacko

ruby - rbx 测试失败,返回 "Requested binary installation but no rubies are available to download"

我正在编写一个gem,我的目标是Ruby、JRuby和Rubinius。我正在使用TravisCI来构建我的库。当我以Ruby和JRuby为目标时,我的gem构建正确,但以Rubinius为目标时,它不起作用。这是错误:Usingworker:worker-linux-2-2.bb.travis-ci.org:travis-linux-13git.1$gitclone--depth=50--branch=mastergit://github.com/maxgale/actor.gitmaxgale/actorCloninginto'maxgale/actor'...remote:Cou

ruby - Cocoapods "pod install"卡在 OS X El Capitan 上

更新到最新的OSXElCapitan后,我遇到了与其他许多人一样的cocoapods问题:-bash:pod:commandnotfound我运行sudogeminstallcocoapods重新安装cocoapods并解决了上述问题:Successfullyinstalledcocoapods-0.38.2Parsingdocumentationforcocoapods-0.38.21geminstalledPod命令现在可用。但是当我尝试podinstall--verbose时,它卡住了:PreparingUpdatinglocalspecsrepositoriesUpdating

ruby-on-rails - 将变量传递给模型 after_initialize 方法

我有以下(高度简化的)模型,它使用will_paginateclassSearch1endend我的表演Action中的Controller代码是@search=Search.new(params[:search])一切正常,但请注意我将页码硬编码为1,问题是将params[:page]值传递给after_initialize方法,有人可以建议一种优雅的方法吗?谢谢 最佳答案 在初始化方法中添加一个页面参数(或者更好的选项散列参数):classSearchdefinitialize(search,options={})@option

ruby-on-rails - Rails Gemfile 默认为 'https' - 'bundle install' 失败

我注意到在生成新的Rails项目时,Gemfile现在默认为:source'https://rubygems.org'代替source'http://rubygems.org'现在bundleinstall对我来说失败了。当它尝试运行时,我得到:/Users//.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:799:[BUG]Segmentationfault如果我手动将Gemfile更改为http,然后bundleinstall表现良好。我的设置是否有错误(我已经在两个不同的盒子上复制了它),或者还有其他我不知道的问题?

ruby - 在 Ruby 脚本中运行 bundle install?

我正在构建一个Ruby脚本来遍历多个目录,并在所有目录上运行git命令和bundleinstall:dirs=['~/code1,~/code2,~/code3]dirs.eachdo|dir|Dir.chdir(dir)do`gitcheckoutdevelop``gitpull``bundleinstall`endend当我这样做时,git在正确的目录中运行,但bundle程序在与脚本相同的目录中运行。我尝试使用bundler的--path选项,但这也没有完成工作。有什么想法吗? 最佳答案 您的bundleinstall子进程可

ruby-on-rails - Devise 在运行 devise :install in rails application 时出错

我正在使用ruby​​2.2.3和rails4.2.5。我无法在我的项目上运行railsgeneratedevise:install。Bundler抛出错误。错误如下railsgdevise:install/home/suyesh/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.1/lib/bundler/runtime.rb:80:in`rescueinblock(2levels)inrequire':Therewasanerrorwhiletryingtoloadthegem'uglifier'.(Bundle

ruby - rvm install 2.1.4 在 OSX 上挂起

尝试使用以下命令安装新版本的ruby​​时:rvminstall2.1.4进程在编译过程中挂起:ruby-2.1.4-#downloadingruby-2.1.4,thismaytakeawhiledependingonyourconnection...ruby-2.1.4-#extractingruby-2.1.4to/Users/alutz/.rvm/src/ruby-2.1.4....ruby-2.1.4-#configuring.....................................................ruby-2.1.4-#post-config