Unable to generate rails footnote
I am trying to install debug tool called rails-footnotes on Ra开发者_StackOverflow社区ils 3.0 following instruction on GitHub. A check running bundle show rails-footnotes show that I got rails-footnotes-3.7.4 installed. However, when I run
rails generate rails_footnotese:install
>>Could not find generator rails_footnotese:install.
I hope someone experienced the same issue might help me out. Thank you.
Version 3.7.4 doesn't use a generator, only the newer 3.7.5 (which hasn't been released yet) does. Also, the README has a typo; it should be rails_footnotes:install
, not rails_footnotese:install
(there is already a pull request to fix this).
If you want to stay on the stable 3.7.4, all the generator command does is add the config/initializers/rails_footnotes.rb
file with the same content from the README:
if defined?(Footnotes) && Rails.env.development?
Footnotes.run! # first of all
# ... other init code
end
and a .rails_footnotes
file with this:
#this code temporarily disables notes for all controllers
# Footnotes::Filter.notes = []
Otherwise, use the git version to make the generator work:
gem 'rails-footnotes', :git => "git://github.com/josevalim/rails-footnotes.git"
精彩评论