我以前没做过这件事,所以我可能在这里遗漏了什么。
我把Gem文件换成了“ruby”,效果很好。我用叉子把一块宝石分叉,并在我的Github回购中对它做了同样的改动。
在构建Sinatra应用程序以将其推送给Heroku时,我更改了Gemfile如下:
gem 'git', :git => "git://github.com/silverSpoon/ruby-git.git"` 当我运行bundle install时
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using rugged 0.21.0
Using sinatra 1.4.5
Using git 1.2.8 from git://github.com/silverSpoon/ruby-git.git (at master)
Your bundle is complete!⇒ gem list git时,它并没有显示已安装的gem。⇒ bundle show git,它显示了安装创业板回购的路径-
/Users/jatinganhotra/.rvm/gems/ruby-2.1.3@527website/bundler/gems/ruby-git-c7fb35af1a99irb并做一个2.1.3 :001 > require 'git'时
它会得到以下错误-
LoadError: cannot load such file -- git我是不是漏掉了什么傻事?
发布于 2014-11-16 16:43:27
由邦德勒通过git安装的Gems与普通gems的处理方式不同。
因为Rubygems缺乏处理git中的gems的能力,所以从git存储库中安装的任何gems都不会出现在
gem list中。但是,在运行Bundler.setup之后,它们将是可用的。
为了使用宝石,你需要通过邦德勒完成它。在启动IRB或应用程序时使用bundle exec,或者在代码中使用Bundler.setup。
$ bundle exec irb
> require 'git' # should work ok或者:
$ irb
> require 'bundler/setup'
> require 'git' # should also workhttps://stackoverflow.com/questions/26950906
复制相似问题