简体   繁体   English

使用rails_admin_email gem时的兼容性问题

[英]Compatibility issue when using rails_admin_email gem

I am using rails 4.2.1. 我正在使用Rails 4.2.1。 I have already added rails_admin module in my app. 我已经在我的应用程序中添加了rails_admin模块。 Now, I want to add email facility for admin, so that he can send email to the users. 现在,我想为管理员添加电子邮件功能,以便他可以向用户发送电子邮件。 For that, I have added rails_admin_email gem. 为此,我添加了rails_admin_email gem。 But when I execute bundle install command some dependency issues occur 但是,当我执行bundle install命令时,会发生一些依赖性问题

Bundler could not find compatible versions for gem "rails":
 In Gemfile:
   rails (= 4.2.1)

   rails_admin_email was resolved to 0.0.1, which depends on
     rails (~> 3.2.6)

How can I solve the issue? 我该如何解决这个问题?

Please also provide some useful hint, if there is a better way than using rails_admin_email gem 如果有比使用rails_admin_email gem更好的方法,也请提供一些有用的提示

Here are my current GemFile and Gemfile.lock . 这是我当前的GemFileGemfile.lock

While this answer should fix the problem i would not encourage you to use rails_admin_email as it has not been touched since July 2012 and not present on rubygems.org :). 虽然此答案可以解决问题,但我不鼓励您使用rails_admin_email ,因为自20127月以来未曾涉及它,并且未出现在rubygems.org :)上。 Still solution below. 仍在下面的解决方案。


The problem in this case is the dependencies defined 这种情况下的问题是定义的依赖项

To fix this problem you need to fork/pr rails_admin_gem to use >= 3.2.6 . 要解决此问题,您需要fork / pr rails_admin_gem使用>= 3.2.6 Here is what i tried in my fork and it works. 这是我用叉子尝试过的方法 ,它可以工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM