你好,我又在这里,我的项目中有一个错误。我想安装activeadmin gem,但显示如下错误。我的rails版本是4.0.0
我查看了提供的解决方案,但同时它也向我显示了错误。
Updating git://github.com/gregbell/active_admin.git
fatal: ambiguous argument 'rails4': unknown revision or path not in the working
tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Git error: command `git rev-parse rails4` in directory
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/cache/bundler/git/active_admin-d
67faab65e9b74efbc8efb4a777a851e9f78b2ca has failed.
If this error persists you could try removing the cache directory
'C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/cache/bundler/git/active_admin-
d67faab65e9b74efbc8efb4a777a851e9f78b2ca'
如果删除分支名称,则会显示错误
Updating git://github.com/gregbell/active_admin.git
Resolving dependencies...
Bundler could not find compatible versions for gem "devise":
In Gemfile:
activeadmin (>= 0) x86-mingw32 depends on
devise (~> 3.2) x86-mingw32
devise (3.1.1)
我怀疑您的Gemfile将您的devise版本限制为,例如~> 3.1.0
,这意味着它不会让您升级到3.2。您现在可以正确删除rails4
分支,就像master
现在的正式的Rails4兼容分支一样。如果您删除了设计版本限制,那么您应该应该可以使它起作用。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句