当我尝试在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
答案 0 :(得分:1)
原因是两个机架版本之间存在冲突,所以我通过
卸载了未实现的版本gem uninstall rack
做了这个伎俩
答案 1 :(得分:1)
您必须cd
首先关注directory
您要创建new project
的内容。
如果您在该目录中,则可以输入rails new YOUR_APP_NAME
答案 2 :(得分:0)
尝试:
rails new demo
将demo替换为实际路径或项目名称。