-
Couldn't load subscription status.
- Fork 25
Manual Install
This article assumes you are developing on OSX, although conventions in Linux are not very different. Windows is currently untested.
Let's say your application lives in ~/workspace/client-app for simplicity. When you see this, just mentally replace it with your application's directory.
This application is just a stock Rails application. For information about creating a new Rails app, consult the Rails Getting Started page.
Despite the best intentions of everyone involved, this documentation, like all documentation, is obsolete. Consult the source for the install generator for a somewhat-comprehensible depiction of what will happen.
This relies on Bundler.require running in your config/application.rb file. If that does not happen, you will need to do require "style_guide" manually.
Add the following line to your Gemfile:
gem "style-guide"Use Bundler to install it:
$ bundle installAdd the following line to your config/routes.rb file:
mount StyleGuide::Engine => "/style-guide" unless Rails.env.production?This assumes you've got a path containing directories of partials you want to display, like
app/views/style-guide.
Add the following line to application.rb:
config.style_guide.paths << Rails.root.join("app/views/style-guide/**/*")This will load all directories under the path. It'll also recursively add other directories. Replace << with = if you don't want to use the built-in partials.
Add the following lines to your Gemfile:
group :development do
gem "rack-livereload"
gem "guard-livereload"
endUse Bundler to install them:
$ bundle installRun the following command to generate a Guardfile entry for guard-livereload:
$ guard init livereloadYou should see this:
14:59:55 - INFO - livereload guard added to Guardfile, feel free to edit it
Add the following line to config/environments/development.rb:
config.middleware.insert_before(::Rack::Lock, ::Rack::LiveReload)Now you're all ready to start Rails and watch Style Guide do its thing!