[英]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.