Rails无法创建站点

时间:2013-05-08 02:53:34

标签: ruby-on-rails

当我尝试在Ruby on Rails中创建一个网站时,我得到以下错误

任何人?

$ rails new / var / www / vhosts / sales / ruby​​ / blog

  /usr/lib/ruby/site_ruby/1.8/rubygems.rb:233:in `activate': can't activate rack (~> 1.4.5, runtime) for ["actionpack-3.2.13", "railties-3.2.13"], already activated rack-1.5.2 for ["rack-ssl-1.3.3", "ra
ilties-3.2.13"] (Gem::LoadError)
        from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:249:in `activate'
        from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `each'
        from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `activate'
        from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:249:in `activate'
        from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `each'
        from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `activate'
        from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:1082:in `gem'
        from /usr/bin/rails:18

3 个答案:

答案 0 :(得分:1)

原因是两个机架版本之间存在冲突,所以我通过

卸载了未实现的版本
gem uninstall rack

做了这个伎俩

答案 1 :(得分:1)

您必须cd首先关注directory您要创建new project的内容。

如果您在该目录中,则可以输入rails new YOUR_APP_NAME

答案 2 :(得分:0)

尝试:

rails new demo

将demo替换为实际路径或项目名称。