-1

当我尝试在 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
4

3 回答 3

1

您必须cd首先directory创建一个new project.

如果您在该目录中,您现在可以键入rails new YOUR_APP_NAME

于 2013-05-08T07:26:38.617 回答
1

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

gem uninstall rack

成功了

于 2013-05-08T03:53:05.187 回答
0

尝试:

轨道新演示

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

于 2013-05-08T02:58:09.853 回答