Ruby failed to create app -
i new ruby, want set new hello application in ruby, error: (i using osx, mountain lion), do?
rails new hello /system/library/frameworks/ruby.framework/versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in report_activate_error': rubygem version error: rack(1.5.2 not ~> 1.4.5) (gem::loaderror) /system/library/frameworks/ruby.framework/versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in
activate' /system/library/frameworks/ruby.framework/versions/1.8/usr/lib/ruby/1.8/rubygems.rb:246:in activate' /system/library/frameworks/ruby.framework/versions/1.8/usr/lib/ruby/1.8/rubygems.rb:245:in
each' /system/library/frameworks/ruby.framework/versions/1.8/usr/lib/ruby/1.8/rubygems.rb:245:in activate' /system/library/frameworks/ruby.framework/versions/1.8/usr/lib/ruby/1.8/rubygems.rb:246:in
activate' /system/library/frameworks/ruby.framework/versions/1.8/usr/lib/ruby/1.8/rubygems.rb:245:in each' /system/library/frameworks/ruby.framework/versions/1.8/usr/lib/ruby/1.8/rubygems.rb:245:in
activate' /system/library/frameworks/ruby.framework/versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem' /usr/bin/rails:18
you need update gems:
sudo gem update
however, lot happier if update ruby. there various ways this, particularly fond of rbenv
, can find @ github. if install rbenv
, plug-in ruby-build
, can ask rbenv
download , install higher version of ruby in single command. note need have installed xcode first, including xcode command-line tools.
in fact, tried , worked. used rbenv
, ruby-build
install ruby 2.0 freshly on mountain lion, described here:
http://www.apeth.com/nonblog/stories/ruby2onmountainlion.html
i switched rbenv use ruby 2.0. didn't include rails
, though, did gem install rails
. finally, said: .rbenv/shims/rails new hello
, worked. (the reason had specify path i'd forgotten, in excitement, rbenv rehash
. silly me.)
so must work, because did in real time, between time asked question , time wrote answer!
Comments
Post a Comment