4

I have this error when i move my site do server and try to bundle install. What that means? What i should do?

Git error: command `git reset --hard a9949c1524205928b18597f840e83478ba97c2ef` in directory
/usr/local/rvm/gems/ruby-1.9.3-p448/bundler/gems/active_admin-a9949c152420 has failed.
If this error persists you could try removing the cache directory
'/usr/local/rvm/gems/ruby-1.9.3-p448/cache/bundler/git/active_admin-    d67faab65e9b74efbc8efb4a777a851e9f78b2ca'

And next error:

fatal: ambiguous argument 'rails4': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
Git error: command `git rev-parse rails4` in directory
/usr/local/rvm/gems/ruby-1.9.3-p448/cache/bundler/git/friendly_id-     b6cdf0f76c0a31f3c34bb36c76f8ce70e1d6196b has failed.
Wordica
  • 2,427
  • 3
  • 31
  • 51

3 Answers3

9

This happened to me because the rails4 branch was removed for the active_admin project on Github. However, according to the documentation, you still have to use the master branch for Rails 4.

So change your Gemfile from

gem 'activeadmin', github: 'gregbell/active_admin', branch: 'rails4'

to

gem 'activeadmin', github: 'gregbell/active_admin'
Tyler Collier
  • 11,489
  • 9
  • 73
  • 80
3

Check to see the branch of the repo that you've specified in your Gemfile exists in Github. The named branch may have been merged into master. You can also try removing the branch information in your Gemfile, which will default to the master branch (http://bundler.io/v1.3/gemfile.html).

Cleverlemming
  • 1,310
  • 1
  • 8
  • 10
1

I tried removing the cached file of active admin in my gems folder and retried to bundle and it helped.

.rvm/gems/ruby-2.1.2/cache/bundler/git/active_admin-d67faab65e9b74efbc8efb4a777a851e9f78b2ca

The cached file will be found in .rvm/gems/"yourrubyversion/cache/bundler/git/activeadmin"

Bloomberg
  • 2,317
  • 2
  • 25
  • 47
  • Rvm not always resides in .rvm (for example /usr/local/rvm is also an option). The `rvm gemdir` command returns your correct folder. – David Salamon Jul 14 '16 at 14:06