Ruby on Rails: RubyGem version error: rack(1.0.0 not ~> 1.0.1) (RuntimeError)
by Elton on 2010年03月7日, under Rails
当你升级了rails后,有时候会出现rack版本跟rails版本不匹配的情况。 当你执行./script/generate命令的时候,会出现以下错误信息:
-
-
/Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:271:in `require_frameworks‘: RubyGem version error: rack(1.0.0 not ~> 1.0.1) (RuntimeError)
-
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:134:in `process’
-
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send‘
-
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run’
-
from /Volumes/Data/study/ruby/blog/config/environment.rb:9
-
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require‘
-
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’
-
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/commands/generate.rb:1
-
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require‘
-
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’
-
from ./script/generate:3
-
解决方案:
-
-
$ sudo gem uninstall rack
-
-
Select gem to uninstall:
-
1. rack-1.0.0
-
2. rack-1.1.0
-
3. All versions
-
> 1
-
-
You have requested to uninstall the gem:
-
rack-1.0.0
-
actionpack-2.3.5 depends on [rack (~> 1.0.0)]
-
actionpack-2.3.4 depends on [rack (~> 1.0.0)]
-
If you remove this gems, one or more dependencies will not be met.
-
Continue with Uninstall? [Yn] y
-
Successfully uninstalled rack-1.0.0
-
然后再执行
-
-
sudo gem install -v=2.3.5 rails
-
-
Successfully installed rack-1.0.1
-
1 gem installed
-
Installing ri documentation for rack-1.0.1…
-
Installing RDoc documentation for rack-1.0.1…
-
问题解决
相关文章:



三月 8th, 2010 on 11:26
可以尝试Rails 3.0 Beta
三月 18th, 2010 on 21:18
Hello! Your post (Ruby on Rails: RubyGem version error: rack(1.0.0 not ~> 1.0.1) (RuntimeError) | Elton's Blog) does so well that I would like to translate it into French, publish on my french blog and link to you. You have something against it? Regards
四月 5th, 2010 on 13:48
Good article. thank you
六月 14th, 2010 on 09:18
I’ve recently started a blog, the info you supply on this site has helped me tremendously. Appreciation for your time & work.
七月 18th, 2010 on 03:23
Excellent stuff.
七月 19th, 2010 on 07:51
Excellent content. Thanks for posting.
七月 23rd, 2010 on 10:41
I am hoping the same finest operate from you inside upcoming as nicely.Genuinely the blogging is spreading its wings rapidly.
七月 26th, 2010 on 11:35
it was very interesting to read.
I want to quote your post in my blog. It can?
And you et an account on Twitter?
七月 29th, 2010 on 07:27
I just needed to say that I found your blog via Goolge and I am glad I did. Keep up the good work and I will make sure to bookmark you for when I have more free time away from the books. Thanks again!
八月 2nd, 2010 on 07:36
I would like to exchange links with your site blog.prosight.me
Is this possible?
八月 5th, 2010 on 01:51
you really get some great content here. Thanks
八月 6th, 2010 on 12:56
Great idea for a web page article. It really helped me out. I’m positive it helped whole lot of other people as effectively.
八月 11th, 2010 on 01:36
We just couldnt leave your website before saying that I really enjoyed the quality information you offer to your visitors… Will be back often to check up on new stuff you post!
八月 11th, 2010 on 03:15
I really like this post and will be bookmarking and sharing this with my social community on Facebook
八月 12th, 2010 on 22:09
Great entry cheers, You must have a Facebook group for this site?
八月 13th, 2010 on 01:38
Bookmarking now thanks, a good quick read.
八月 13th, 2010 on 16:46
Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained!
八月 13th, 2010 on 19:21
I love reading and I am always searching for informative information like this! You are bookmarked!. . . . . .
八月 14th, 2010 on 16:47
Yes you learn more while you share your knowledge with others. . . . . .
八月 15th, 2010 on 00:21
You have a great post here, extremely informative. Very well written I shall be bookmarking the website and subscribing to your feed so i can always read articles of this quality.
八月 16th, 2010 on 11:41
I agree with you. This type of projects should be encouraged and I think that these type of projects are the projects for the future. . . . .
八月 17th, 2010 on 04:22
Cool entry cheers, a good quick read.
八月 19th, 2010 on 01:16
Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates.
八月 19th, 2010 on 03:31
I can see that you are an expert in this area. I am starting a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business.
八月 19th, 2010 on 03:58
Wow!, this was a real quality post. In theory I’d like to write like this too – taking time and real effort to make a good article… but what can I say… I keep putting it off and never seem to get something done
八月 19th, 2010 on 05:33
I just couldnt leave your website before saying that I really enjoyed the quality information you offer to your visitors… Will be back soon to check up on new posts
八月 19th, 2010 on 09:16
So Great! I need some infos in this post for my rapport de stage. Can i have your contact please? I need your permission to quote it :D. Anyway, That’s great job. Keep going.
八月 19th, 2010 on 10:44
okay, What can i do for you?
八月 20th, 2010 on 02:14
I know this is really boring and you are skipping to the next comment, but I just wanted to throw you a big thanks – you cleared up some things for me!
八月 20th, 2010 on 04:11
I agree with you. This type of projects should be encouraged and I think that these type of projects are the projects for the future. . . . .
八月 21st, 2010 on 05:20
So Great! I need some infos in this post for my rapport de stage. Can i have your contact please? I need your permission to quote it :D. Anyway, That’s great job. Keep going.
八月 21st, 2010 on 05:51
I usually don’t post in blogs but yours forced me to, awesome work… lovely
八月 21st, 2010 on 16:05
I enjoyed reading your blog. Keep it that way.
八月 21st, 2010 on 23:30
So Great! I need some infos in this post for my rapport de stage. Can i have your contact please? I need your permission to quote it :D. Anyway, That’s great job. Keep going.
八月 25th, 2010 on 04:06
solved properly asap.
八月 25th, 2010 on 06:02
You’re making a lot of excellent arguments during this article but its difficult in my opinion to focus on the content considering the broken theme!
八月 25th, 2010 on 06:55
Good article! I like your weblog, is it acceptable to make use of it for Rss?
八月 25th, 2010 on 13:33
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.
八月 25th, 2010 on 22:27
I am not positive I altogether agree with you on this article. Nevertheless I am definitely amenable to fresh options. May well have to feel about it. Nice site anyway.
八月 26th, 2010 on 07:06
Good arguments in this article however have you been viewing the numerous issues that IE 6 displays in your blog design?
八月 27th, 2010 on 17:10
Great post. Thanks!
八月 27th, 2010 on 18:27
Interesting article with Numerous useful advises. Thank you very A great deal, I?l Begin reading your blog.