开发者

If gem is installed in vendor/gems, why would Rails (2.3.4) complain that it is missing?

I have the RedCloth gem in my vendor/gems directory.

I also have this in my e开发者_StackOverflow中文版nvironment.rb:

config.gem 'RedCloth'

So why does Rails complain that the gem is missing:

Missing these required gems: 
RedCloth

What else does it need to recognize that I have it installed in the vendor/gems directory?

environment.rb:

RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
require File.join(File.dirname(__FILE__), 'boot')

Rails::Initializer.run do |config|
  config.gem 'RedCloth'
  config.plugins = [ :all ]
  config.action_controller.session_store = :active_record_store
  config.time_zone = 'UTC'
end


It's because config.gem try require 'RedCloth', but you need require 'redcloth'

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


If you are using Rails 3 then you need to specify it in the Gemfile.


rake gems:build
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜