I shouldn’t have had to fix it this way but it’s the only thing that worked…
Category Archives: Ruby
* Note, I’m not going to talk about how to make Redcarpet work. Instead I’m going to explain how to get Yard generating documentation again with a redcarpet alternative.
Maybe I’ve just been unlucky but I’ve had a number of run ins with Redcarpet when using Yard over the years. I’ve learned that Yard can use a number of markup-providers besides the Redcarpet gem.
For search purposes, here’s the verbage for my current scuffle with Redcarpet:
[error]: Missing ‘redcarpet’ gem for Markdown formatting. Install it with `gem install redcarpet`
To replace that redcarpet dependency:
1) generate a /.yardopts file if it doesn’t already exist. Any configuration you provide in there will be picked up regardless if you run
yard directly or some Rake task calls yard with additional parameters.
2) Append a parameter to change the markup-provider.
--markup-provider <some markup-provider>
More options for a markup-provider beyond rdiscount are listed at: http://www.rubydoc.info/gems/yard/YARD/Templates/Helpers/MarkupHelper
3) Finally, ensure your Gemfile lists your new markup-provider.
Getting the following error?:
Gem::FilePermissionError: You don’t have write permissions for the /Users/<username>/.rvm/gems/… directory.
Probably installed something under sudo. Fix the ownership of your RVM directory.
sudo chown -R <username> ~/.rvm
Running afoul of the following error when trying to install rubies with RVM despite having installed Xcode?
Can not find compiler and ‘make’ tool – make sure Xcode and/or Command Line Tools are installed.
With newer versions of Xcode the command line tools RVM expects are not automatically installed alongside Xcode.
Open Xcode and navigate to: Xcode > Preferences > Downloads and click Install for Command Line Tools.
Association named ‘spree_roles’ was not found; perhaps you misspelled it?
I ran into this error while developing an extension for Spree 1-3-stable and writing request specs to run on the dummy test app generated via
bundle exec rake test_app. You may have also run into this error on a normal Spree app if you installed Spree in your Rails apps using just your Gemfile and bundler instead of
spree install <my_store>.
Regardless, this is an issue with Spree not setting the correct user model in the spree initializer during install. To correct this, update
config/intializers/spree.rb to use:
Spree.user_class = "Spree::User"
Spree.user_class = "Spree::LegacyUser"
If you’re having this issue with the dummy test app in
spec/dummy, just do the same for the dummy app’s initializer:
For more information:
See the issue for dummy test_app: https://github.com/spree/spree/issues/1966
See the issue for regular Spree: https://github.com/radar/spree_auth_devise/issues/1