开发者

Missing RedCloth gem but `rake gems:install` does nothing

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/v开发者_开发问答endor/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?


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

config.gem 'RedCloth', :lib => '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.


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/


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜