ruby-on-rails-4 - activeadmin gem 中的错误

标签 ruby-on-rails-4 bundle activeadmin

你好,我又来了,但我的项目出现了错误。 我想安装 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)

最佳答案

您只需在应用程序启动时首先 bundle 即可。 无需输入其他gem文件。

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

在 Gemfile 中并 bundle 。它会自动下载您的应用程序中所有必需的 gem。

C:\Sites\try>bundle
Updating git://github.com/gregbell/active_admin.git
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.1.1)
Using i18n (0.6.9)
Using minitest (4.7.5)
Using multi_json (1.8.4)
Using atomic (1.1.14)
Using thread_safe (0.1.3)
Using tzinfo (0.3.38)
Using activesupport (4.0.0)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using actionpack (4.0.0)
Using mime-types (1.25.1)
Using polyglot (0.3.3)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (4.0.0)
Installing arbre (1.0.1)
 Using sass (3.2.14)
Using thor (0.18.1)
Installing bourbon (3.1.8)
Using coffee-script-source (1.6.3)
Using execjs (2.0.2)
Using coffee-script (2.2.0)
Using railties (4.0.0)
Using coffee-rails (4.0.1)
Using bcrypt-ruby (3.1.2)
Installing orm_adapter (0.5.0)
Using warden (1.2.3)
Installing devise (3.2.2)
Installing formtastic (2.3.0.rc2)
Installing has_scope (0.6.0.rc)
Installing responders (1.0.0)
Installing inherited_resources (1.4.1)
Using jquery-rails (3.0.4)
Using jquery-ui-rails (4.1.1)
Installing kaminari (0.15.1)
Using activemodel (4.0.0)
Using activerecord-deprecated_finders (1.0.3)
Using arel (4.0.1)
Using activerecord (4.0.0)
Using bundler (1.3.5)
Using hike (1.2.3)
Using tilt (1.4.1)
Using sprockets (2.10.1)
Using sprockets-rails (2.0.1)
Using rails (4.0.0)
Installing polyamorous (0.6.4)
Installing ransack (1.1.0)
 Using sass-rails (4.0.1)
Using activeadmin (1.0.0.pre) from git://github.com/gregbell/active_admin.git (at master)
Using jbuilder (1.5.3)
Using json (1.8.1)
Using pg (0.17.0)
Using rdoc (4.1.1)
Using sdoc (0.4.0)
Using turbolinks (2.2.0)
Using uglifier (2.4.0)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

关于ruby-on-rails-4 - activeadmin gem 中的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21422183/

相关文章:

java - 在 Bundle 中,如何找出给定键值的类型?

ruby-on-rails - 无法找到 json 的输入类 - 在 Active Admin 中处理 JSON 类型

ruby - 运行时错误 : Circular dependency detected while autoloading constant

打开其他链接后jquery click事件不起作用

java - Bundle 返回 long 而不是 Parcelable

php - fatal error : Class not found in AppKernel. PHP

ruby-on-rails - 相关模型的每个实例的事件管理范围

ruby-on-rails - Rails ActiveAdmin : Multiple Index Tables

ruby-on-rails - Rails 优化查询并遍历大型实体

mysql - 带有 CarrierWave 和多文件上传的 ActiveAdmin