创建Rails 3.2.16应用程序时出错

时间:2014-01-09 11:35:31

标签: ruby-on-rails ruby-on-rails-3.2

我正在使用此命令创建我的rails应用程序(版本3.2.16)

rails 3.2.16 new myapp

但我收到了以下错误

/home/hardik/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'railties' (= 3.2.16) - did find: [railties-4.0.0,railties-3.2.14,railties-3.2.13] (Gem::LoadError)
    from /home/hardik/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
    from /home/hardik/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
    from /home/hardik/.rvm/gems/ruby-2.0.0-p247/bin/rails:22:in `<main>'
    from /home/hardik/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
    from /home/hardik/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'

提前完成

1 个答案:

答案 0 :(得分:2)

查看错误消息

Could not find 'railties' (= 3.2.16) - did find: [railties-4.0.0,railties-3.2.14,railties-3.2.13]

您尚未安装rails 3.2.16,但您有4.0.0,3.2.14和3.2.13

rails new myapp

应该这样做

如果您需要指定导轨版本,则应使用rvmrbenv