草庐IT

no-update-dependencies

全部标签

ruby - gem 更新——系统返回 "no implicit conversion of nil into String"

运行gemupdate--system不断返回错误#gemupdate--systemUpdatingrubygems-updateERROR:Whileexecutinggem...(TypeError)noimplicitconversionofnilintoString如何解决?详细:http://pastebin.com/2uBYEMTi 最佳答案 这可能是由于不兼容的gem版本(也许是一个正在做Monkey补丁的gem?)。您可以尝试更新单个gem吗? 关于ruby-gem更新

ruby - "Execute and Update ' # => ' Markers"对于 VIM

VIM中是否有可能为ruby​​代码重复“执行和更新‘#=>’标记”TextMate功能。我想要这样的东西:x=2classAdefa42endendx#=>A.new.a#=>输入一些命令...然后得到x=2classAdefa42endendx#=>2A.new.a#=>42这是来自CiaránWalsh’sBlog的对此功能的描述:Anothertooldefinitelyworthknowingisthe"ExecuteandUpdate'#=>'Markers"command(on⌃⇧⌘Ebydefault).Touseit,addsomecommentmarkers(the

ruby-on-rails - 如何在 update_attributes 期间以管理员身份跳过验证?

当我尝试以管理员身份编辑用户时,我想跳过验证。型号classUser...attr_accessible:company_id,:first_name,:disabled,as::adminControllerclassAdmin::UsersController...defupdate@user=User.find(params[:id])@user.update_attributes(params[:user],as::admin)redirect_toedit_admin_user_path(@user),:notice=>"UserAccountUpdated"end所以我尝试

ruby - "No binary rubies available"是什么意思?

每当我使用rvminstallx.x.x时,即使安装成功,我也会收到此警告:Nobinaryrubiesavailablefor:osx/10.12/x86_64/ruby-2.4.0.Continuingwithcompilation.Pleaseread'rvmhelpmount'togetmoreinformationonbinaryrubies.我尝试阅读rvmhelpmount,但它超出了我的知识范围。有人可以用简单的英语解释这个警告吗?谢谢! 最佳答案 当安装新的Rubies时,RVM首先尝试使用它从https://rv

ruby-on-rails - 环境 : ruby\r: No such file or directory

我有Rails项目。当我尝试运行任何rake任务或rails服务器时,它给我这个错误env:ruby\r:Nosuchfileordirectory有人可以帮我吗? 最佳答案 如果您在Unix/Mac上工作,那么此错误是因为您的行结尾不正确。这是一个使用dos2unix的解决方案;您可能需要在您的系统上安装此程序。如果apt可用,您可以使用sudoaptinstalldos2unix。>正确设置你的行尾,让git管理它如何处理它们:gitconfig--globalcore.autocrlfinput>在您的目录中,您将通过运行以下

ruby - "gem update --system"会将 rails 从 2.3.8 更新到 3.0 吗?

如果我有第二台计算机,我会这样做并看看-但我已经对它进行了微调,使其暂时不运行3.0......不想搞砸它。花了好几个小时才到这里。基本上-我想将rails保持在2.3.8一段时间......所以会gemupdate--system更新rails从版本2->3?我确实阅读了没有明确答案的文档,我猜它会,但是嘿,可能会学到一些新东西。否则,我会更新我拥有的每一个(8-1个)gem。谢谢... 最佳答案 gemupdate--system仅更新RubyGems。gemupdate会将所有已安装的gem更新到最新版本,因此会将Rails更

ruby - 带有删除表的 rake db :migrate updating schema. rb

我在git上有几个分支,跨这些分支的模式在不同的版本上。切换到分支后,让我们说new_feature(有挂起的迁移)如果我做rakedb:setup然后它建议我运行挂起的迁移。一旦我这样做,我的架构就会更新为在同一分支中删除的表。如果我执行rakedb:reset然后它工作正常。我知道db:setup和db:reset之间的区别。后者执行db:drop然后执行db:setup但我想知道为什么架构会在rakedb:migrate上显示那些删除的表我肯定缺少一些Rails知识w.r.t.模式加载和迁移过程任何见解都会有很大帮助。提前致谢 最佳答案

ruby - 运行 dependency.rb :247:in `to_specs' : Could not find bundler

当我运行bundle时,出现以下错误~/rails_apps/redmine]#bundle/usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:247:in`to_specs':Couldnotfindbundler(>=0)amongst[RedCloth-4.2.9,ZenTest-4.8.2,actionmailer-2.3.14,actionpack-2.3.14,activerecord-2.3.14,activeresource-2.3.14,activesupport-2.3.14,cgi_multipart_eof_fi

ruby-on-rails - Rails 4 路由错误 : No Route Matches [POST]

我在学习Rails4时正在做一个小练习,但在尝试更新对象时遇到路由错误。我不断收到错误消息:没有路由匹配[POST]"/movies/1/edit"但看不到我的代码哪里不正确:我的电影_controller.rbclassMoviesController"Yourmoviewassaved!"elserender"new"endenddefedit@movie=Movie.find(params[:id])enddefupdate@movie=Movie.find(params[:id])if@movie.update_attributes(params[:movie])redirec

ruby - pg gem : 'Warning: no type cast defined for type "numeric"'

我在从pggem中获取输入结果时遇到问题。require'pg'require_relative'spec/fixtures/database'client=PG.connect(DB[:pg])client.type_map_for_queries=PG::BasicTypeMapForQueries.new(client)client.type_map_for_results=PG::BasicTypeMapForResults.new(client)client.exec(%|select*fromtestme;|)do|query|query.each{|r|putsr.ins