缺少 RedCloth gem,但 `rake gems:install` 什么也不做
我尝试启动 Rails 应用程序,但从 Passenger 收到此错误消息:
Ruby on Rails application could not be started
The application has exited during startup (i.e. during the evaluation of
config/environment.rb)
/home/chuck/chuck.com/vendor/rails/railties/lib/rails/gem_dependency.rb:119:
Warning: Gem::Dependency#version_requirements is deprecated and will be removed
on or after August 2010. Use #requirement
Missing these required gems:
RedCloth
You're running: ruby 1.8.7.72 at /usr/bin/ruby1.8 rubygems 1.3.6 at
/home/chuck/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8
Run `rake gems:install`
to install the missing gems.
我在应用程序中安装了 Rakefile 并尝试运行 rake gems:install
但没有任何反应,也没有打印错误消息。
我该如何解决这个问题?
I tried starting my Rails application but got this error message from Passenger:
Ruby on Rails application could not be started
The application has exited during startup (i.e. during the evaluation of
config/environment.rb)
/home/chuck/chuck.com/vendor/rails/railties/lib/rails/gem_dependency.rb:119:
Warning: Gem::Dependency#version_requirements is deprecated and will be removed
on or after August 2010. Use #requirement
Missing these required gems:
RedCloth
You're running: ruby 1.8.7.72 at /usr/bin/ruby1.8 rubygems 1.3.6 at
/home/chuck/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8
Run `rake gems:install`
to install the missing gems.
I installed a Rakefile in my app and tried running rake gems:install
but nothing happens and no error message is printed.
How can I resolve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我写了一些关于如何解决此问题的更具描述性的解决方案。需要修改environments.rd文件,添加
:lib=> 'redcloth'
在这里阅读我的博客文章
http:// spuder.wordpress.com/2011/08/04/missing-这些-required-gems-redcloth/
I wrote a little more descriptive solution on how to fix this issue. You need to modify the environments.rd file and add
:lib=> 'redcloth'
Read my blog post here
http://spuder.wordpress.com/2011/08/04/missing-these-required-gems-redcloth/
我在使用 Rails 时有时也会遇到错误。我可能想知道它与超级用户命令有关,例如:
因为对我来说 rake gems:install 也什么也不做,我必须手动安装 gem 作为 sudo (我在这里谈论的是 Linux 盒子) )。
I'm also getting errors sometimes when I'm using Rails. I might wonder its something to do with super user command, like:
Because for me also
rake gems:install
does nothing and I have to manually install the gem as sudo (I'm talking about Linux box here).如果是rails-2.3.x,在你的config/enfironment.rb中
If it's rails-2.3.x, in your config/enfironment.rb
我发现 gems:install 参差不齐,因为人们在环境中放入了一些东西。rb 文件。如果此应用未使用捆绑程序,您应该
gem install RedCloth
,然后重试。I have found that gems:install is spotty because of the things that people put in their environments.rb files. If this app isn't using bundler, you should
gem install RedCloth
and then try again.