Unable to create rails application due to errors

泪湿孤枕 提交于 2019-12-12 05:07:36

问题


Here is what I'm doing and getting

rails new ffffff
/usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find railties (>= 0) amongst [activemodel-4.0.0.beta1, activesupport-4.0.0.beta1, atomic-1.0.1, backports-3.1.1, bcrypt-ruby-3.0.1, bson-1.8.3, bson_ext-1.8.3, builder-3.1.4, bundler-1.3.1, chunky_png-1.2.7, coderay-1.0.9, compass-0.12.2, daemons-1.1.9, eventmachine-1.0.3, exceptional-2.0.33, fssm-0.2.10, haml-4.0.0, i18n-0.6.4, jsmin-1.0.1, mail-2.5.3, method_source-0.8.1, mime-types-1.21, minitest-4.6.2, moped-1.4.3, multi_json-1.6.1, nokogiri-1.5.6, origin-1.0.11, polyglot-0.3.3, pony-1.4, pry-0.9.12, pry-nav-0.2.3, rack-1.5.2, rack-mount-0.8.3, rack-protection-1.5.0, rack-test-0.6.2, rack-timeout-0.0.3, rake-10.0.3, rubygems-bundler-1.1.1, rvm-1.11.3.6, sass-3.2.7, shotgun-0.9, sinatra-1.3.5, sinatra-assetpack-0.1.7, sinatra-contrib-1.3.2, sinatra-flash-0.3.0, sinatra-support-1.2.2, slop-3.4.4, thin-1.5.0, thread_safe-0.1.0, tilt-1.3.5, time-lord-1.0.1, treetop-1.4.12, tzinfo-0.3.37] (Gem::LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
    from /usr/lib/ruby/1.9.1/rubygems.rb:1231:in `gem'
    from /usr/local/bin/rails:22:in `<main>'

I have only ruby 2.0 installed

rvm list

rvm rubies

=* ruby-2.0.0-p0 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

How do I fix this?


回答1:


Seems like you don't have railties installed:

gem install railties


来源:https://stackoverflow.com/questions/15587594/unable-to-create-rails-application-due-to-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!