Bundler throws No Such file or directory for gem i

2019-04-10 07:01发布

In Gemfile,

gem "backup", :git => "git://github.com/tenmiles/backup.git", :ref => "develop"

n local and in staging, bundle install did finish successfully. In production, when bundle install --deployment happens, bundler throws this error

Using backup (3.0.19) from git://github.com/tenmiles/backup.git (at develop)
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:365:in `initialize': No such file or directory - /home/anand/public_html/myapp/releases/20111113170352/vendor/bundle/ruby/1.9.1/bundler/gems/gems/backup-3.0.19/bin/backup (Errno::ENOENT)

I checked in /home/anand/public_html/myapp/releases/20111113170352/vendor/bundle/ruby/1.9.1/bundler/gems/gems/ and backup-150fb5168ebe is there! Its a gem installed via git. why is bundler looking for backup-3.0.19. How can I refresh backup gem and ask bundler to re install the gem from scratch.

Please help

3条回答
祖国的老花朵
2楼-- · 2019-04-10 07:28

Try this http://raflabs.com/blogs/silence-is-foo/2010/07/19/installing-a-gem-fork-from-github-source/ U can install the gem into your gem set by the method mentioned in there

查看更多
SAY GOODBYE
3楼-- · 2019-04-10 07:34

i have the some problem with current spork. If you specify a version it should work

gem "backup", '1.0', :git => "git://github.com/tenmiles/backup.git"

it fixed it for me

查看更多
smile是对你的礼貌
4楼-- · 2019-04-10 07:36

I had this issue with 1.0.10, but when I updated the servers to bundler 1.0.21 the problem went away.

查看更多
登录 后发表回答