忘记说了,Gemfile 里添加了 gem 'github-markdown' 而且 bundle install 显示了 Using github-markdown-0.6.5
app/helpers/application_helper.rb 中的代码
module ApplicationHelper
def markdown(text)
HTML::Pipeline::MarkdownFilter.new(text)
end
end
然后在 views 中调用就显示 Missing dependency 'github-markdown' for MarkdownFilter
启动 rails c 运行却可以

rails c 里 $LOAD_PATH 也显示有 "/usr/lib/ruby/gems/2.1.0/gems/github-markdown-0.6.5/lib"
但是我把代码改成
module ApplicationHelper
def markdown(text)
return $LOAD_PATH
HTML::Pipeline::MarkdownFilter.new(text)
end
end
返回的却没有 "/usr/lib/ruby/gems/2.1.0/gems/github-markdown-0.6.5/lib"
请问这是什么问题?