缺少 RedCloth gem,但 `rake gems:install` 什么也不做

发布于 2024-09-18 12:45:27 字数 741 浏览 8 评论 0原文

我尝试启动 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

零時差 2024-09-25 12:45:28

我写了一些关于如何解决此问题的更具描述性的解决方案。需要修改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/

谎言月老 2024-09-25 12:45:28

我在使用 Rails 时有时也会遇到错误。我可能想知道它与超级用户命令有关,例如:

sudo gem install <gem name>

因为对我来说 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:

sudo gem install <gem name>

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).

╭⌒浅淡时光〆 2024-09-25 12:45:27

如果是rails-2.3.x,在你的config/enfironment.rb中

config.gem 'RedCloth', :lib => 'redcloth'

If it's rails-2.3.x, in your config/enfironment.rb

config.gem 'RedCloth', :lib => 'redcloth'
绝情姑娘 2024-09-25 12:45:27

我发现 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文