I have the RedCloth
gem in my vendor/gems
directory.
I also have this in my environment.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
如果您使用的是Rails 3,则需要在Gemfile
指定它。
rake gems:build
这是因为config.gem尝试需要'RedCloth',但是您需要'redcloth'
config.gem 'RedCloth', :lib => 'redcloth'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.