Rails gem update不工作(版本4.1.1到4.2.0)作为“warning:循环参数引用”的解决方案。错误 [英] Rails gem update not working (version 4.1.1 to 4.2.0) as a solution to "warning: circular argument reference" error

查看:529
本文介绍了Rails gem update不工作(版本4.1.1到4.2.0)作为“warning:循环参数引用”的解决方案。错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行任何类型的rake命令,特别是rake db:seed时,我会得到以下错误,它会中止而不完成:

I keep getting the following error when I run any sort of rake command, and in particular rake db:seed which will abort without completing:

$ rake db:seed
/Users/rachel/.rvm/gems/ruby-2.2.0@rails4.2/gems/activesupport-4.1.1/lib/active_support/values/time_zone.rb:285: warning: circular argument reference - now
rake aborted!
ActiveRecord::UnknownAttributeError: unknown attribute: description



我做了一些研究,发现这是一个错误(我认为?)引起一个不兼容的gem在Rails 4.1.9所以我希望创建一个新的rvm更新Rails到4.2.0,所以我可以继续我的项目。但是,每次我尝试更新Rails它说'安装',但无法实际安装到我创建的ruby版本。这是典型的命令行模式,当我尝试更新Rails:

I did some research and discovered this is an error (I think?) caused by an incompatible gem in Rails 4.1.9 so I was hoping to create a new rvm to update Rails to 4.2.0 so I can proceed with my projects. However, every time I try to update Rails it says 'installed' but fails to actually install into the ruby version I created. Here's the typical command line pattern when I try to update Rails:

$ rvm gemset create rails420
ruby-2.2.0 - #gemset created /Users/rachel/.rvm/gems/ruby-2.2.0@rails420
ruby-2.2.0 - #generating rails420 wrappers........
$ rvm 2.2.0@rails420
$ gem install rails -v 4.2.0
Fetching: rails-4.2.0.gem (100%)
Successfully installed rails-4.2.0
Parsing documentation for rails-4.2.0
Installing ri documentation for rails-4.2.0
Done installing documentation for rails after 339 seconds
1 gem installed
$ rvm 2.2.0@rails420
$ rails --version
Rails 4.1.1

基本上安装Rails 4.2.0,但后来说,当我在安装后立即检查版本时没有安装。任何想法如何我可以解决错误或让Rails gem在我的rvm正确更新?

Basically, it installs Rails 4.2.0 but then says it's not installed when I check the version immediately after installation. Any ideas for how I can either solve the error or get the Rails gem to update correctly in my rvm?

推荐答案

请尝试以下操作:

rvm use ruby-2.2.0@rails4.2 --create
gem install rails
rails -v

这应该给你rail 4.2

This should give you rails 4.2

这篇关于Rails gem update不工作(版本4.1.1到4.2.0)作为“warning:循环参数引用”的解决方案。错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆