[英]If gem is installed in vendor/gems, why would Rails (2.3.4) complain that it is missing?
我的vendor/gems
目录中有RedCloth
gem。
我的environment.rb
也有这个:
config.gem 'RedCloth'
那么,Rails为什么抱怨宝石缺失:
Missing these required gems:
RedCloth
还需要什么才能识别出我已将其安装在vendor/gems
目录中?
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'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.