草庐IT

invalid-bundle-structure

全部标签

ruby - 错误 : "fatal: I don' t handle protocol `` git` when using bundle install

我的GemFile中有以下行:gem'rails',:git=>'git://github.com/rails/rails.git'我收到以下错误:Fetchinggit://github.com/rails/rails.gitfatal:Idon'thandleprotocol''git'Giterror:command`gitclone'git://github.com/rails/rails.git'...但是当我运行geminstall'rails'时它工作正常。基本上在运行克隆命令时,bundle程序会在引发错误的git://地址周围添加单引号。我在Windows上工作。我为

ruby-on-rails - bundle install 未完成执行。它卡在中间

当我运行bundleinstall时,它卡在了最后。这是我的包控制台输出!~/r/mangowebmasterbundleinstallSunJul2712:45:28IST2014Updatinggit://github.com/mongoid/mongoid.gitUpdatinggit://github.com/Rameshv/mongoid-paranoia.gitUpdatinggit://github.com/resque/resque.gitUpdatinggit://github.com/zapnap/resque_mailer.gitUpdatinggit:/

ruby-on-rails - 尝试解析 XLS 文件时出现 "OLE2 signature is invalid"

我正在尝试上传和解析.XLS文件。我试过roo-xls和Spreadsheet,但是对于两者,我都收到了这个错误:Ole::Storage::FormatErrorinUploadController#uploadOLE2signatureisinvalid我找到了一些关于这个错误的资源,唯一给出的答案是将文档重新保存为.XLS,因为虽然原始文件被标记为.XLS,但它实际上不是不幸的是,这不是一个真正的选择,因为我有用户上传文件,所以它在不需要重新保存的情况下工作很重要。郑重声明,我尝试重新保存文件,现在它可以正常工作了,但是我不知道为什么可以正常工作,因为重新保存前后文件的格式看起来

ruby-on-rails - libv8 和 rails 的 bundle 安装问题

我在使用带有ruby​​1.9.3p0(2011-10-30修订版33570)[x86_64-darwin10.8.0]的libv8gem时遇到问题。geminstalllibv8工作正常,我有gem'therubyracer'在我的Gemfile中,它依赖于libv8,它是在我执行bundleinstall时安装的:$bundleexecgemlist***LOCALGEMS***actionmailer(3.1.3)actionpack(3.1.3)...libv8(3.3.10.4x86_64-darwin-10)...但是当我运行时:$railssCouldnotfindlib

ruby-on-rails - Rvm 和 gems,bundle show 和 gem 列表

我将RVM与ruby​​onrails结合使用,当我执行bundleinstall时,它显示的gem比我执行gemlist时多得多?与rvm及其使用的路径有关吗?捆绑安装mds@db1:~/staging$bundleUsingrake(0.9.6)UsingAscii85(1.0.1)UsingPlatform(0.4.0)Usingopen4(1.3.0)UsingPOpen4(0.1.4)Usingactivesupport(2.3.17)Usingrack(1.1.6)Usingactionpack(2.3.17)Usingactionmailer(2.3.17)Usingac

ruby-on-rails - rbenv bundle install 尝试将 gems 安装到错误的路径中

我收到以下错误消息:Youruseraccountisn'tallowedtoinstalltothesystemRubygems.Youcancancelthisinstallationandrun:bundleinstall--pathvendor/bundletoinstallthegemsinto./vendor/bundle/,oryoucanenteryourpasswordandinstallthebundledgemstoRubygemsusingsudo.下面是我做过的一些检查:meatme-ui-MacBook-Proin~$rbenvversionssystem2

ruby-on-rails - 使用 Nokogiri 查找带有文本的链接时如何避免出现 "Invalid byte sequence"

我将Rails5与Ruby4.2一起使用,并扫描我用Nokogiri解析的文档,以不区分大小写的方式查找文本链接:a_elt=doc?doc.xpath('//a').detect{|node|/link[[:space:]]+text/i===node.text}:nil在content中获取网页的HTML后,我使用以下方法将其解析为Nokogiri文档:doc=Nokogiri::HTML(content)问题是,我得到了ArgumentErrorinvalidbytesequenceinUTF-8在某些网页上使用上述正则表达式时。2.4.0:002>doc.encoding=>"

ruby - Bundle 找不到明确安装的 gem

我遇到了一个非常奇怪的问题,我可以清楚地看到一个gem文件已安装,因此可以bundle,但是当我尝试运行它时,我收到一个错误,说bundle找不到它。gem文件:source"https://rubygems.org/"gem'kitchen-terraform'bundle环境:##Environment```Bundler1.16.2Platformsruby,x64-mingw32Ruby2.5.1p57(2018-03-29revision63029)[x64-mingw32]FullPathC:/Ruby25-x64/bin/ruby.exeConfigDirC:/Progr

ruby-on-rails - bundle 安装失败 : Error loading Rubygems plugin after I deleted files

我是Ruby和Rails的新手,正在努力通过Hartlrailswebdevelopmenttutorial.在本教程的过程中,我安装了Homebrew软件。运行brewdoctor后,homebrew指示我删除一些文件,除非我故意将它们放在原处。我删除了它们,brewdoctor说我没事了。现在,在教程的后续部分,我正在尝试将应用程序部署到Heroku。但我发现bundleinstall从未更新我的gemfile.lock文件。事实上,bundleinstall根本没有为我工作。错误输出如下。它似乎与我删除的其中一个文件有关(我基于Librarynotloaded:/opt/loca

尝试动态创建 unicode 字符串的 Ruby 抛出 "invalid Unicode escape"错误

我有一个要求,我想使用插值动态创建一个unicode字符串。例如请看下面在irb中试过的代码2.1.2:016>hex=0x0905=>23092.1.2:017>b="\u#{hex}"SyntaxError:(irb):17:invalidUnicodeescapeb="\u#{hex}"十六进制代码0x0905对应梵文字母A的独立元音unicode。我不知道如何达到预期的结果。 最佳答案 您可以将编码传递给Integer#chr:hex=0x0905hex.chr('UTF-8')#=>"अ"参数可以省略,如Encoding: